IMSL C# Numerical Library

Cdf.InverseNoncentralchi Method 

Evaluates the inverse of the noncentral chi-squared cumulative probability distribution function.

public static double InverseNoncentralchi(
   double p,
   double df,
   double alam
);

Parameters

p
A double scalar value representing the probability for which the inverse noncentral chi-squared distribution function is to be evaluated. p must be in the open interval (0.0, 1.0).
df
A double scalar value representing the number of degrees of freedom. This must be at least 0.5. but less than or equal to 200,000.
alam
A double scalar value representing the noncentrality parameter. This must be nonnegative, and alam + df must be less than or equal to 200,000.

Return Value

A double scalar value. The probability that a noncentral chi-squared random variable takes a value less than or equal to this returned value is p.

Remarks

Method InverseNoncentralchi evaluates the inverse distribution function of a noncentral chi-squared random variable with df degrees of freedom and noncentrality parameter alam, that is, with P = p, \nu = {\rm df}, and \lambda = {\rm alam}, it determines c_{0} = InverseNoncentralchi(p, df, alam)), such that

P = \sum\limits_{i = 0}^\infty {\frac{e^{-\lambda/2}\left(\lambda/2\right)^i}{i!}} 
            \int_0^{c_{0}} {\frac{x^{\left(\nu + 2i\right)/2-1}e^{ - x/2}} {2^{\left(\nu+2i\right)/2}{\Gamma\left(\frac{\nu+2i}{2}\right)}}}
            dx

where \Gamma (\cdot) is the gamma function. The probability that the random variable takes a value less than or equal to c_{0} is P.

Method InverseNoncentralchi uses bisection and modified regula falsi to invert the distribution function, which is evaluated using noncentralchi. See Noncentralchi for an alternative definition of the noncentral chi-squared random variable in terms of normal random variables.

See Also

Cdf Class | Imsl.Stat Namespace | Example