betaIncomplete

Incomplete beta integral

Returns regularized incomplete beta integral of the arguments, evaluated from zero to x. The regularized incomplete beta function is defined as

betaIncomplete(a, b, x) = $(GAMMA)(a + b) / ( $(GAMMA)(a) $(GAMMA)(b) ) * $(INTEGRATE 0, x) ta-1(1-t)b-1 dt

and is the same as the cumulative distribution function of the Beta distribution.

The domain of definition is 0 <= x <= 1. In this implementation a and b are restricted to positive values. The integral from x to 1 may be obtained by the symmetry relation

betaIncompleteCompl(a, b, x ) = betaIncomplete( b, a, 1-x )

The integral is evaluated by a continued fraction expansion or, when b * x is small, by a power series.

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

Meta