CNLMath : Special Functions : F_inverse_cdf
F_inverse_cdf
Evaluates the inverse of the F distribution function.
Synopsis
#include <imsl.h>
float imsl_f_F_inverse_cdf (float p, float df_numerator, float df_denominator)
The type double procedure is imsl_d_F_inverse_cdf.
Required Arguments
float p (Input)
Probability for which the inverse of the F distribution function is to be evaluated. The argument p must be in the open interval (0.0, 1.0).
float df_numerator (Input)
Numerator degrees of freedom. Argument df_numerator must be positive.
float df_denominator (Input)
Denominator degrees of freedom. Argument df_denominator must be positive.
Return Value
The value of the inverse of the F distribution function evaluated at p. The probability that an F random variable takes a value less than or equal to imsl_f_F_inverse_cdf is p.
Description
The function imsl_f_F_inverse_cdf evaluates the inverse distribution function of a Snedecor’s F random variable with ν1 = df_numerator numerator degrees of freedom and ν2 = df_denominator denominator degrees of freedom. The function is evaluated by making a transformation to a beta random variable and then by evaluating the inverse of an incomplete beta function. If X is an F variate with ν1 and ν2 degrees of freedom and Y = (ν1X)/(ν2 + ν1 X), then Y is a beta variate with parameters p = ν1/2 and q = ν2/2. If P  0.5, imsl_f_F_inverse_cdf uses this relationship directly; otherwise, it also uses a relationship between F random variables that can be expressed as follows:
FF(fν1ν2) = 1  FF(1/fν2 , ν1)
Example
In this example, the 99-th percentage point is calculated for an F random variable with seven degrees of freedom. The same calculation is made for a similar variable with one degree of freedom.
 
#include <imsl.h>
#include <stdio.h>
 
int main()
{
float df_denominator = 1.0;
float df_numerator = 7.0;
float f;
float p = 0.99;
 
f = imsl_f_F_inverse_cdf(p, df_numerator, df_denominator);
printf("The F(7,1) 0.01 critical value is %6.3f\n", f);
}
Output
 
The F(7,1) 0.01 critical value is 5928.370
Fatal Errors
IMSL_F_INVERSE_OVERFLOW
Function imsl_f_F_inverse_cdf is set to machine infinity since overflow would occur upon modifying the inverse value for the F distribution with the result obtained from the inverse beta distribution.