Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›AP Statistics
  3. ›4 Inference for Quantitative Data: Means
  4. ›4.7 Interval for a difference of two means

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.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A two-sample t interval compares the means of independent groups
  1. 1A two-sample t interval compares the means of independent groups
  2. 2The interval adds and subtracts a margin of error
  3. 3Conditions must hold before the interval can be trusted
  4. 4Substituting the summary statistics gives the interval
  5. 5The interval is interpreted as a range for the true difference
  6. Check your recall
  7. Practice: 10 questions
1

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 μ1−μ2\mu_1-\mu_2μ1​−μ2​ 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

FeatureTwo-sample intervalPaired interval
DesignTwo separate groupsOne group measured twice, or matched pairs
Data analyzedMeans and standard deviations of both groupsDifferences within each pair
Parameterμ1−μ2\mu_1-\mu_2μ1​−μ2​Mean of the differences
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
μ1−μ2\mu_1-\mu_2μ1​−μ2​
Paired interval
Mean of the differences

Key term

two-sample t interval

A two-sample t interval is a confidence interval for μ1−μ2\mu_1-\mu_2μ1​−μ2​ based on the means and standard deviations of two independent samples.

Part 1 done

2

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 xˉ1−xˉ2\bar{x}_1-\bar{x}_2xˉ1​−xˉ2​. Add and subtract the margin of error, which is the critical value times the standard error.

The full formula is (xˉ1−xˉ2)±t∗s12n1+s22n2(\bar{x}_1-\bar{x}_2)\pm t^*\sqrt{\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}}(xˉ1​−xˉ2​)±t∗n1​s12​​+n2​s22​​​.

The critical value t∗t^*t∗ 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 n1−1n_1-1n1​−1 and n2−1n_2-1n2​−1, 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 t∗t^*t∗ is the t distribution value that leaves the chosen central confidence level between −t∗-t^*−t∗ and t∗t^*t∗.

Part 2 done

Quick check

One question on the part you just read

Easy

Identify the standard error used in a two-sample t interval for μ1−μ2\mu_1-\mu_2μ1​−μ2​.
Show answer and explanation

Answer: A · Worked explanation

The standard error is the square root of the sum of the two variance terms. Adding the individual standard errors without squaring overstates the spread, because variances add rather than standard errors. Subtracting treats the groups as if they canceled each other's variability. Leaving off the root gives a variance, not a standard error.
3

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 n≥30n\geq30n≥30, or each sample has no strong skewness or outliers.

If a check fails, the stated confidence level may not be accurate.

Exam tip

Describe each check in context. For small samples, refer to a dotplot or boxplot of each group by name.

Part 3 done

4

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

Method A has n1=15n_1=15n1​=15, xˉ1=78.4\bar{x}_1=78.4xˉ1​=78.4 and s1=6.0s_1=6.0s1​=6.0 points. Method B has n2=12n_2=12n2​=12, xˉ2=72.1\bar{x}_2=72.1xˉ2​=72.1 and s2=5.0s_2=5.0s2​=5.0 points. Students were randomly assigned, and dotplots show no strong skewness or outliers. Construct a 95% interval for μ1−μ2\mu_1-\mu_2μ1​−μ2​. Use t∗=2.201t^*=2.201t∗=2.201 for df=11\mathrm{df}=11df=11.
  1. 1
    Point estimate: xˉ1−xˉ2=78.4−72.1=6.3\bar{x}_1-\bar{x}_2=78.4-72.1=6.3xˉ1​−xˉ2​=78.4−72.1=6.3.
  2. 2
    Standard error: 6.0215+5.0212=2.400+2.083≈2.12\sqrt{\frac{6.0^2}{15}+\frac{5.0^2}{12}}=\sqrt{2.400+2.083}\approx2.12156.02​+125.02​​=2.400+2.083​≈2.12.
  3. 3
    Margin of error: t∗×SE=2.201×2.12≈4.67t^*\times\mathrm{SE}=2.201\times2.12\approx4.67t∗×SE=2.201×2.12≈4.67.
  4. 4
    Interval: 6.3±4.676.3\pm4.676.3±4.67, which is (1.63, 10.97)(1.63,\ 10.97)(1.63, 10.97).

Answer: The 95% interval is about (1.6, 11.0)(1.6,\ 11.0)(1.6, 11.0) 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.

Part 4 done

Quick check

One question on the part you just read

Easy

Identify the situation in which a two-sample t interval is appropriate.
Show answer and explanation

Answer: A · Worked explanation

