Regularized incomplete beta function I, x(a,b)
Mathematically, if a and b are positive real numbers, and 0 ≤ x ≤ 1, then I, x(a,b) = ∫0xta-1(1-t)b-1dt/B(a,b) where B is the beta function. It is also the cumulative distribution function of the beta distribution.
betaIncomplete(a, b, x) evaluates I, x(a,b).
Parameters
a | the first argument of B, must be positive |
b | the second argument of B, must be positive |
x | the fraction of integration completion from below, 0 ≤ x ≤ 1 |
Returns
It returns
I, x(a,b), an element of [0,1].
| a | b | x | betaIncomplete(a, b, x) |
| negative | b | x | NaN |
| a | negative | x | NaN |
| a | b | < 0 | NaN |
| a | b | ≥ 1 | NaN |
| +0 | +0 | (0,1) | NaN |
| ∞ | ∞ | (0,1) | NaN |
If one or more of the input parameters are NaN, the one with the largest payload is returned. For equal payloads but with possibly different signs, the order of preference is x, a, b.
Note
The integral is evaluated by a continued fraction expansion or, when
b * x is small, by a
power series.