Chi-square distribution (from http://www.math.wm.edu/˜ leemis/chart/UDR/UDR.html ) The shorthand X ∼ χ^{2}(n) is used to indicate that the random variable X has the chi-square distribution with positive real-valued parameter n, which is known as the degrees of freedom. In most applications, n is a positive integer. A chi-square random variable X with n degrees of freedom has probability density function

f(x) = \frac{x^{n/2−1} e^{−x/2}}{2^{n/2}Γ(n/2)} x > 0,

for n = 1, 2, .... The chi-square distribution is used for inference concerning observations drawn from an exponential population and in determining the critical values for the chi-square goodnessof-fit test. The probability density function with n = 1, 2, and3 is illustrated below.

PSfrag replacements

n = 1
n = 2
n = 3
x
f(x)

The cumulative distribution function on the support of X is

F (x) = P(X ≤ x) = \frac{Γ(n/2, x/2)}{Γ(n/2)} x > 0.

The survivor function on the support of X is

S(x) = P(X ≥ x) = 1 − \frac{Γ(n/2, x/2)}{Γ(n/2)} x > 0.

The hazard function h(x) = f(x)/S(x) and the cumulative hazard function H(x) = −lnS(x) can be written in terms of the gamma and incomplete gamma functions. The inverse distribution function of X can’t be expressed in closed form (except when n = 2). The mode of X is

max{n − 2,0} n > 2.

The moment generating function of X is

M(t) = E [e^{tX}] = (1 − 2t)^{−n/2} t < 1/2.

The characteristic function of X is

ϕ(t) = E [e^{itX}] = (1 − 2it)^{−n/2} t < 1/2.

The population mean, variance, skewness, and kurtosis of X are

E[X] = n  V [X] = 2n  E [( \frac{X − μ}{σ} ) ^{3}] = \sqrt{8/n}  E [( \frac{X − μ}{σ} ) ^{4}] = 3+ \frac{12}{n}.

APPL verification: The APPL statements

X := ChiSquareRV(n); CDF(X); SF(X); Mean(X); Variance(X); Skewness(X); Kurtosis(X); MGF(X);

verify the cumulative distribution function, survivor function, population mean, variance, skewness, kurtosis, and moment generating function.