NAG Library Function Document
nag_prob_non_central_students_t (g01gbc) returns the lower tail probability for the noncentral Student's -distribution.
||nag_prob_non_central_students_t (double t,
The lower tail probability of the noncentral Student's
degrees of freedom and noncentrality parameter
, is defined by
The probability is computed in one of two ways.
||When , the relationship to the normal is used:
||Otherwise the series expansion described in Equation 9 of Amos (1964) is used. This involves the sums of confluent hypergeometric functions, the terms of which are computed using recurrence relationships.
Amos D E (1964) Representations of the central and non-central -distributions Biometrika 51 451–458
t – doubleInput
On entry: , the deviate from the Student's -distribution with degrees of freedom.
df – doubleInput
On entry: , the degrees of freedom of the Student's -distribution.
delta – doubleInput
On entry: , the noncentrality argument of the Students -distribution.
tol – doubleInput
: the absolute accuracy required by you in the results. If nag_prob_non_central_students_t (g01gbc) is entered with tol
greater than or equal to
or less than
(see nag_machine_precision (X02AJC)
), then the value of
is used instead.
max_iter – IntegerInput
On entry: the maximum number of terms that are used in each of the summations.
. See Section 8
for further comments.
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).
6 Error Indicators and Warnings
Dynamic memory allocation failed.
On entry, .
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG
The probability is too close to or .
The probability is too small to calculate accurately.
On entry, .
One of the series has failed to converge with and
Reconsider the requested tolerance and/or the maximum number of iterations.
The series described in Amos (1964)
are summed until an estimated upper bound on the contribution of future terms to the probability is less than tol
. There may also be some loss of accuracy due to calculation of gamma functions.
The rate of convergence of the series depends, in part, on the quantity . The smaller this quantity the faster the convergence. Thus for large and small the convergence may be slow. If is an integer then one of the series to be summed is of finite length.
If two tail probabilities are required then the relationship of the
-distribution to the
-distribution can be used:
and a call made to nag_prob_non_central_f_dist (g01gdc)
Note that nag_prob_non_central_students_t (g01gbc) only allows degrees of freedom greater than or equal to although values between and are theoretically possible.
This example reads values from, and degrees of freedom for, and noncentrality arguments of the noncentral Student's -distributions, calculates the lower tail probabilities and prints all these values until the end of data is reached.
9.1 Program Text
Program Text (g01gbce.c)
9.2 Program Data
Program Data (g01gbce.d)
9.3 Program Results
Program Results (g01gbce.r)