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

naginterfaces.library.stat.inv_cdf_chisq_vector(tail, p, df)[source]

inv_cdf_chisq_vector returns a number of deviates associated with the given probabilities of the -distribution with real degrees of freedom.

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

https://www.nag.com/numeric/nl/nagdoc_29/flhtml/g01/g01tcf.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 .

dffloat, array-like, shape

, the degrees of freedom of the -distribution.

Returns
xfloat, 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, .

is too close to or for the result to be calculated.

The solution has failed to converge. The result should be a reasonable approximation.

Raises
NagValueError
(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.

Notes

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

The required is found by using the relationship between a -distribution and a gamma distribution, i.e., a -distribution with degrees of freedom is equal to a gamma distribution with scale parameter and shape parameter .

For very large values of , greater than , Wilson and Hilferty’s Normal approximation to the is used; see Kendall and Stuart (1969).

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

Best, D J and Roberts, D E, 1975, Algorithm AS 91. The percentage points of the distribution, Appl. Statist. (24), 385–388

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

Kendall, M G and Stuart, A, 1969, The Advanced Theory of Statistics (Volume 1), (3rd Edition), Griffin