Two independent samples of a quantitative variable call for a two-sample t interval, because each group is measured separately. Before-and-after heart rates are paired. A proportion is a different kind of variable. One sample compared with a claimed value involves only one mean.
5

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.

Common mistake

A 95% confidence level does not mean 95% of individuals fall in the interval. It describes how often the method captures the true difference.

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.

Note read

Check your recall[13 marks]

5 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Calculate[3 marks]

    Calculate a 95% interval for μ1−μ2\mu_1-\mu_2μ1​−μ2​ given n1=30n_1=30n1​=30, xˉ1=25.0\bar{x}_1=25.0xˉ1​=25.0, s1=4.0s_1=4.0s1​=4.0, n2=30n_2=30n2​=30, xˉ2=21.0\bar{x}_2=21.0xˉ2​=21.0 and s2=3.0s_2=3.0s2​=3.0. Use t∗=2.045t^*=2.045t∗=2.045.

    Show mark schemeHide mark scheme

    Model answer

    The point estimate is 25.0−21.0=4.025.0-21.0=4.025.0−21.0=4.0. The standard error is 1630+930≈0.913\sqrt{\frac{16}{30}+\frac{9}{30}}\approx0.9133016​+309​​≈0.913, so the margin is 2.045×0.913≈1.872.045\times0.913\approx1.872.045×0.913≈1.87. The interval is 4.0±1.874.0\pm1.874.0±1.87, about (2.1, 5.9)(2.1,\ 5.9)(2.1, 5.9).

    • 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.1, 5.9)(2.1,\ 5.9)(2.1, 5.9)
  2. 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. 3.Interpret[3 marks]

    Interpret the 95% interval (1.5, 4.5)(1.5,\ 4.5)(1.5, 4.5) minutes for μA−μB\mu_A-\mu_BμA​−μB​, 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. 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. 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.

3.

Easy·Determine[1 mark]

Sample 1 has xˉ1=14.2\bar{x}_1=14.2xˉ1​=14.2 and sample 2 has xˉ2=11.5\bar{x}_2=11.5xˉ2​=11.5. Determine the point estimate for μ1−μ2\mu_1-\mu_2μ1​−μ2​.
Show answer and explanation

Answer: A · Worked explanation

The point estimate is xˉ1−xˉ2=14.2−11.5=2.7\bar{x}_1-\bar{x}_2=14.2-11.5=2.7xˉ1​−xˉ2​=14.2−11.5=2.7. The value 25.7 adds the means instead of subtracting. The value -2.7 reverses the order of subtraction, which would estimate μ2−μ1\mu_2-\mu_1μ2​−μ1​ instead. Always keep group 1 first. The value 1.35 halves the difference, which has no role here.
4.

Medium·Calculate[2 marks]

Two independent samples have s1=6.0s_1=6.0s1​=6.0, n1=36n_1=36n1​=36, s2=8.0s_2=8.0s2​=8.0 and n2=64n_2=64n2​=64. Calculate the margin of error for t∗=2.00t^*=2.00t∗=2.00.
Show answer and explanation

Answer: A · Worked explanation

The standard error is 3636+6464=2≈1.41\sqrt{\frac{36}{36}+\frac{64}{64}}=\sqrt{2}\approx1.413636​+6464​​=2​≈1.41, and the margin is 2.00×1.41≈2.832.00\times1.41\approx2.832.00×1.41≈2.83. The value 4.00 results from adding the two terms of sn\frac{s}{\sqrt{n}}n​s​ before multiplying by t∗t^*t∗. The value 1.41 is the standard error alone, without t∗t^*t∗. The value 2.00 is only the sum under the square root, which is the squared standard error.
5.

Medium·Interpret[1 mark]

A 95% interval for μA−μB\mu_A-\mu_BμA​−μB​ is (1.5, 4.5)(1.5,\ 4.5)(1.5, 4.5) minutes, where μ\muμ is a true mean waiting time. Identify the correct interpretation.
Show answer and explanation

Answer: A · Worked explanation

The interval estimates the true difference in means. The claim about individual waits confuses a mean difference with individual values. The sample difference is known exactly and sits at the center of the interval, so no probability applies to it. The interval does not bound either mean itself.
6.

Medium·Predict[1 mark]

The same data are used to build a 95% interval and a 99% interval for μ1−μ2\mu_1-\mu_2μ1​−μ2​. Predict how the 99% interval compares.
Show answer and explanation

Answer: A · Worked explanation

