# naginterfaces.library.stat.inv_​cdf_​f_​vector¶

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

inv_cdf_f_vector returns a number of deviates associated with given probabilities of the or variance-ratio distribution with real degrees of freedom.

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

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

Parameters
tailstr, length 1, array-like, shape

Indicates which tail the supplied probabilities represent. For , for :

The lower tail probability, i.e., .

The upper tail probability, i.e., .

pfloat, array-like, shape

, the probability of the required -distribution as defined by .

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
ffloat, ndarray, shape

, the deviates 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, invalid value for .

On entry, , or, .

The solution has not converged. The result should still be a reasonable approximation to the solution.

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

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 , , , was invalid, or the solution failed to converge.

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

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