Fiveable

📊Honors Statistics Unit 10 Review

QR code for Honors Statistics practice questions

10.2 Two Population Means with Known Standard Deviations

10.2 Two Population Means with Known Standard Deviations

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
📊Honors Statistics
Unit & Topic Study Guides
Pep mascot

Hypothesis Testing for Two Population Means with Known Standard Deviations

When you want to know whether two groups truly differ on some measurement, you need more than just eyeballing the sample averages. The two-sample z-test gives you a formal way to decide whether an observed difference between two group means is statistically significant or likely just sampling variability. This test applies specifically when the population standard deviations are already known, which is uncommon in practice but forms the foundation for understanding more general two-sample procedures.

Pep mascot
more resources to help you study

Test Statistic for Two Population Means

The z-test statistic measures how far the observed difference between sample means falls from the hypothesized difference, scaled by the standard error. Here's the formula:

z=(xˉ1xˉ2)(μ1μ2)σ12n1+σ22n2z = \frac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}}

Each component:

  • xˉ1\bar{x}_1 and xˉ2\bar{x}_2: the sample means from group 1 and group 2
  • μ1μ2\mu_1 - \mu_2: the hypothesized difference between the population means (often 0, meaning "no difference")
  • σ1\sigma_1 and σ2\sigma_2: the known population standard deviations for each group
  • n1n_1 and n2n_2: the sample sizes drawn from each population

The numerator captures how far the observed difference is from what you'd expect under H0H_0. The denominator is the standard error of the difference, which accounts for variability in both groups and both sample sizes. A larger z|z| means the observed difference is harder to explain by chance alone.

Test statistic for population means, Comparing two means – Learning Statistics with R

Sampling Distribution of the Difference in Means

The quantity xˉ1xˉ2\bar{x}_1 - \bar{x}_2 has its own sampling distribution. When the population standard deviations are known, this distribution is normal (not approximately normal) if both populations are normal. If the populations aren't normal, the Central Limit Theorem still makes the distribution approximately normal as long as both sample sizes are large (n130n_1 \geq 30 and n230n_2 \geq 30).

Two key properties of this distribution:

  • Mean: μxˉ1xˉ2=μ1μ2\mu_{\bar{x}_1 - \bar{x}_2} = \mu_1 - \mu_2
  • Standard error: σxˉ1xˉ2=σ12n1+σ22n2\sigma_{\bar{x}_1 - \bar{x}_2} = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}

These hold as long as the two samples are independent, meaning the selection of individuals in one sample doesn't influence the other.

Test statistic for population means, Estimating the Difference in Two Population Means | Concepts in Statistics

Conducting the Hypothesis Test

Step 1: State the hypotheses.

  • Null hypothesis: H0:μ1μ2=d0H_0: \mu_1 - \mu_2 = d_0 (where d0d_0 is the hypothesized difference, usually 0)
  • Alternative hypothesis (pick one based on the research question):
    • Two-tailed: Ha:μ1μ2d0H_a: \mu_1 - \mu_2 \neq d_0
    • Left-tailed: Ha:μ1μ2<d0H_a: \mu_1 - \mu_2 < d_0
    • Right-tailed: Ha:μ1μ2>d0H_a: \mu_1 - \mu_2 > d_0

Step 2: Choose a significance level α\alpha (commonly 0.05 or 0.01).

Step 3: Calculate the test statistic using the z-formula above.

Step 4: Find the critical value(s) or p-value.

Test typeCritical value(s)P-value calculation
Two-tailed±zα/2\pm z_{\alpha/2}2P(Z>z)2P(Z > \|z\|)
Left-tailedzα-z_{\alpha}P(Z<z)P(Z < z)
Right-tailedzαz_{\alpha}P(Z>z)P(Z > z)
Step 5: Make your decision and interpret.
  • Critical value approach: Reject H0H_0 if the test statistic falls in the rejection region (beyond the critical value). Otherwise, fail to reject H0H_0.
  • P-value approach: Reject H0H_0 if the p-value is less than α\alpha. Otherwise, fail to reject H0H_0.

Always state your conclusion in context. For example: "At the 0.05 significance level, there is sufficient evidence to conclude that the mean test score for School A differs from that of School B."

Worked Example

Suppose you're comparing average SAT math scores between two school districts. You know σ1=40\sigma_1 = 40 and σ2=35\sigma_2 = 35. You collect samples of n1=50n_1 = 50 and n2=45n_2 = 45 students, finding xˉ1=520\bar{x}_1 = 520 and xˉ2=505\bar{x}_2 = 505. Test whether the means differ at α=0.05\alpha = 0.05.

  1. H0:μ1μ2=0H_0: \mu_1 - \mu_2 = 0 vs. Ha:μ1μ20H_a: \mu_1 - \mu_2 \neq 0

  2. α=0.05\alpha = 0.05

  3. Calculate the test statistic:

z=(520505)040250+35245=15160050+122545=1532+27.22=1559.22=157.6961.95z = \frac{(520 - 505) - 0}{\sqrt{\frac{40^2}{50} + \frac{35^2}{45}}} = \frac{15}{\sqrt{\frac{1600}{50} + \frac{1225}{45}}} = \frac{15}{\sqrt{32 + 27.22}} = \frac{15}{\sqrt{59.22}} = \frac{15}{7.696} \approx 1.95

  1. For a two-tailed test at α=0.05\alpha = 0.05, the critical values are ±1.96\pm 1.96. The p-value is 2P(Z>1.95)2(0.0256)=0.05122P(Z > 1.95) \approx 2(0.0256) = 0.0512.
  2. Since z=1.95<1.96|z| = 1.95 < 1.96 (or equivalently, p-value=0.0512>0.05p\text{-value} = 0.0512 > 0.05), you fail to reject H0H_0. There is not sufficient evidence at the 0.05 level to conclude the mean SAT math scores differ between the two districts.

Notice how close this was to the boundary. A slightly larger sample or a slightly bigger difference would have tipped the result the other way.

Additional Considerations

Confidence intervals offer a complementary perspective. A (1α)×100%(1 - \alpha) \times 100\% confidence interval for μ1μ2\mu_1 - \mu_2 is:

(xˉ1xˉ2)±zα/2σ12n1+σ22n2(\bar{x}_1 - \bar{x}_2) \pm z_{\alpha/2} \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}

If this interval contains 0 (when testing d0=0d_0 = 0), you'd fail to reject H0H_0, consistent with the hypothesis test.

Why z and not t? This procedure uses the z-distribution because the population standard deviations are known. When σ1\sigma_1 and σ2\sigma_2 are unknown and estimated from the samples, you switch to a t-test, which accounts for the extra uncertainty in estimating those parameters. Degrees of freedom become relevant in that t-test setting, not here.