A higher confidence level needs a larger critical value, so the margin of error and the width both grow. The point estimate stays the same, so the interval does not shift. Greater confidence does not buy a narrower interval. The width depends on t∗t^*t∗, not only on the data.
7.

Medium·Determine[1 mark]

A hand calculation uses the smaller of n1−1n_1-1n1​−1 and n2−1n_2-1n2​−1 for degrees of freedom. Determine the degrees of freedom when n1=15n_1=15n1​=15 and n2=9n_2=9n2​=9.
Show answer and explanation

Answer: A · Worked explanation

The smaller of 15−1=1415-1=1415−1=14 and 9−1=89-1=89−1=8 is 8. The value 14 uses the larger sample. The values 22 and 23 come from n1+n2−2n_1+n_2-2n1​+n2​−2 and n1+n2−1n_1+n_2-1n1​+n2​−1, which belong to other procedures and are not the rule used here. Taking the smaller value keeps the interval safe.
8.

Hard·Calculate[2 marks]

Two independent samples have n1=50n_1=50n1​=50, xˉ1=52.0\bar{x}_1=52.0xˉ1​=52.0, s1=10s_1=10s1​=10 and n2=40n_2=40n2​=40, xˉ2=47.0\bar{x}_2=47.0xˉ2​=47.0, s2=12s_2=12s2​=12. Calculate a 95% interval for μ1−μ2\mu_1-\mu_2μ1​−μ2​ using t∗=2.01t^*=2.01t∗=2.01.
Show answer and explanation

Answer: A · Worked explanation

The standard error is 10050+14440=5.6≈2.366\sqrt{\frac{100}{50}+\frac{144}{40}}=\sqrt{5.6}\approx2.36650100​+40144​​=5.6​≈2.366, so the margin is 2.01×2.366≈4.762.01\times2.366\approx4.762.01×2.366≈4.76 and the interval is 5.0±4.765.0\pm4.765.0±4.76. The interval (2.6, 7.4)(2.6,\ 7.4)(2.6, 7.4) forgets to multiply by t∗t^*t∗. The interval (−1.7, 11.7)(-1.7,\ 11.7)(−1.7, 11.7) adds the two standard errors. The interval (−6.3, 16.3)(-6.3,\ 16.3)(−6.3, 16.3) omits the square root. Check each step: point estimate, standard error, then margin of error.
9.

Hard·Interpret[2 marks]

A 95% interval for μnew−μold\mu_\mathrm{new}-\mu_\mathrm{old}μnew​−μold​, the true mean reaction time of a new design minus an old design, is (−8.4, −1.2)(-8.4,\ -1.2)(−8.4, −1.2) milliseconds. Identify the correct reading.
Show answer and explanation

Answer: A · Worked explanation

The order of subtraction is new minus old, so negative values mean the new design has the smaller mean. Reading the interval as higher reverses the sign convention. A difference of means can be negative, and the midpoint -4.8 describes means, not every trial.
10.

Hard·Predict[2 marks]

Both sample sizes are quadrupled while the confidence level and sample standard deviations stay about the same. Predict the approximate change in the margin of error.
Show answer and explanation

Answer: A · Worked explanation

The standard error has the sample sizes under a square root, so quadrupling both divides it by about 4=2\sqrt{4}=24​=2. The critical value changes only slightly. A quarter would result from forgetting the square root. Larger samples never widen the margin, and they do not leave it unchanged.

Keep going

Next topic4.8 Claims about a difference of meansPrevious topic4.6 Differences in sample means

More in Unit 4 · Inference for Quantitative Data: Means

  1. 4.2Interval for a mean or mean differenceNotes · 10 questions
  2. 4.3Claims from a mean intervalNotes · 10 questions
  3. 4.4Setting up a test for a mean or mean differenceNotes · 10 questions
  4. 4.5Carrying out a test for a mean or mean differenceNotes · 10 questions
  5. 4.6Differences in sample meansNotes · 10 questions
  6. 4.7Interval for a difference of two meansNotes · 10 questions
  7. 4.8Claims about a difference of meansNotes · 10 questions
  8. 4.9Setting up a two-mean testNotes · 10 questions
  9. 4.10Carrying out a two-mean testNotes · 10 questions

All AP Statistics topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by College Board or any exam board.

On this page

0/5 read

  1. 1A two-sample t interval compares the means of independent groups
  2. 2The interval adds and subtracts a margin of error
  3. 3Conditions must hold before the interval can be trusted
  4. 4Substituting the summary statistics gives the interval
  5. 5The interval is interpreted as a range for the true difference
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe