01 / 20
\( \chi^2 \)

The Chi-Square
Distribution

Discover how sums of squared standard normals create one of the most important distributions in statistics: from goodness-of-fit tests to confidence intervals for variance.

College Statistics

What Is the Chi-Square Distribution?

The chi-square distribution (written \( \chi^2 \)) arises whenever you sum the squares of independent standard normal random variables. If \( Z_1, Z_2, \ldots, Z_k \) are independent with \( Z_i \sim N(0,1) \), then:

The single parameter \( k \) (degrees of freedom) completely determines the shape, center, and spread of the distribution.

Why Chi-Square Matters

Goodness-of-Fit
Test whether observed frequencies match a hypothesized distribution.
Independence Tests
Determine whether two categorical variables are associated in a contingency table.
Variance Inference
Build confidence intervals and run hypothesis tests for a population variance \( \sigma^2 \).

Shape Across Degrees of Freedom

The PDF Formula

\( k \)
Degrees of freedom: a positive integer that controls shape.
\( \Gamma(\cdot) \)
The Gamma function: extends factorials to real numbers, \( \Gamma(n) = (n-1)! \) for integers.
\( e^{-x/2} \)
Exponential decay ensures the tail drops off, keeping total area equal to 1.

You rarely compute this by hand: instead, you use chi-square tables or software to find critical values and p-values.

Key Properties

1
Mean: \( E[X] = k \). The center equals the degrees of freedom.
2
Variance: \( \text{Var}(X) = 2k \). Spread grows with \( k \).
3
Skewness: \( \sqrt{8/k} \). Decreases as \( k \) increases, so the distribution becomes more symmetric.
4
Additivity: If \( X_1 \sim \chi^2(k_1) \) and \( X_2 \sim \chi^2(k_2) \) are independent, then \( X_1 + X_2 \sim \chi^2(k_1 + k_2) \).
5
Non-negative: Since it is a sum of squares, \( X \geq 0 \) always.

\( \chi^2 \) vs Normal vs \( t \)

\( \chi^2(k) \) \( N(\mu, \sigma^2) \) \( t(k) \)
Support \( [0, \infty) \) \( (-\infty, \infty) \) \( (-\infty, \infty) \)
Symmetry Right-skewed Symmetric Symmetric
Parameters \( k \) \( \mu, \sigma^2 \) \( k \)
Mean \( k \) \( \mu \) \( 0 \) (for \( k > 1 \))
Variance \( 2k \) \( \sigma^2 \) \( \frac{k}{k-2} \) (for \( k > 2 \))
Built from Sum of \( Z_i^2 \) Fundamental \( Z / \sqrt{\chi^2/k} \)

How to Use the \( \chi^2 \) Table

1
Determine \( k \): Identify the degrees of freedom for your test (e.g., number of categories minus 1).
2
Choose \( \alpha \): Select your significance level (commonly \( 0.05 \) or \( 0.01 \)).
3
Find the critical value: Look up \( \chi^2_{\alpha, k} \) in the table: the row is \( k \), the column is \( \alpha \).
4
Compute the test statistic: Calculate \( \chi^2 = \sum \frac{(O_i - E_i)^2}{E_i} \) from your data.
5
Compare and decide: If \( \chi^2_{\text{obs}} > \chi^2_{\alpha, k} \), reject \( H_0 \). Otherwise, fail to reject.

Example 1: Fair Die?

A die is rolled 60 times. Under a fair die, each face has expected count \( E_i = 10 \). The observed counts are:

Face 1 2 3 4 5 6
Observed 8 12 7 14 9 10

Example 2: Independence Test

A survey asks 200 students about study method (Flashcards vs. Practice Problems) and exam result (Pass vs. Fail). We want to test whether method and outcome are independent.

Pass Fail Total
Flashcards 50 30 80
Practice 90 30 120
Total 140 60 200

Example 3: Confidence Interval for \( \sigma^2 \)

A sample of \( n = 25 \) measurements has sample variance \( s^2 = 12 \). Build a 95% confidence interval for the population variance \( \sigma^2 \).

Visualizing the Critical Region

Understanding Degrees of Freedom

The parameter \( k \) has a concrete meaning: it is the number of independent pieces of information that go into the sum of squares.

Goodness-of-Fit
\( k = c - 1 \) where \( c \) is the number of categories.
Independence
\( k = (r-1)(c-1) \) for an \( r \times c \) contingency table.
Variance Test
\( k = n - 1 \) where \( n \) is the sample size.

The Additivity Property

Common Mistakes

✕ Wrong df
Using \( n \) instead of \( n - 1 \) for a variance test, or forgetting to subtract estimated parameters in goodness-of-fit.
✕ Small Expected Counts
Applying the \( \chi^2 \) test when any \( E_i < 5 \). The approximation breaks down: combine categories or use Fisher's exact test.
✕ Using Proportions
Plugging in percentages instead of raw counts into the formula. Always use actual frequencies, not proportions.

Summary at a Glance

Property Value / Rule
Definition Sum of \( k \) squared standard normals
Parameter \( k \) (degrees of freedom)
Support \( [0, \infty) \)
Mean \( k \)
Variance \( 2k \)
Skewness \( \sqrt{8/k} \) (right-skewed)
Additivity \( \chi^2(k_1) + \chi^2(k_2) = \chi^2(k_1 + k_2) \)
Test Statistic \( \chi^2 = \sum \frac{(O_i - E_i)^2}{E_i} \)

Question 1 of 5

If \( X \sim \chi^2(10) \), what is \( E[X] \)?

Question 2 of 5

What is the variance of a \( \chi^2(7) \) distribution?

Question 3 of 5

In a goodness-of-fit test with 4 categories and no estimated parameters, how many degrees of freedom are there?

Question 4 of 5

If \( X_1 \sim \chi^2(4) \) and \( X_2 \sim \chi^2(6) \) are independent, what is the distribution of \( X_1 + X_2 \)?

Question 5 of 5

A chi-square goodness-of-fit test yields \( \chi^2 = 15.3 \) with \( k = 5 \). The critical value at \( \alpha = 0.05 \) is \( 11.07 \). What is the conclusion?