NAG Library Routine Document
G01GBF returns the lower tail probability for the noncentral Student's -distribution, via the routine name.
|REAL (KIND=nag_wp) G01GBF
||T, DF, DELTA, TOL
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
- 1: T – REAL (KIND=nag_wp)Input
On entry: , the deviate from the Student's -distribution with degrees of freedom.
- 2: DF – REAL (KIND=nag_wp)Input
On entry: , the degrees of freedom of the Student's -distribution.
- 3: DELTA – REAL (KIND=nag_wp)Input
On entry: , the noncentrality parameter of the Students -distribution.
- 4: TOL – REAL (KIND=nag_wp)Input
: the absolute accuracy required by you in the results. If G01GBF is entered with TOL
greater than or equal to
or less than
), then the value of
is used instead.
- 5: MAXIT – INTEGERInput
On entry: the maximum number of terms that are used in each of the summations.
. See Section 8
for further comments.
- 6: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
If on exit , then G01GBF returns .
One of the series has failed to converge. Reconsider the requested tolerance and/or maximum number of iterations.
The probability is too small to calculate accurately.
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 G01GDF
Note that G01GBF 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 parameters 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 (g01gbfe.f90)
9.2 Program Data
Program Data (g01gbfe.d)
9.3 Program Results
Program Results (g01gbfe.r)