naginterfaces.library.stat.inv_​cdf_​students_​t

naginterfaces.library.stat.inv_cdf_students_t(p, df, tail='L')[source]

inv_cdf_students_t returns the deviate associated with the given tail probability of Student’s -distribution with real degrees of freedom.

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

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

Parameters
pfloat

, the probability from the required Student’s -distribution as defined by .

dffloat

, the degrees of freedom of the Student’s -distribution.

tailstr, length 1, optional

Indicates which tail the supplied probability represents.

The upper tail probability, i.e., .

The lower tail probability, i.e., .

The two tail (significance level) probability, i.e., .

The two tail (confidence interval) probability, i.e., .

Returns
xfloat

The deviate associated with the given tail probability of Student’s -distribution with real degrees of freedom.

Raises
NagValueError
(errno )

On entry, .

Constraint: , , or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

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

Notes

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

For or the integral equation is easily solved for .

For other values of a transformation to the beta distribution is used and the result obtained from inv_cdf_beta().

For an inverse asymptotic expansion of Cornish–Fisher type is used. The algorithm is described by Hill (1970).

References

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

Hill, G W, 1970, Student’s -distribution, Comm. ACM (13(10)), 617–619