Sum of squared standard normals

We now generalise from the distribution of a single squared \(\NormalDistn(0, 1)\) variable to the sum of squares of \(k\) independent ones.

Definition

If \(\{Z_1, Z_2, \dots, Z_k\}\) are independent variables with standard normal distributions, then \(Y = \sum_{i=1}^k {Z_i^2}\) is said to have a Chi-squared distribution with \(k\) degrees of freedom,

\[ Y \;\;\sim\;\; \ChiSqrDistn(k\;\text{df}) \]

Since z-scores have a standard normal distribution, this also means that if \(\{X_1, X_2, \dots, X_k\}\) are a random sample from a \(\NormalDistn(\mu, \sigma^2)\), distribution, then

\[ \sum_{i=1}^k \frac{(X_i - \mu)^2}{\sigma^2} \;\;\sim\;\; \ChiSqrDistn(k\;\text{df}) \]

The properties of \(Y\) can be found by noting that

Relationship to the Gamma distribution

The \(\ChiSqrDistn(k\;\text{df})\) distribution is identical to a \(\GammaDistn(\frac k 2, \frac 1 2)\) distribution

\[ \ChiSqrDistn(k\;\text{df}) \;\;\equiv\;\; \GammaDistn(\frac k 2, \frac 1 2) \]

We stated earlier that if \(Y_1 \sim \GammaDistn(\alpha_1,\; \beta)\) and \(Y_2 \sim \GammaDistn(\alpha_2,\; \beta)\) are independent, then

\[ Y_1 + Y_2 \;\;\sim\;\; \GammaDistn(\alpha_1 + \alpha_2,\; \beta) \]

This can be easily generalised to the sum of \(k\) independent \(\GammaDistn(\alpha_i, \beta)\) variables:

\[ \sum_{i=1}^{k} {Y_i} \;\;\sim\;\; \GammaDistn(\sum_{i=1}^{k} {\alpha_i},\; \beta) \]

Since a Chi-squared random variable \(Y\) is the sum of \(k\) independent \(\GammaDistn(\frac 1 2, \frac 1 2)\) variables, it therefore also has a Gamma distribution,

\[ \ChiSqrDistn(k\;\text{df}) \;\;\equiv\;\; \GammaDistn(\frac k 2, \frac 1 2) \]

The Chi-squared distribution's pdf can be found directly from that of the Gamma distribution.

Probability density function

A random variable \(Y \sim \ChiSqrDistn(k\;\text{df})\) has probability density function

\[ f(y) \;=\; \frac 1 {\Gamma({\large\frac k 2}) 2^{\large\frac k 2}} y^{\large{\frac k 2} - 1}e^{\large{-\frac y 2}} \qquad\text{if } y \gt 0 \]

Replacing \(\alpha = \frac k 2\) and \(\beta = \frac 1 2\) in the \(\GammaDistn(\frac k 2, \frac 1 2)\) distribution's pdf gives the pdf of the Chi-squared distribution.