NAG Library Function Document
nag_prob_f_dist (g01edc) returns the probability for the lower or upper tail of the or variance-ratio distribution with real degrees of freedom.
||nag_prob_f_dist (Nag_TailProbability tail,
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 nag_prob_beta_dist (g01eec)
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
tail – Nag_TailProbabilityInput
: 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., .
f – doubleInput
On entry: , the value of the variate.
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_PROBAB_CLOSE_TO_TAIL nag_prob_f_dist (g01edc) returns 0.0.
Dynamic memory allocation failed.
On entry, argument had an illegal value.
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
is too far out into the tails for the probability to be evaluated exactly.
The result tends to approach
is large, or
The result returned is a good approximation to the required solution.
On entry, , .
Constraint: and .
On entry, .
The result should be accurate to five significant digits.
For higher accuracy nag_prob_beta_dist (g01eec)
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 (g01edce.c)
9.2 Program Data
Program Data (g01edce.d)
9.3 Program Results
Program Results (g01edce.r)