Topic contents

Lesson 9

Hypothesis tests for a population variance

Explore variability in data, learn about the χ² distribution, and complete a variance test

Test settings

Try it

Explore variability in the data

The means may be the same while the variability differs

For example, two production lines both have a mean product net content close to 500 g, but product weights are more concentrated on one line and more variable on the other. Population variance σ² describes this variability.

490495500505510gSame mean: 500 g498498.5499499.4499.8500500.2500.6501501.5502
The two data sets have the same center but different spreads. This plot illustrates variance; it is not used directly in the χ² test calculation.

What are we testing?

Suppose a production line's population variance should be 4 g². We can state:

H₀: σ² = 4 H₁: σ² ≠ 4

Question: is the difference between the sample variance and 4 g² too large to explain by sampling variability alone?
This lesson uses the χ² variance test for a single normal population. Its main condition is an independent random sample from a normal population; substantial departures from normality may make this χ² test unreliable.

Test settings

Try it

Why does a test for a population variance use the χ² distribution?

For independent observations from a normal population, the standardized sample variance follows a χ² distribution. It takes only nonnegative values and is usually right-skewed, rather than symmetric like the standard normal distribution.

0510152025χ²16.92
Drag the sample size slider: as the degrees of freedom increase, the distribution moves to the right and gradually becomes more symmetric. The χ² statistic still cannot be negative.
Sample size n
10
Degrees of freedom df
9
Right-tail 5% critical value
16.92

Statistic for a population variance χ² test

χ2=(n−1)s2σ02\chi^2=\frac{(n-1)s^2}{\sigma_0^2}

Here, n is the sample size, s² is the sample variance, and σ₀² is the variance specified by the null hypothesis.

Key observation: n−1 degrees of freedom determine the shape of the χ² distribution. The critical values for the two tail rejection regions shown later are usually asymmetric.

Test settings

Try it

Choose an example and test direction

Write the formula, then substitute the sample data

Unlike a mean test, this test compares the sample variance s² with the population variance σ₀² specified by the null hypothesis.

Does the population variance of product net content differ from 4 g²?

H₀: σ² = 4

H₁: σ² ≠ 4

  1. Original formula
    χ2=(n−1)s2σ02\chi^2=\frac{(n-1)s^2}{\sigma_0^2}
  2. Substitute the example values
    χ2=(20−1)×6.04=19×6.04≈28.500\chi^2=\frac{(20-1)\times 6.0}{4}=\frac{19\times 6.0}{4}\approx 28.500
Sample size n
20
Degrees of freedom df
19
χ² statistic
28.500
A larger χ² statistic indicates a larger sample variance relative to the hypothesized value; a smaller χ² indicates a relatively smaller variance. Whether to reject H₀ also depends on the test direction and critical values.

Test settings

Try it

Choose an example and test direction
Significance level α

Same χ² distribution: test direction determines the rejection region

Switch between two-sided, right-tailed, and left-tailed tests, then change α to observe the shaded rejection regions and critical values. The two critical values for a two-sided test are not symmetric positive and negative values.

Does the population variance of product net content differ from 4 g²?

H₀: σ² = 4

H₁: σ² ≠ 4

010203040χ²8.90732.85
  • χ² distribution
  • Rejection region
  • Critical value
For a two-sided test, each tail has area α/2; for a one-sided test, one tail has area α. Shading under the curve follows the actual χ² distribution areas.
Degrees of freedom df
19
Significance level α
0.05
Critical value
8.907 / 32.85
χ² < 8.907 or χ² > 32.85: reject H₀; fail to reject H₀ in the middle region.

Test settings

Try it

Choose an example and test direction
Significance level α

Complete a hypothesis test for a population variance

Choose an example, drag the sample variance, and change α. Observe how the two decision methods from z-tests apply to χ² tests: the critical-value and p-value methods should agree.

Does the population variance of product net content differ from 4 g²?

H₀: σ² = 4

H₁: σ² ≠ 4

010203040χ²8.90732.852χ² = 28.500
  • χ² distribution
  • Sample χ² position
  • Rejection region
  • Critical value
The blue region is the rejection region determined by α, and the dotted line marks the sample χ² statistic. The p-value uses the same test direction; the two-sided p-value is twice the smaller tail probability, capped at 1.

Original formula → numerical substitution

χ2=(n−1)s2σ02\chi^2=\frac{(n-1)s^2}{\sigma_0^2}
χ2=(20−1)×6.04=19×6.04≈28.500\chi^2=\frac{(20-1)\times 6.0}{4}=\frac{19\times 6.0}{4}\approx 28.500
χ² statistic
28.500
p-value
0.1485
Significance level α
0.05

P > α → fail to reject H₀. P = 0.1485; α = 0.05. The sample evidence is insufficient to reject the null hypothesis; this does not prove H₀.

Test settings

Explore smaller spread