NAG Library Routine Document
G01FBF returns the deviate associated with the given tail probability of Student's -distribution with real degrees of freedom, via the routine name.
|REAL (KIND=nag_wp) G01FBF
associated with the lower tail probability,
, of the Student's
degrees of freedom is defined as the solution to
For the integral equation is easily solved for .
For other values of
a transformation to the beta distribution is used and the result obtained from G01FEF
an inverse asymptotic expansion of Cornish–Fisher type is used. The algorithm is described by Hill (1970)
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
- 1: TAIL – CHARACTER(1)Input
: indicates which tail the supplied probability represents.
- The upper tail probability, i.e., .
- The lower tail probability, i.e., .
- The two tail (significance level) probability, i.e., .
- The two tail (confidence interval) probability, i.e., .
, , or .
- 2: P – REAL (KIND=nag_wp)Input
, the probability from the required Student's
-distribution as defined by TAIL
- 3: DF – REAL (KIND=nag_wp)Input
On entry: , the degrees of freedom of the Student's -distribution.
- 4: 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, because for this routine the values of the output parameters may be useful even if
on exit, 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
Note: G01FBF may return useful information for one or more of the following detected errors or warnings.
Errors or warnings detected by the routine:
If , or on exit, then G01FBF returns zero.
|On entry,||, , or .|
Convergence in the calculation of the inverse beta value was not achieved. However, the result should be a reasonable approximation to the correct value.
The results should be accurate to five significant digits, for most parameter values. The error behaviour for various parameter values is discussed in Hill (1970)
may be calculated by using the transformation described in Section 3
and using G01FEF
. This routine allows you to set the required accuracy.
This example reads the probability, the tail that probability represents and the degrees of freedom for a number of Student's -distributions and computes the corresponding deviates.
9.1 Program Text
Program Text (g01fbfe.f90)
9.2 Program Data
Program Data (g01fbfe.d)
9.3 Program Results
Program Results (g01fbfe.r)