naginterfaces.library.stat.prob_​f_​vector

naginterfaces.library.stat.prob_f_vector(tail, f, df1, df2)[source]

prob_f_vector returns a number of lower or upper tail probabilities for the or variance-ratio distribution with real degrees of freedom.

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

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

Parameters
tailstr, length 1, array-like, shape

Indicates whether the lower or upper tail probabilities are required. For , for :

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

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

ffloat, array-like, shape

, the value of the variate.

df1float, array-like, shape

, the degrees of freedom of the numerator variance.

df2float, array-like, shape

, the degrees of freedom of the denominator variance.

Returns
pfloat, ndarray, shape

, the probabilities for the -distribution.

ivalidint, ndarray, shape

indicates any errors with the input arguments, with

No error.

On entry, invalid value supplied in when calculating .

On entry, .

On entry, , or, .

The solution has failed to converge. The result returned should represent an approximation to the solution.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

On entry, at least one value of , , or was invalid, or the solution failed to converge.

Check for more information.

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).

The input arrays to this function are designed to allow maximum flexibility in the supply of vector arguments by re-using elements of any arrays that are shorter than the total number of evaluations required. See the G01 Introduction for further information.

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