| Statistics Toolbox | Search  Help Desk |
| betainv | Examples |
Inverse of the beta cumulative distribution function.
Syntax
X = betainv(P,A,B)
Description
betainv(P,A,B) computes the inverse of the beta cdf with parameters A and B for the probabilities in P. The arguments P, A, and B must all be the same size except that scalar arguments function as constant matrices of the common size of the other arguments. The parameters A and B must both be positive and P must lie on the interval

Algorithm
We use Newton's Method with modifications to constrain steps to the allowable range for x, i.e., [0 1].Examples
p = [0.01 0.5 0.99];
x = betainv(p,10,5)
x =
0.3726 0.6742 0.8981