Chi2inv

Definition:

xp = chi2inv( p, df) computes the inverse of the \chi^2 cdf for the corresponding probabilities in X with parameters specified by \nu.

The deviate,x_p, associated with the lower tail probability p of the \chi^2 distribution with degrees of freedom is defined as the solution to

 P(X\leq x_p)=p=\frac 1{2^{\nu /2}\Gamma (\nu /2)}\int_0^{x_p}X^{\nu /2-1}e^{X/2}dX

where

  x_p\geq 0;\nu >0

Parameters:

p (input, double)
the probability, p, from the required \chi^2 distribution. 0 \le p<1
df (input,double)
the degrees of freedom, \nu , of the \chi^2 distribution, df>0.
xp (output, double)
the deviate,x_p.