AP Statistics · Unit 4 · Inference for Quantitative Data: Means
4.7 Interval for a difference of two means
Identify when a two-sample t interval applies, calculate it for the difference of two means, and interpret it in context.
1/5A two-sample t interval compares the means of independent groups
- A two-sample t interval compares the means of independent groups
- The interval adds and subtracts a margin of error
- Conditions must hold before the interval can be trusted
- Substituting the summary statistics gives the interval
- The interval is interpreted as a range for the true difference
- Check your recall
- Practice: 10 questions
Part 1 of 5: A two-sample t interval compares the means of independent groups
Suppose a school tests two teaching methods. Students are randomly assigned to one of them, and every student takes the same final exam. The goal is to estimate how much the true mean scores differ.
The procedure for this goal is the two-sample t interval. It builds a confidence interval for from two independent groups measured on the same quantitative variable.
Use it only when the groups are independent. When each subject gives two linked measurements, run a one-sample interval on the differences instead.
Choosing between two procedures
- Feature
- Design
- Two-sample interval
- Two separate groups
- Paired interval
- One group measured twice, or matched pairs
- Feature
- Data analyzed
- Two-sample interval
- Means and standard deviations of both groups
- Paired interval
- Differences within each pair
- Feature
- Parameter
- Two-sample interval
- Paired interval
- Mean of the differences
Key term
two-sample t interval
A two-sample t interval is a confidence interval for based on the means and standard deviations of two independent samples.
Part 2 of 5: The interval adds and subtracts a margin of error
Now consider how the interval is built. It follows the same pattern as every confidence interval. The center is the point estimate . Add and subtract the margin of error, which is the critical value times the standard error.
The full formula is .
The critical value comes from a t distribution at the chosen confidence level. Software finds the degrees of freedom from the data. By hand, use the smaller of and , which is a safe choice.
Key terms · tap one for its definition
point estimate
A point estimate is a single value computed from sample data and used to estimate a population parameter.
margin of error
The margin of error is the amount added to and subtracted from the point estimate, equal to the critical value times the standard error.
critical value
The critical value is the t distribution value that leaves the chosen central confidence level between and .

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 3 of 5: Conditions must hold before the interval can be trusted
Before substituting any numbers, check that the procedure fits the data. The checks mirror those for the sampling distribution of a difference.
- Random: each sample is random, or treatments were randomly assigned.
- Independent groups: the two samples do not influence each other, and neither is paired.
- 10% condition: each sample is less than 10% of its own population when sampling without replacement.
- Normal or large: each population is approximately normal, each , or each sample has no strong skewness or outliers.
If a check fails, the stated confidence level may not be accurate.
Part 4 of 5: Substituting the summary statistics gives the interval
Work through the same steps every time. Rounding only at the end keeps the answer accurate. The example below uses the safe degrees of freedom from the previous section.
- Check the conditions.
- Find the point estimate.
- Find the margin of error.
- Write the interval and interpret it.
Worked example
A 95% interval for two teaching methods
- Point estimate: .
- Standard error: .
- Margin of error: .
- Interval: , which is .
Answer: The 95% interval is about points.
A calculator or software reports a more precise degrees of freedom. Its interval is usually slightly narrower than the hand version. Keep the order of subtraction the same in the point estimate and in the final interpretation.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: The interval is interpreted as a range for the true difference
The last step is to say what the interval means. It estimates the difference between the two population means, not between individual values.
A correct interpretation names the confidence level, the parameter, the groups and the order of subtraction. For the teaching example, we are 95% confident the interval from 1.6 to 11.0 points captures the true difference. Here the difference is the mean exam score for method A minus method B.
Positive values mean group 1 has the higher mean. Negative values mean group 2 does.
Key term
confidence level
The confidence level is the long-run percentage of intervals, built the same way from repeated random samples, that capture the true parameter.
Check your recall[13 marks]
5 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Calculate[3 marks]
Calculate a 95% interval for given , , , , and . Use .
Show mark schemeHide mark scheme
Model answer
The point estimate is . The standard error is , so the margin is . The interval is , about .
- 1 mark for finding the point estimate 4.0 and standard error about 0.913
- 1 mark for finding the margin of error about 1.87
- 1 mark for giving the interval about
- 2.Identify[2 marks]
Identify the procedure for comparing the mean salaries of random samples from two different companies, and give one reason.
Show mark schemeHide mark scheme
Model answer
A two-sample t interval. The two samples are separate and independent, and salary is a quantitative variable.
- 1 mark for identifying the two-sample t interval
- 1 mark for giving a reason such as independent groups or a quantitative variable
- 3.Interpret[3 marks]
Interpret the 95% interval minutes for , the true mean waiting time at clinic A minus clinic B.
Show mark schemeHide mark scheme
Model answer
We are 95% confident that the interval from 1.5 to 4.5 minutes captures the true difference in mean waiting time, clinic A minus clinic B.
- 1 mark for stating 95% confidence
- 1 mark for naming the parameter as the true difference in mean waiting time
- 1 mark for giving the order of subtraction and the interval with units
- 4.Describe[3 marks]
Describe the conditions that must be checked before constructing a two-sample t interval.
Show mark schemeHide mark scheme
Model answer
The samples must be random or treatments randomly assigned, and the groups independent. Each sample must be less than 10% of its population. Each population must be approximately normal, or each sample size at least 30, or each sample free of strong skewness and outliers.
- 1 mark for random selection or assignment and independent groups
- 1 mark for the 10% condition
- 1 mark for the normal or large sample condition for each group
- 5.Explain[2 marks]
Explain why a two-sample interval is inappropriate for before-and-after scores from the same students.
Show mark schemeHide mark scheme
Model answer
The two sets of scores come from the same students, so the groups are not independent. The paired data should be analyzed through the differences.
- 1 mark for stating that the groups are not independent
- 1 mark for stating that the differences should be analyzed as one sample

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyDetermine[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
MediumInterpret[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumPredict[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumDetermine[1 mark]
Show answer and explanation
Answer: A · Worked explanation
HardCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardInterpret[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardPredict[2 marks]
Show answer and explanation
Answer: A · Worked explanation