naginterfaces.library.stat.inv_​cdf_​beta

naginterfaces.library.stat.inv_cdf_beta(p, a, b, tol=0.0)[source]

inv_cdf_beta returns the deviate associated with the given lower tail probability of the beta distribution.

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

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

Parameters
pfloat

, the lower tail probability from the required beta distribution.

afloat

, the first parameter of the required beta distribution.

bfloat

, the second parameter of the required beta distribution.

tolfloat, optional

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

Returns
xfloat

The deviate associated with the given lower tail probability of the beta distribution.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

The solution has failed to converge. However, the result should be a reasonable approximation. Requested accuracy not achieved when calculating beta probability. You should try setting larger.

(errno )

The requested accuracy has not been achieved. Use a larger value of . There is doubt concerning the accuracy of the computed result. iterations of the Newton–Raphson method have been performed without satisfying the accuracy criterion (see Further Comments). The result should be a reasonable approximation of the solution.

Notes

The deviate, , associated with the lower tail probability, , of the beta distribution with parameters and is defined as the solution to

The algorithm is a modified version of the Newton–Raphson method, following closely that of Cran et al. (1977).

An initial approximation, , to is found (see Cran et al. (1977)), and the Newton–Raphson iteration

where is used, with modifications to ensure that remains in the range .

References

Cran, G W, Martin, K J and Thomas, G E, 1977, Algorithm AS 109. Inverse of the incomplete beta function ratio, Appl. Statist. (26), 111–114

Hastings, N A J and Peacock, J B, 1975, Statistical Distributions, Butterworth