naginterfaces.library.stat.inv_​cdf_​f

naginterfaces.library.stat.inv_cdf_f(p, df1, df2)[source]

inv_cdf_f returns the deviate associated with the given lower tail probability of the or variance-ratio distribution with real degrees of freedom.

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

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/g01/g01fdf.html

Parameters
pfloat

, the lower tail probability from the required -distribution.

df1float

The degrees of freedom of the numerator variance, .

df2float

The degrees of freedom of the denominator variance, .

Returns
xfloat

The deviate associated with the given lower tail probability of the or variance-ratio distribution with real degrees of freedom.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: and .

(errno )

The probability is too close to or . The value of cannot be computed. This will only occur when the large sample approximations are used.

Warns
NagAlgorithmicWarning
(errno )

The solution has failed to converge. However, the result should be a reasonable approximation. Alternatively, inv_cdf_beta() can be used with a suitable setting of the argument .

Notes

The deviate, , associated with the lower tail probability, , of the -distribution with degrees of freedom and is defined as the solution to

where ; .

The value of is computed by means of a transformation to a beta distribution, :

and using a call to inv_cdf_beta().

For very large values of both and , greater than , a normal approximation is used. If only one of or is greater than then a approximation is used; see Abramowitz and Stegun (1972).

References

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

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