NAG Library Routine Document
G01EDF returns the probability for the lower or upper tail of the or variance-ratio distribution with real degrees of freedom, via the routine name.
|REAL (KIND=nag_wp) G01EDF
||F, DF1, DF2
The lower tail probability for the
, or variance-ratio distribution,
degrees of freedom,
, is defined by:
The probability is computed by means of a transformation to a beta distribution,
and using a call to G01EEF
For very large values of both
, greater than
, a normal approximation is used. If only one of
is greater than
approximation is used, see Abramowitz and Stegun (1972)
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
- 1: TAIL – CHARACTER(1)Input
: indicates whether an upper or lower tail probability is required.
- The lower tail probability is returned, i.e., .
- The upper tail probability is returned, i.e., .
- 2: F – REAL (KIND=nag_wp)Input
On entry: , the value of the variate.
- 3: DF1 – REAL (KIND=nag_wp)Input
On entry: the degrees of freedom of the numerator variance, .
- 4: DF2 – REAL (KIND=nag_wp)Input
On entry: the degrees of freedom of the denominator variance, .
- 5: 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: G01EDF 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 G01EDF returns .
|On entry,|| or .|
is too far out into the tails for the probability to be evaluated exactly. The result tends to approach
is large, or
is small. The result returned is a good approximation to the required solution.
The result should be accurate to five significant digits.
For higher accuracy G01EEF
can be used along with the transformations given in Section 3
This example reads values from, and degrees of freedom for, a number of -distributions and computes the associated lower tail probabilities.
9.1 Program Text
Program Text (g01edfe.f90)
9.2 Program Data
Program Data (g01edfe.d)
9.3 Program Results
Program Results (g01edfe.r)