betaIncomplete

fnreal betaIncomplete(real a, real b, real x ) pure nothrow @safe @nogc

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

athe first argument of B, must be positive
bthe second argument of B, must be positive
xthe 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.

See Also