naginterfaces.library.specfun.beta_​incomplete_​vector

naginterfaces.library.specfun.beta_incomplete_vector(a, b, x)[source]

beta_incomplete_vector computes an array of values for the regularized incomplete beta function and its complement .

For full information please refer to the NAG Library document for s14cq

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/s/s14cqf.html

Parameters
afloat, array-like, shape

The argument of the function, for .

bfloat, array-like, shape

The argument of the function, for .

xfloat, array-like, shape

, the upper limit of integration, for .

Returns
wfloat, ndarray, shape

The values of the incomplete beta function evaluated from zero to .

w1float, ndarray, shape

The values of the complement of the incomplete beta function , i.e., the incomplete beta function evaluated from to one.

ivalidint, ndarray, shape

contains the error code for the th evaluation, for .

No error.

.

Both .

.

Both .

Both .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

On entry, at least one argument had an invalid value.

Check for more information.

Notes

beta_incomplete_vector evaluates the regularized incomplete beta function and its complement in the normalized form, for arrays of arguments , and , for . The incomplete beta function and its complement are given by

with

,

and ,

and the beta function is defined as where is the gamma function.

Several methods are used to evaluate the functions depending on the arguments , and . The methods include Wise’s asymptotic expansion (see Wise (1950)) when , continued fraction derived by DiDonato and Morris (1992) when , , and power series when or . When both and are large, specifically , , the DiDonato and Morris (1992) asymptotic expansion is employed for greater efficiency.

Once either or is computed, the other is obtained by subtraction from . In order to avoid loss of relative precision in this subtraction, the smaller of and is computed first.

beta_incomplete_vector is derived from BRATIO in DiDonato and Morris (1992).

References

DiDonato, A R and Morris, A H, 1992, Algorithm 708: Significant digit computation of the incomplete beta function ratios, ACM Trans. Math. Software (18), 360–373

Wise, M E, 1950, The incomplete beta function as a contour integral and a quickly converging series for its inverse, Biometrika (37), 208–218