NAG Library Function Document
nag_deviates_f_dist (g01fdc) returns the deviate associated with the given lower tail probability of the or variance-ratio distribution with real degrees of freedom.
||nag_deviates_f_dist (double p,
, associated with the lower tail probability,
, of the
-distribution with degrees of freedom
is defined as the solution to
The value of
is computed by means of a transformation to a beta distribution,
and using a call to nag_deviates_beta (g01fec)
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
p – doubleInput
On entry: , the lower tail probability from the required -distribution.
df1 – doubleInput
On entry: the degrees of freedom of the numerator variance, .
df2 – doubleInput
On entry: the degrees of freedom of the denominator variance, .
fail – NagError *Input/Output
The NAG error argument (see Section 3.6
in the Essential Introduction).
6 Error Indicators and Warnings
- On any of the error conditions listed below except NE_SOL_NOT_CONV nag_deviates_f_dist (g01fdc) returns .
Dynamic memory allocation failed.
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 value of cannot be computed.
This will only occur when the large sample approximations are used.
On entry, .
On entry, and .
Constraint: and .
On entry, .
The solution has failed to converge.
However, the result should be a reasonable approximation.
Alternatively, nag_deviates_beta (g01fec)
can be used with a suitable setting of the argument
The result should be accurate to five significant digits.
For higher accuracy nag_deviates_beta (g01fec)
can be used along with the transformations given in Section 3
This example reads the lower tail probabilities for several -distributions, and calculates and prints the corresponding deviates until the end of data is reached.
9.1 Program Text
Program Text (g01fdce.c)
9.2 Program Data
Program Data (g01fdce.d)
9.3 Program Results
Program Results (g01fdce.r)