---
title: "The sleeve is for μ1 minus μ2. | FiveStudy"
description: "A lighting plant coats 24 bulbs and leaves 21 uncoated. The coated sample lasts 812 hours on average; the standard sample lasts 769. The gap is 43 hours. That 43 is a statistic. The sleeve we wrap aro"
url: https://fivestudy.com/guides/apstats-4-7-ci-for-two-means
---

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

# The sleeve is for μ1 minus μ2.

[Figure: FiveStudy]

FiveStudy

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

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

# A Confidence Interval for a *Difference* in Means

How to estimate μ₁ − μ₂ from two independent samples or a randomized experiment with a two-sample t-interval: the parameter, the conditions for both samples, the standard error, degrees of freedom, and margin of error.

1. The parameter 2. Conditions 3. The calculation 4. Start to finish

The idea in one paragraph

To compare the means of two separate groups, estimate \(\mu_1 - \mu_2\) with \(\bar{x}_1 - \bar{x}_2\). The margin of error combines both samples’ variability: \(t^*\sqrt{s_1^2/n_1 + s_2^2/n_2}\). The procedure is the **two-sample t-interval for the difference between population means**. Its critical value uses degrees of freedom from technology, or the conservative smaller \(n - 1\).

## 1 The parameter

Define \(\mu_1 - \mu_2\) in context: the difference in the means, the response variable, and both populations (or treatments), with the order of subtraction. Use this procedure for **two independent samples**. If each value in one group is paired with a value in the other, analyze the differences with a one-sample interval instead.

Common Mistake 1 · Using the two-sample interval on paired data

Before-and-after scores from the same students are not independent samples. A two-sample interval ignores the pairing; a one-sample interval on the differences uses it.

## 2 Conditions

| Condition | Check |
| --- | --- |
| Randomization | Two independent random samples, or a randomized 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) |
| Sample data | Both \(n_1 \ge 30\) and \(n_2 \ge 30\), or both populations approximately normal. If either sample is under 30, *both* samples’ data should be free from strong skewness and outliers |

**Figure 1.** Both samples have fewer than 30 values, so both need a look. Neither dotplot shows strong skewness or outliers. (Dots are stacked to the nearest 0.2 cm.)

Common Mistake 2 · Checking the shape of only one sample

The sample data condition is about both groups. With samples of 10 and 10, look at a graph of each one, and say what each shows.

## 3 The calculation

\[ (\bar{x}_1 - \bar{x}_2) \pm t^* \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} \qquad SE_{\bar{x}_1 - \bar{x}_2} = \sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}} \]

The point estimate is \(\bar{x}_1 - \bar{x}_2\). The margin of error is \(t^*\) times the standard error. \(t^*\) is the critical value for the central C% of a t-distribution whose degrees of freedom come from technology; they fall between the smaller of \(n_1 - 1\) and \(n_2 - 1\) and \(n_1 + n_2 - 2\).

**Figure 2.** Each sample contributes its own variance divided by its own sample size. The pieces add under the square root, the same way variances add for a difference of independent sample means.

Common Mistake 3 · Adding the standard deviations

\(\sqrt{8.4^2/40 + 6.1^2/45} \approx 1.61\), not \(8.4 + 6.1 = 14.5\) or \(\dfrac{8.4}{\sqrt{40}} + \dfrac{6.1}{\sqrt{45}}\). Square, divide, add, then take the square root.

Worked Example 1 Degrees of freedom without technology

### Two fertilizers

Without technology for df, what interval would you get for the fertilizer data, and how does it compare?

1. 1Use the smaller of \(n_1 - 1\) and \(n_2 - 1\): df = 9, \(t^* = 2.262\).
2. 2\(2.1 \pm 2.262(0.573) = (0.80,\ 3.40)\).
3. 3The true df lies between 9 (the smaller \(n - 1\)) and 18 (\(n_1 + n_2 - 2\)); technology gives 17.8.

**Answer:** (0.80, 3.40): a little wider than (0.90, 3.30). Using the smaller df is conservative: it never makes the interval too narrow.

## 4 Start to finish

Worked Example 2 A complete two-sample t-interval

### Commute times

