The lower tail probability of the noncentral Student's -distribution with degrees of freedom and noncentrality parameter , , is defined by
with
The probability is computed in one of two ways.
(i)When , the relationship to the normal is used:
(ii)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.
4References
Amos D E (1964) Representations of the central and non-central -distributions Biometrika51 451–458
5Arguments
1: – doubleInput
On entry: , the deviate from the Student's -distribution with degrees of freedom.
2: – doubleInput
On entry: , the degrees of freedom of the Student's -distribution.
Constraint:
.
3: – doubleInput
On entry: , the noncentrality parameter of the Students -distribution.
4: – OptionalG01GBInput/Output
Optional parameter container, derived from Optional.
Container for:
tol – double
This optional parameter
may be set using the method
OptionalG01GB::tol
and accessed via
OptionalG01GB::get_tol.
Default:
On entry: the absolute accuracy required by you in the results. If prob_students_t_noncentral is entered with tol greater than or equal to or less than (see precision), the value of is used instead.
maxit – types::f77_integer
This optional parameter
may be set using the method
OptionalG01GB::maxit
and accessed via
OptionalG01GB::get_maxit.
Default:
On entry: the maximum number of terms that are used in each of the summations.
Suggested value:
. See Section 9 for further comments.
Constraint:
.
6Exceptions and Warnings
Errors or warnings detected by the function:
If on exit , then prob_students_t_noncentral returns .
All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of
opt.ifail, depending on how errors
and warnings are being handled (see Error Handling for more details).
One of the series has failed to converge with and . Reconsider the requested tolerance and/or the maximum number of iterations.
The probability is too close to or . The returned value should be a reasonable estimate of the true value.
7Accuracy
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.
8Parallelism and Performance
Please see the description for the underlying computational routine in this section of the
FL Interface documentation.
9Further Comments
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:
Note that prob_students_t_noncentral only allows degrees of freedom greater than or equal to although values between and are theoretically possible.
10Example
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.