Skip to main content

Unit 4 · Topic 4.7

4.7 Constructing a Confidence Interval for the Difference Between Two Population Means

A two-sample t-interval estimates the difference between two population means, μ₁ − μ₂, from two independent samples or a randomized experiment. It uses (x̄₁ − x̄₂) ± t*·√(s₁²/n₁ + s₂²/n₂), with degrees of freedom from technology.

Key terms

  • two-sample t-interval
  • point estimate x̄₁ − x̄₂
  • standard error √(s₁²/n₁ + s₂²/n₂)
  • conditions for an interval

The formula

(x̄₁ − x̄₂) ± t* √(s₁²/n₁ + s₂²/n₂).

The point estimate is x̄₁ − x̄₂. The standard error, SE = √(s₁²/n₁ + s₂²/n₂), is on the formula sheet. The margin of error is t* × SE.

Degrees of freedom

The df for two-sample t procedures comes from a complicated formula that technology handles (2-SampTInt). It's usually not a whole number, and it always falls between the smaller of n₁ − 1 and n₂ − 1 and n₁ + n₂ − 2.

If you don't have technology, using the smaller of n₁ − 1 and n₂ − 1 is a safe choice. It gives a slightly larger t* and a slightly wider interval.

Don't pool the standard deviations. Calculators offer a "pooled" option; choose No. Pooling assumes the two populations have the same standard deviation, which is hard to check and often false. The unpooled standard error works either way, so it's the safer default and the one on the formula sheet.

Conditions

  • Random: two independent random samples or a randomized experiment.
  • 10%: when sampling without replacement, each sample is at most 10% of its population. Not needed for a randomized experiment.
  • Normal/sample data: both samples have n ≥ 30, or both populations are approximately normal. If either sample is under 30, graphs of both samples should show no strong skew or outliers.

Defining the parameter

Name both means and the order: "μ₁ − μ₂, where μ₁ is the true mean growth of plants like these with Fertilizer A and μ₂ is the true mean growth with Fertilizer B."

For an experiment, the means describe what would happen to units like these under each treatment. For two random samples, they're the means of the two populations.

A complete answer

Include these four pieces every time.

If you reverse the order of subtraction, the interval's endpoints swap and change sign; just interpret the result with the order you defined.

  • Name the procedure: two-sample t-interval for μ₁ − μ₂.
  • Define μ₁ and μ₂ in context and state the order of subtraction.
  • Check random, 10% (if sampling) and the sample data condition for both groups.
  • Show the formula with values, give df and the interval, and interpret it in context (topic 4.8).

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1Calculator allowed

    Two-sample t-interval from an experiment

    Thirty seedlings are randomly assigned, 15 to Fertilizer A and 15 to Fertilizer B. After 6 weeks, A: x̄ = 24.3 cm, s = 4.1 cm; B: x̄ = 20.9 cm, s = 3.6 cm. Dotplots of both groups show no strong skew or outliers. Construct a 95% confidence interval for μA − μB.

    Show the solution
    1. Step 1: Procedure: two-sample t-interval for μA − μB (true mean growth of seedlings like these with A minus with B).
    2. Step 2: Random: treatments were randomly assigned. 10%: not needed for an experiment. Normal: both n = 15 < 30, but both dotplots show no strong skew or outliers.
    3. Step 3: Point estimate: 24.3 − 20.9 = 3.4 cm.
    4. Step 4: SE = √(4.1²/15 + 3.6²/15) ≈ 1.409.
    5. Step 5: Technology: df ≈ 27.5, t* ≈ 2.050. Margin of error ≈ 2.050 × 1.409 ≈ 2.89.
    6. Step 6: Interval: 3.4 ± 2.89 = (0.51, 6.29). With the conservative df = 14 (t* ≈ 2.145), you'd get (0.38, 6.42).

    Answer: About (0.51, 6.29) cm. We are 95% confident that the interval from 0.51 to 6.29 cm captures the true difference in mean 6-week growth (A minus B) for seedlings like these.

  2. Example 2Calculator allowed

    Trap: two-sample interval for paired data

    Researchers measure the reaction time of 20 drivers before and after drinking coffee. A student runs a two-sample t-interval on the before and after times. Is that appropriate?

    Show the solution
    1. Step 1: Each driver is measured twice, so the before and after values are paired, not independent.
    2. Step 2: A two-sample interval ignores the pairing and overstates the variability.
    3. Step 3: The right procedure is a one-sample t-interval on the 20 differences (topic 4.2).

    Answer: No. Use a paired (one-sample) t-interval for the mean difference.

Common mistakes

  • Using the pooled option on a calculator.
  • Using df = n₁ + n₂ − 2 by hand, which is too large and gives an interval that's too narrow. The safe hand choice is the smaller of n₁ − 1 and n₂ − 1.
  • Requiring the 10% condition for a randomized experiment.
  • Checking the sample data condition for only one group.

On the exam

  • Name the procedure ("two-sample t-interval for μ₁ − μ₂"), define both means and the order, check conditions for both groups and show the formula with numbers.
  • Report the df your calculator gives if you used technology.

Connected topics

Videos

  • AP Statistics | Two Sample t-Interval for the Difference Between Two Means (Step-by-Step)

    Michael Porinchak - AP Statistics & AP PrecalculusWatch on YouTube (opens in a new tab)

  • AP Statistics Inference for Means – Confidence Intervals for a Difference in Means

    Goldie's Math EmporiumWatch on YouTube (opens in a new tab)

  • Calculating confidence interval for difference of means | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Constructing t interval for difference of means | AP Statistics | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

  • Welch (Unpooled Variance) t Tests and Confidence Intervals: Introduction

    jbstatisticsWatch on YouTube (opens in a new tab)

Check yourself

2 questions on 4.7 Constructing a Confidence Interval for the Difference Between Two Population Means. Pick an answer to see if you got it, and why.

MethodNumber of studentsMean scoreStandard deviation
A3572.48.1
B3267.99.6

Invented data: final exam scores for 67 students randomly assigned to one of two teaching methods

Question 1 of 2Calculator allowed

Which is a 95% confidence interval for μ_A − μ_B? (Technology gives df ≈ 60.9.)

Question 2 of 2Calculator allowed

Which conditions check is correct for these data?

0 of 2 answered