complementary_non_central_F_cdf
Evaluates the complementary noncentral F cumulative distribution function (CDF).
Synopsis
#include <imsls.h>
float imsls_f_complementary_non_central_F_cdf (float f, float df_numerator, float df_denominator, float lambda)
The type double function is imsls_d_complementary_non_central_F_cdf.
Required Arguments
float f (Input)
Argument for which the complementary noncentral F cumulative distribution function is to be evaluated. f must be non-negative.
float df_numerator (Input)
Numerator degrees of freedom of the complementary noncentral F distribution. df_numerator must be positive.
float df_denominator (Input)
Denominator degrees of freedom of the complementary 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 greater than 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, denoted by F(⋅), 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 series approximation of the complementary (cmp) noncentral F CDF, denoted by F(⋅), is obtainable by using the following identities:
Thus:
The correspondence between the arguments of function imsls_f_complementary_non_central_F_cdf and the variables in the above equations is as follows: ν1 = df_numerator, ν2 = df_denominator, λ = lambda, and f = f.
Also, we can use the above expansion of and the identities:
to recursively calculate .
For λ = 0, the noncentral F distribution is the same as the F distribution.
Example
This example traces out a portion of a complementary 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.0, 0.4, 0.8, 1.2, 1.6, 2.0, 2.8, 4.0};
float df_numerator = 100.0, df_denominator = 10.0;
float lambda =10.0, cmpcdfv;
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 cmpCDF(f)\n\n");
for (i=0; i<8; i++) {
cmpcdfv = imsls_f_complementary_non_central_F_cdf
(f[i], df_numerator, df_denominator, lambda);
printf (" %5.1f %12.4e \n", f[i], cmpcdfv);
}
}
Output
df_numerator: 100
df_denominator: 10
lambda: 10
f cmpCDF(f)
0.0 1.0000e+000
0.4 9.9511e-001
0.8 7.9737e-001
1.2 4.7886e-001
1.6 2.6615e-001
2.0 1.4959e-001
2.8 5.2875e-002
4.0 1.4642e-002