Chapter 11: Probability Distribution Functions and Inverses > non_central_F_inverse_cdf

non_central_F_inverse_cdf

Evaluates the inverse of the noncentral F cumulative distribution function (CDF).

Synopsis

#include <imsls.h>

float imsls_f_non_central_F_inverse_cdf (float p, float df_numerator, float df_denominator  float lambda)

The type double function is imsls_d_non_central_F_inverse_cdf.

Required Arguments

float p   (Input)
Probability for which the inverse of the noncentral F cumulative distribution function is to be evaluated. p must be non-negative and less than one.

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 inverse of the noncentral F distribution function evaluated at p. The probability that a noncentral F random variable takes a value less than or equal to imsls_f_non_central_F_inverse_cdf is p.

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 that is statistically independent of X, then

is a noncentral F-distributed random variable whose cumulative distribution function p = CDF(f, ν1, ν2, λ) is defined as the probability p that F < f and is evaluated using function imsls_f_non_central_F_cdf (f, df_numerator, df_denominator, lambda), where ν1 df_numerator, ν2 df_denominator, λ = lambda, and p = p.

Function imsls_f_non_central_F_inverse_cdf evaluates

Function imsls_f_non_central_F_inverse_cdf uses bisection and modified regula falsi search algorithms to invert the distribution function CDF(f, ν1, ν2, λ).  For sufficiently small p, an accurate approximation of CDF-1(p, ν1, ν2, λ) can be used which requires no such inverse search algorithms.

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 and for each value of f prints fp==CDF(f), and CDF-1(p).

 

#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.0, df_denominator = 10.0;

    float lambda =10.0, cdfv, cdfiv;

 

    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     p = cdf(f)   cdfinv(p)\n\n");

 

    for (i=0; i<8; i++) {

        cdfv = imsls_f_non_central_F_cdf

            (f[i], df_numerator, df_denominator, lambda);

        cdfiv = imsls_f_non_central_F_inverse_cdf

            (cdfv, df_numerator, df_denominator, lambda);

        printf (" %5.1f  %12.4e  %7.3f\n", f[i], cdfv, cdfiv);

    }

}

Output

 

 df_numerator:    100

 df_denominator:   10

 lambda:           10

 

    f     p = cdf(f)   cdfinv(p)

 

   0.0   0.0000e+000    0.000

   0.4   4.8879e-003    0.400

   0.8   2.0263e-001    0.800

   1.2   5.2114e-001    1.200

   1.6   7.3385e-001    1.600

   2.0   8.5041e-001    2.000

   2.8   9.4713e-001    2.800

   4.0   9.8536e-001    4.000


RW_logo.jpg
Contact Support