---
title: "Two means. One difference. | FiveStudy"
description: "A factory runs two assembly lines that build the same part. Line A takes a mean of 46 seconds per unit. Line B takes 44 seconds. Each line has standard deviation 10 seconds. A supervisor times 50 rand"
url: https://fivestudy.com/guides/apstats-4-6-sampling-distribution-of-xbar-difference
---

[AP Statistics](https://fivestudy.com/ap-statistics) · Study guide

# Two means. One difference.

[Figure: FiveStudy]

FiveStudy

AP® Statistics · Unit 4 · Inference for Quantitative Data: Means

AP® Statistics · Unit 4 · Inference for Quantitative Data: Means

# The Sampling Distribution of a *Difference* in Means

How the difference between two sample means varies: its center (μ₁ − μ₂), its spread, when it is approximately normal, and how to find and interpret probabilities about it.

1. Center and spread 2. Conditions and shape 3. Probabilities

The idea in one paragraph

Take a random sample from each of two independent populations and subtract the sample means. Repeated many times, the differences \(\bar{x}_1 - \bar{x}_2\) center at \(\mu_1 - \mu_2\) and have standard deviation \(\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}\): the variances add, even though the means subtract. The distribution is normal when both populations are normal, and approximately normal when both samples have at least 30.

## 1 Center and spread

For two independent populations with means \(\mu_1\), \(\mu_2\) and standard deviations \(\sigma_1\), \(\sigma_2\), when the sampled values are independent,

\[ \mu_{\bar{x}_1 - \bar{x}_2} = \mu_1 - \mu_2 \qquad\qquad \sigma_{\bar{x}_1 - \bar{x}_2} = \sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}} \]

**Figure 1.** The difference in sample means is centered at the difference in population means, 24 − 19 = 5 minutes. It varies more than either sample mean because both sources of variation add.

Worked Example 1 Center and spread

### Commute times

At School A, commute times have mean 24 minutes and standard deviation 8 minutes; at School B, mean 19 and standard deviation 6. Independent random samples of 40 School A students and 45 School B students are taken. Find and interpret the mean and standard deviation of the sampling distribution of \(\bar{x}_A - \bar{x}_B\).

1. 1Mean: \(\mu_{\bar{x}_A - \bar{x}_B} = \mu_A - \mu_B = 24 - 19 = 5\) minutes.
2. 2Standard deviation: \(\sqrt{\dfrac{8^2}{40} + \dfrac{6^2}{45}} = \sqrt{1.6 + 0.8} = \sqrt{2.4} \approx 1.549\) minutes.

**Answer:** In repeated random samples of 40 School A students and 45 School B students, the difference in sample mean commute times (A − B) would average 5 minutes and typically vary by about 1.55 minutes from 5.

Common Mistake 1 · Adding the standard deviations

\(1.265 + 0.894 = 2.16\) overstates the spread. Square each standard deviation, add the variances (1.6 + 0.8 = 2.4), then take the square root: 1.549.

Common Mistake 2 · Subtracting the variances because the means subtract

The difference of two independent random quantities is *more* variable than either one, never less. The plus sign under the square root stays a plus sign.

## 2 Conditions and shape

| Condition | Check |
| --- | --- |
| Randomization | Two independent random samples, or random assignment of treatments in an experiment |
| 10% condition | \(n_1 \le 10\%N_1\) and \(n_2 \le 10\%N_2\) when sampling without replacement (not needed for an experiment) |
| Shape | Normal if both populations are normal; approximately normal if \(n_1 \ge 30\) and \(n_2 \ge 30\) |

**Figure 2.** Commute times are skewed right, but with both samples of at least 30 the simulated differences follow the normal model closely. 27 of 1,000 differences were 2 minutes or less, close to the model’s 0.0264.

Worked Example 2 Data from an experiment

### Two study methods

A teacher randomly assigns 60 volunteers to two study methods, 30 each, and compares mean quiz scores. Which conditions apply to the sampling distribution of \(\bar{x}_1 - \bar{x}_2\)?

1. 1The data come from an experiment, so the randomization condition is met by randomly assigning the treatments.
2. 2The volunteers are not a sample from a larger population, so the 10% condition does not apply.
3. 3Both groups have 30, so the difference in means is approximately normal even if quiz scores are skewed.

**Answer:** Only the randomization condition (random assignment) is needed, plus the shape check.

## 3 Probabilities

When the shape condition is met, standardize with the mean and standard deviation of the difference, \(z = \dfrac{(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)}{\sigma_{\bar{x}_1 - \bar{x}_2}}\), and use the normal distribution. Interpret the answer for the specific populations and sample sizes.

Worked Example 3 Conditions and a probability

### Commute times

School A has 1,200 students and School B has 900. Commute times at both schools are skewed right. Find the probability that \(\bar{x}_A - \bar{x}_B\) is 2 minutes or less.

1. 1Randomization: two independent random samples. 10% condition: 40 ≤ 120 and 45 ≤ 90.
2. 2Shape: the populations are skewed right, but \(n_A = 40 \ge 30\) and \(n_B = 45 \ge 30\), so the sampling distribution of the difference is approximately normal.
3. 3\(z = \dfrac{2 - 5}{1.549} \approx -1.94\), so \(P(\bar{x}_A - \bar{x}_B \le 2) = P(Z \le -1.94) \approx 0.0264\).

**Answer:** About 0.0264. In only about 2.6% of pairs of random samples would School A’s sample mean be no more than 2 minutes above School B’s.

Worked Example 4 Normal populations and small samples

### Two plant varieties

Heights of variety 1 plants are normal with mean 180 cm and standard deviation 10 cm; variety 2 heights are normal with mean 172 cm and standard deviation 12 cm. A grower measures random samples of 8 plants of each. Find the probability that the variety 2 sample has the larger mean.

1. 1Both populations are normal, so \(\bar{x}_1 - \bar{x}_2\) is normal even though both samples are small.
2. 2Mean \(180 - 172 = 8\) cm. SD \(\sqrt{10^2/8 + 12^2/8} = \sqrt{30.5} \approx 5.52\) cm.
3. 3Variety 2 larger means \(\bar{x}_1 - \bar{x}_2 \lt 0\): \(z = (0 - 8)/5.52 \approx -1.45\), \(P \approx 0.0737\).

**Answer:** About 0.0737.

**Figure 3.** Both height populations are normal, so the difference in sample means is normal even with only 8 plants per sample. About 7.4% of the time, the sample from the shorter variety would come out taller on average.

Common Mistake 3 · Turning a question about which mean is larger into the wrong inequality

“Variety 2’s sample has the larger mean” means \(\bar{x}_2 \gt \bar{x}_1\), which is \(\bar{x}_1 - \bar{x}_2 \lt 0\). Write the event in terms of the difference you defined before computing z.

On the calculator

2nd, DISTR, **normalcdf**(lower: −1E99, upper: 2, μ: 5, σ: 1.549) gives 0.0264. Enter the mean and standard deviation of the *difference*, not of either sample mean.

### Quick reference

| Fact | Formula or rule |
| --- | --- |
| Mean | \(\mu_1 - \mu_2\) |
| Standard deviation | \(\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}\) (variances add) |
| Conditions | Two independent random samples (or random assignment); 10% for each sample |
| Shape | Normal if both populations are normal; approximately normal if both \(n \ge 30\) |
| Standardize | \(z = [(\bar{x}_1 - \bar{x}_2) - (\mu_1 - \mu_2)] / \sigma_{\bar{x}_1 - \bar{x}_2}\) |

FiveStudy AP® Statistics · The sampling distribution of a difference in means
