naginterfaces.library.stat.prob_​students_​t_​vector

naginterfaces.library.stat.prob_students_t_vector(tail, t, df)[source]

prob_students_t_vector returns a number of one or two tail probabilities for the Student’s -distribution with real degrees of freedom.

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

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

Parameters
tailstr, length 1, array-like, shape

Indicates which tail the returned probabilities should represent. For , for :

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

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

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

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

tfloat, array-like, shape

, the values of the Student’s variates.

dffloat, array-like, shape

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

Returns
pfloat, ndarray, shape

, the probabilities for the Student’s distribution.

ivalidint, ndarray, shape

indicates any errors with the input arguments, with

No error.

On entry, invalid value supplied in when calculating .

On entry, .

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.

Check for more information.

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

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

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