Investment Studio > Expressions > Functions > Statistical > BETAINV

float betainv(float probability, float alpha, float beta, float a = 0, float b = 1)

Returns the inverse of the Beta CDF (Cumulative Distribution Function): if probability = betadist(x, alpha, beta, a, b, TRUE), then betainv(probability, alpha, beta, a, b) = x.

probability must be in the range [0, 1].

alpha and beta must be > 0.

b must be > a.

If a is omitted, it defaults to 0. If b is omitted, it defaults to 1.

The result is determined by an iterative procedure that terminates when the incremental improvement is less than 1E-10 per iteration. If this precision is not achieved after 100 iterations, the result is an error (#N/A).

Example

The number x such that a stochastic variable with Beta(1, 3) distribution is <= x with a probability of 87.5% is

=betainv(87.5%, 1, 3)

or 0.500000000058208, which is accurate to within 1E-10 (the exact answer is 0.5).

See also beta, betadist, gamma, gammadist, gammainv, gammaln.