Definition – Chi-Square distribution.

Page contents
1. Definition

Definition

Recall the definition of the normal distribution,

p(Z=x) = \frac{1}{\sigma\sqrt{2\pi }} e^{-\frac{1}{2} (\frac{z-\mu}{\sigma})^2}

We define the chi-square distribution to be the distribution of the sum of n\in\mathbb{N} iid standard normal variables.

That is,

\sum_{i=0}^n Z_i = Z_1 + ... + Z_n = Y

follows a \chi_n^2 distribution. The pdf of the Chi-square distribution is given by

p_Y(y) = \frac{1}{2^{\frac{n}{2}}\Gamma(\frac{n}{2})}y^{\frac{n}{2}-1}e^{-\frac{1}{2} y}

Derivation

Now we have defined the distribution, we now need its pdf. This derivation we will make use of the gamma distribution, and the fact that for X_1 \sim Gamma(\alpha_1,\beta) and X_2 \sim Gamma(\alpha_2,\beta),

X_1 + X_2 \sim Gamma(\alpha_1 + \alpha_2,\beta).

Let Z \sim N(0,1). Then, for a bijective function g(Z)=Z^2=Y, the pdf p_Y(y) can be written as

p_Y(y) = p_X(g^{-1}(y)) |\frac{dg^{-1}(y)}{dy}|.

(This is true for any distribution). For the the case of n=1, we have that if Z\sim N(0,1), then as g(Z) = Z^2 is bijective for x>0, and we have via the above formula,

p_Y(y) = p_X(\sqrt{y}) |\frac{-1}{2\sqrt{y}}|.

Inserting \sqrt{y} into the pdf for Z, we have, that

p_Y(y) =  \frac{1}{\sqrt{2\pi }} e^{-\frac{\sqrt{y^2}}{2}}  |\frac{-1}{2\sqrt{y}}| \\\\ =  \frac{1}{\sqrt{2\pi y}} e^{-\frac{y}{2}}  \frac{1}{2}.

But for x<0, we obtain the exact same function. Thus, for each g(z) = z^2 = y, we have that either z = \pm y. But as the normal distribution is symmetrical around 0, we have that their probabilities are equal, so multiplying p_Y(y) by two gives

p_Y(y) = \frac{1}{\sqrt{2\pi y}} e^{-\frac{y}{2}} \quad (1)

Now recall the pdf for the gamma distribution,

p(X=x) = \frac{\beta^\alpha}{\Gamma (\alpha)}x^{\alpha -1}e^{-\beta x} .

Comparing terms, we can see that (1) is a gamma distribution, Gamma(\frac{1}{2},\frac{1}{2}).

Finally, to complete the derivation, recall that for n gamma distributed, iid, random variables \{X_1, ..., X_n \}, with each X_i \sim Gamma(\alpha,\beta),

\sum_{i=1}^n X_i \sim Gamma(n\alpha,\beta).

Thus, because the pdf (1) is a gamma distribution, for the sum of n standard normal variables, we need simply replace the first parameter with \frac{n}{2} rather than \frac{1}{2}. Doing so yields the pdf for the Chi-square distribution,

\frac{ (\frac{1}{2})^\frac{n}{2}}{\Gamma (\frac{n}{2})}x^{\frac{n}{2}-1}e^{-\frac{1}{2} x} = \frac{1}{2^{\frac{n}{2}}\Gamma(\frac{n}{2})}x^{\frac{n}{2}-1}e^{-\frac{1}{2} x} .

Thus, the Chi-square pdf is

\frac{1}{2^{\frac{n}{2}}\Gamma(\frac{n}{2})}x^{\frac{n}{2}-1}e^{-\frac{1}{2} x}