01 / 21

Confidence Intervals
Difference of Two Means

Learn how to construct and interpret confidence intervals for \(\mu_1 - \mu_2\), comparing two independent populations with statistical rigor.

AP Statistics

Why Compare Two Means?

In statistics, we often want to know whether two groups differ on some quantitative measure. For example: does a new drug lower blood pressure more than a placebo? Do students in one school score higher than students in another?

A confidence interval for the difference of two means gives us a range of plausible values for \(\mu_1 - \mu_2\), the true difference between two population means.

Key Terminology

\(\bar{x}_1 - \bar{x}_2\)
Point estimate: the observed difference of sample means
\(\mu_1 - \mu_2\)
Parameter: the true difference of population means we want to estimate
Standard Error
\(\text{SE} = \sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}\), measures variability of the estimate

Visualizing Two Populations

\(\mu_1\)
\(\mu_2\)
\(\mu_1 - \mu_2\)
Population 1 Population 2

Each population has its own mean and spread. Our goal: estimate the distance between the two means and quantify our uncertainty about that distance.

The Core Formula

\(\bar{x}_1 - \bar{x}_2\)
Point estimate: observed difference of sample means
\(t^*\)
Critical value from the \(t\)-distribution for desired confidence level
\(SE\)
\(\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}\) combines variability from both samples

Degrees of Freedom

To find \(t^*\), we need the degrees of freedom. For the AP exam, use the conservative method or Welch's approximation:

Conservative
\(\text{df} = \min(n_1 - 1,\; n_2 - 1)\). Simple, always valid, slightly wider intervals.
Welch's (Calculator)
A complex formula your calculator computes automatically. Gives a more precise (larger) df.

Checking the Conditions

1
Random: Both samples must be randomly selected or come from randomized experiments. This ensures the samples represent their populations.
2
Independent: The two samples must be independent of each other. Additionally, if sampling without replacement, each sample should be < 10% of its population (the 10% condition).
3
Normal: Either both populations are approximately normal, or both sample sizes are large enough (\(n_1 \geq 30\) and \(n_2 \geq 30\)) for the CLT to apply. Check for severe skewness or outliers.

Two-Sample vs. Matched Pairs

Two-Sample (Independent) Matched Pairs
Design Two separate, independent groups One group measured twice, or natural pairs
Parameter \(\mu_1 - \mu_2\) \(\mu_d\) (mean of differences)
SE Formula \(\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}\) \(\dfrac{s_d}{\sqrt{n}}\)
\(df\) \(\min(n_1-1, n_2-1)\) or Welch's \(n - 1\)
Example Drug A group vs. Drug B group Before vs. after treatment on same patients

How to Apply the Formula

1
Identify the parameter: State that you are estimating \(\mu_1 - \mu_2\), the difference in population means.
2
Check conditions: Verify Random, Independent (10% rule), and Normal/Large Sample for both groups.
3
Compute the interval: Calculate \(\bar{x}_1 - \bar{x}_2\), find \(\text{SE}\), determine \(t^*\) from the \(t\)-table with appropriate \(df\), and form the interval.
4
Interpret in context: "We are C% confident that the true difference in [context] is between (lower, upper)."

Example 1: Sleep Study

A researcher randomly assigns 35 students to a meditation group and 40 students to a control group. After 4 weeks, average nightly sleep is recorded:

Meditation
\(\bar{x}_1 = 7.4\) hrs, \(s_1 = 0.9\), \(n_1 = 35\)
Control
\(\bar{x}_2 = 6.8\) hrs, \(s_2 = 1.1\), \(n_2 = 40\)

Example 1: Solution

1
Point estimate: \(\bar{x}_1 - \bar{x}_2 = 7.4 - 6.8 = \) 0.6 hrs
2
Standard error: \(\text{SE} = \sqrt{\dfrac{0.9^2}{35} + \dfrac{1.1^2}{40}} = \sqrt{\dfrac{0.81}{35} + \dfrac{1.21}{40}} = \sqrt{0.02314 + 0.03025} = \sqrt{0.05339} \approx \) 0.231
3
Critical value: \(df = \min(34, 39) = 34\). For 95% confidence, \(t^* \approx\) 2.032
4
Interval: \(0.6 \pm 2.032 \times 0.231 = 0.6 \pm 0.469 = \) (0.131, 1.069)

Example 2: Test Scores

A school district wants to compare math scores between two schools. Random samples give:

School A
\(\bar{x}_1 = 78.2\), \(s_1 = 12.5\), \(n_1 = 50\)
School B
\(\bar{x}_2 = 74.8\), \(s_2 = 11.3\), \(n_2 = 45\)

Example 2: Solution

1
Point estimate: \(\bar{x}_1 - \bar{x}_2 = 78.2 - 74.8 = \) 3.4
2
Standard error: \(\text{SE} = \sqrt{\dfrac{12.5^2}{50} + \dfrac{11.3^2}{45}} = \sqrt{\dfrac{156.25}{50} + \dfrac{127.69}{45}} = \sqrt{3.125 + 2.838} = \sqrt{5.963} \approx \) 2.442
3
Critical value: \(df = \min(49, 44) = 44\). For 90% confidence, \(t^* \approx\) 1.680
4
Interval: \(3.4 \pm 1.680 \times 2.442 = 3.4 \pm 4.103 = \) (-0.703, 7.503)

Interpreting the Interval

0 0.6 Example 1 0.13 1.07 3.4 Example 2 -0.70 7.50 Does the interval contain 0? Ex 1: No \u2192 Evidence of difference Ex 2: Yes \u2192 No clear difference

Common Mistakes

✕ Subtracting SEs
Never subtract standard errors: \(\text{SE} \neq \dfrac{s_1}{\sqrt{n_1}} - \dfrac{s_2}{\sqrt{n_2}}\). Variances add, so you add the fractions under the square root.
✕ Using \(z^*\) Instead of \(t^*\)
When population standard deviations are unknown (using \(s_1, s_2\)), you must use the \(t\)-distribution, not the normal distribution.
✕ Wrong Interpretation
Don't say "95% probability the true difference is in the interval." Say "95% confident" since the parameter is fixed, not random.

Summary Reference

Component Formula / Rule
Point Estimate \(\bar{x}_1 - \bar{x}_2\)
Standard Error \(\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}\)
Critical Value \(t^*\) with df \(= \min(n_1 - 1, n_2 - 1)\)
Interval \((\bar{x}_1 - \bar{x}_2) \pm t^* \cdot \text{SE}\)
Conditions Random, Independent (10%), Normal/Large Sample
Interpretation "We are C% confident that \(\mu_1 - \mu_2\) is between..."

Question 1 of 5

What is the standard error for the difference of two means when \(s_1 = 6\), \(n_1 = 36\), \(s_2 = 8\), \(n_2 = 64\)?

Question 2 of 5

A 95% confidence interval for \(\mu_1 - \mu_2\) is (-2.5, 8.3). What can we conclude?

Question 3 of 5

Which condition is not required for a two-sample \(t\)-interval for \(\mu_1 - \mu_2\)?

Question 4 of 5

If \(\bar{x}_1 = 52\), \(\bar{x}_2 = 47\), \(\text{SE} = 2.0\), and \(t^* = 2.045\) (95% confidence, \(df = 29\)), what is the confidence interval?

Question 5 of 5

Researchers measure the effect of a new fertilizer by comparing the same 25 plants before and after treatment. Which procedure should they use?