naginterfaces.library.stat.prob_​beta_​noncentral

naginterfaces.library.stat.prob_beta_noncentral(x, a, b, rlamda, tol=0.0, maxit=500)[source]

prob_beta_noncentral returns the probability associated with the lower tail of the noncentral beta distribution.

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

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/g01/g01gef.html

Parameters
xfloat

, the deviate from the beta distribution, for which the probability is to be found.

afloat

, the first parameter of the required beta distribution.

bfloat

, the second parameter of the required beta distribution.

rlamdafloat

, the noncentrality parameter of the required beta distribution.

tolfloat, optional

The relative accuracy required by you in the results. If prob_beta_noncentral is entered with greater than or equal to or less than (see machine.precision), the value of is used instead.

See Accuracy for the relationship between and .

maxitint, optional

The maximum number of iterations that the algorithm should use.

See Accuracy for suggestions as to suitable values for for different values of the arguments.

Returns
pfloat

The probability associated with the lower tail of the noncentral beta distribution.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , where is the safe range parameter as defined by machine.real_safe.

Warns
NagAlgorithmicWarning
(errno )

The solution has failed to converge in iterations. Consider increasing or . The returned value will be an approximation to the correct value.

(errno )

The probability is too close to or for the algorithm to be able to calculate the required probability. prob_beta_noncentral will return or as appropriate. This should be a reasonable approximation.

(errno )

The required accuracy was not achieved when calculating the initial value of the beta distribution. You should try a larger value of . The returned value will be an approximation to the correct value.

Notes

The lower tail probability for the noncentral beta distribution with parameters and and noncentrality parameter , , is defined by

where

which is the central beta probability function or incomplete beta function.

Recurrence relationships given in Abramowitz and Stegun (1972) are used to compute the values of for each step of the summation (1).

The algorithm is discussed in Lenth (1987).

References

Abramowitz, M and Stegun, I A, 1972, Handbook of Mathematical Functions, (3rd Edition), Dover Publications

Lenth, R V, 1987, Algorithm AS 226: Computing noncentral beta probabilities, Appl. Statist. (36), 241–244