The story
Take independent draws from a standard Normal, square each one and add them up. The result is Chi-squared with degrees of freedom. Squaring makes everything positive, and because each squared term has mean 1 and variance 2, the total has mean and variance .
This is why it appears throughout statistical testing: whenever you add up squared standardised discrepancies, such as in a contingency table, or the squared deviations in a sample variance, a Chi-squared is lurking. For Normal data, follows Chi-squared with degrees of freedom.
Formulas
Support
CDF
Expectation
Variance
Mode
Parameters
| Parameter | What it controls |
|---|---|
| The degrees of freedom: how many squared standard Normals are being added. It is the mean, and the variance is . |
Where it shows up
- The Pearson goodness-of-fit test comparing observed and expected counts.
- Testing for independence in a contingency table.
- Confidence intervals for a population variance.
- The squared distance from the origin of a random point in -dimensional space with independent standard Normal coordinates.
Try this
- Set and shade from 0 to 3.84. The probability is 0.95, which matches the Normal: .
- Step from 1 to 2 to 3. The density at zero goes from infinite, to exactly (the Exponential with rate ), to zero with a hump at . For the mode is always .
- Set , press Draw 1000 and compare the sample variance with . The shape is already fairly close to a Normal with mean 20 and , though still slightly right-skewed.
Related distributions
- It is the sum of squared standard Normals; in particular is Chi-squared with .
- Chi-squared with degrees of freedom is .
- With it is the Exponential with rate .
- If is standard Normal and is an independent , then is Student t with degrees of freedom.