Independent random samples of 40 students at School A (1,200 students) and 45 at School B (900 students) gave mean commute times of 24.6 and 18.7 minutes, with standard deviations 8.4 and 6.1 minutes. Construct a 95% confidence interval for the difference in mean commute times.

1. 1 **State.** \(\mu_A - \mu_B\), where \(\mu_A\) and \(\mu_B\) are the true mean commute times (minutes) of all students at School A and School B. 95% confidence.
2. 2 **Plan.** Two-sample t-interval for a difference between population means. Randomization: independent random samples. 10% condition: 40 ≤ 120 and 45 ≤ 90. Sample data condition: both samples have at least 30.
3. 3 **Do.** Point estimate \(24.6 - 18.7 = 5.9\). \(SE = \sqrt{8.4^2/40 + 6.1^2/45} \approx 1.610\). Technology gives df ≈ 70.4 and \(t^* \approx 1.994\), so \(ME \approx 3.21\). Interval: \((2.69,\ 9.11)\).
4. 4 **Conclude.** We are 95% confident that the interval from 2.69 to 9.11 minutes captures the true difference in mean commute times (School A minus School B) for all students at the two schools.

**Answer:** (2.69, 9.11) minutes.

Worked Example 3 An interval from an experiment

### Two fertilizers

Twenty seedlings were randomly assigned to fertilizer A or B, 10 each. Heights after 4 weeks (cm): A: 24.1, 26.3, 22.8, 25.5, 27.0, 23.9, 25.2, 26.8, 24.6, 25.8; B: 22.4, 23.9, 21.7, 24.8, 22.1, 23.0, 25.1, 21.9, 23.6, 22.5. Construct a 95% interval for \(\mu_A - \mu_B\).

1. 1Parameter: the true difference in mean height after 4 weeks (A minus B) for seedlings like these.
2. 2Randomization: treatments randomly assigned, so the 10% condition does not apply. Sample data: both groups have 10, and neither dotplot shows strong skewness or outliers (Figure 1).
3. 3\(\bar{x}_A = 25.2\), \(s_A \approx 1.35\); \(\bar{x}_B = 23.1\), \(s_B \approx 1.20\). \(SE \approx 0.573\), df ≈ 17.8, \(t^* \approx 2.103\), \(ME \approx 1.20\).
4. 4Interval: \(2.1 \pm 1.20 = (0.90,\ 3.30)\).

**Answer:** We are 95% confident that the interval from 0.90 to 3.30 cm captures the true difference in mean height after 4 weeks (fertilizer A minus fertilizer B) for seedlings like these.

**Figure 3.** Each interval is centered at the difference in sample means and reaches one margin of error each way. Both lie entirely above 0 (dashed), so the first group’s mean is plausibly larger in both cases.

On the calculator

STAT, TESTS, **2-SampTInt**. With summary numbers choose Inpt: Stats and enter \(\bar{x}_1\), \(s_1\), \(n_1\), \(\bar{x}_2\), \(s_2\), \(n_2\); with data, choose Data and name the two lists. C-Level 0.95, **Pooled: No**. For the commute data the output is (2.69, 9.11) with df = 70.4.

Say it like this

“We are 95% confident that the interval from 2.69 to 9.11 minutes captures the true difference in mean commute times (School A minus School B) for all students at the two schools.”

Common Mistake 4 · Forgetting the order of subtraction

(2.69, 9.11) means School A’s mean is larger. Reversed, the interval is (−9.11, −2.69), with the same meaning. Name the order in the parameter and in the conclusion.

### Quick reference

| Piece | Formula or rule |
| --- | --- |
| Parameter | \(\mu_1 - \mu_2\), with the order stated |
| Point estimate | \(\bar{x}_1 - \bar{x}_2\) |
| Standard error | \(\sqrt{s_1^2/n_1 + s_2^2/n_2}\) |
| Degrees of freedom | From technology; conservative choice: smaller of \(n_1 - 1\), \(n_2 - 1\) |
| Interval | \((\bar{x}_1 - \bar{x}_2) \pm t^* \cdot SE\) |
| Calculator | 2-SampTInt, Pooled: No |

FiveStudy AP® Statistics · A confidence interval for a difference in means
