Investment Studio > Expressions > Functions > Statistical > CHIDIST

float chidist(float x, integer degrees_of_freedom, boolean cumulative = TRUE)

Returns the c2 (chi-squared) probability function.

If cumulative = FALSE, x must be >= 0.

degrees_of_freedom must be >= 1.

If cumulative = TRUE, the one-tailed CDF (Cumulative Distribution Function) is returned (equal to the probability of a stochastic variable with c2 distribution being >= x); otherwise, the PDF (Probability Density Function) is returned. If cumulative is omitted, it defaults to TRUE.

Mathematically, the c2 PDF is given by

m = degrees_of_freedom / 2

  xm - 1 e-x / 2
f(x, m) =  ¾¾¾¾¾¾
  G(m) 2m

and the one-tailed CDF is

  ¥  
F(x, m) =  ó f(u, m) du
ô
õ
  x  

The c2 distribution is the distribution of the sum of the squares of degrees_of_freedom independent stochastic variables with standard normal distributions (see normsdist).

Example

The probability of a stochastic variable with c2 distribution and 3 degrees of freedom being >= 1.609 is

=chidist(1.609, 3)

» 65.7%.

See also chi2, chiinv, chitest.