naginterfaces.library.stat.prob_​f

naginterfaces.library.stat.prob_f(f, df1, df2, tail='L')[source]

prob_f returns the probability for the lower or upper tail of the or variance-ratio distribution with real degrees of freedom.

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

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

Parameters
ffloat

, the value of the variate.

df1float

The degrees of freedom of the numerator variance, .

df2float

The degrees of freedom of the denominator variance, .

tailstr, length 1, optional

Indicates whether an upper or lower tail probability is required.

The lower tail probability is returned, i.e., .

The upper tail probability is returned, i.e., .

Returns
pfloat

The probability for the lower or upper tail of the or variance-ratio distribution with real degrees of freedom.

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: and .

(errno )

The probability is too close to or . is too far out into the tails for the probability to be evaluated exactly. The result tends to approach if is large, or if is small. The result returned is a good approximation to the required solution.

Notes

The lower tail probability for the , or variance-ratio distribution, with and degrees of freedom, , is defined by:

for , , .

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

and using a call to prob_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