naginterfaces.library.stat.prob_​students_​t

naginterfaces.library.stat.prob_students_t(t, df, tail='L')[source]

prob_students_t returns the lower tail, upper tail or two tail probability for the Student’s -distribution with real degrees of freedom.

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

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

Parameters
tfloat

, the value of the Student’s variate.

dffloat

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

tailstr, length 1, optional

Indicates which tail the returned probability should represent.

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

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

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

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

Returns
pfloat

Either the lower tail, upper tail or two tail probability for the Student’s -distribution, depending on the value of supplied.

Raises
NagValueError
(errno )

On entry, .

Constraint: , , or .

(errno )

On entry, .

Constraint: .

Notes

The lower tail probability for the Student’s -distribution with degrees of freedom, is defined by:

Computationally, there are two situations:

  1. when , a transformation of the beta distribution, is used

    or

  2. when , an asymptotic normalizing expansion of the Cornish–Fisher type is used to evaluate the probability, see Hill (1970).

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

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