non_central_F_cdf
Evaluates the noncentral F cumulative distribution function (CDF).
Synopsis
#include <imsls.h>
float imsls_f_non_central_F_cdf (float f, float df_numerator, float df_denominator, float lambda)
The type double function is imsls_d_non_central_F_cdf.
Required Arguments
float f (Input)
Argument for which the noncentral F cumulative distribution function is to be evaluated. f must be non-negative.
float df_numerator (Input)
Numerator degrees of freedom of the noncentral F distribution. df_numerator must be positive.
float df_denominator (Input)
Denominator degrees of freedom of the noncentral F distribution. df_denominator must be positive.
float lambda (Input)
Noncentrality parameter. lambda must be non-negative.
Return Value
The probability that a noncentral F random variable takes a value less than or equal to f.
Description
If X is a noncentral chi-square random variable with noncentrality parameter λ and ν1 degrees of freedom, and Y is a chi-square random variable with ν2 degrees of freedom which is statistically independent of X, then
is a noncentral F-distributed random variable whose CDF is given by:
where:
and
Γ (
⋅) is the gamma function. The above series expansion for the noncentral
F CDF was taken from Butler and Paolella (1999) (see
Paolella.pdf), with the correction for the recursion relation given below
:extracted from the AS 63 algorithm for calculating the incomplete beta function as described by Majumder and Bhattacharjee (1973).
The correspondence between the arguments of function imsls_f_non_central_F_cdf and the variables in the above equations is as follows: ν1 = df_numerator, ν2 = df_denominator, λ = lambda, and f = f.
For λ = 0, the noncentral F distribution is the same as the F distribution.
Example
This example traces out a portion of a noncentral F cumulative distribution function with parameters df_numerator = 100, df_denominator = 10, and lambda = 10.
#include <imsls.h>
#include <stdio.h>
int main()
{
int i;
float f[] = {0., .4, .8, 1.2, 1.6, 2.0, 2.8, 4.0};
float df_numerator = 100., df_denominator = 10., lambda =10., cdfv;
printf ("\n df_numerator: %4.0f\n", df_numerator);
printf (" df_denominator: %4.0f\n", df_denominator);
printf (" lambda: %4.0f\n\n", lambda);
printf (" f CDF(f)\n\n");
for (i=0; i<8; i++) {
cdfv = imsls_f_non_central_F_cdf
(f[i], df_numerator, df_denominator, lambda);
printf (" %5.1f %12.4e \n", f[i], cdfv);
}
}
Output
df_numerator: 100
df_denominator: 10
lambda: 10
f cdf(f)
0.0 0.0000e+000
0.4 4.8879e-003
0.8 2.0263e-001
1.2 5.2114e-001
1.6 7.3385e-001
2.0 8.5041e-001
2.8 9.4713e-001
4.0 9.8536e-001