AP Statistics / Unit 4: Inference for Quantitative Data: Means / Topic 4.7
NUM8ERS study notes · Topic 4.7

Constructing a Confidence Interval for the Difference Between Two Population Means

Estimate how far apart 22 population averages are. Use 22 independent samples to calculate a standard error, add a margin of error, and build a two-sample tt-interval with a clear meaning.

2026–27 curriculum4 worked examples8 practice questionsVisuals + calculator guidance

By the end of this lesson, you should be able to:

  • Define the difference between 22 population means in context.
  • Choose a two-sample tt-interval and justify its conditions.
  • Calculate the point estimate, standard error and margin of error.
  • Use an appropriate tt critical value to construct the interval.

Before you start: Review the sampling distribution of xˉ1−xˉ2\bar x_{1}-\bar x_{2} in Topic 4.6, and the estimate±margin of error\text{estimate}\pm\text{margin of error} structure of a confidence interval.

First time learning this? Follow the delivery-time example, then practice the four steps: state, plan, calculate and conclude.

Here to revise? Use the formula checklist, then try the practice questions before revealing the solutions.

The concept in 60 seconds

22 sample averages give a point estimate of the difference between 22 population averages. Because different samples would produce different estimates, report an interval to describe the uncertainty.

Two-sample t-interval=difference in sample means±margin of error\text{Two-sample }t\text{-interval}=\text{difference in sample means}\pm\text{margin of error}

The difference in sample means is xˉ1−xˉ2\bar x_{1}-\bar x_{2}. The margin of error is a tt critical value times the estimated standard error of that difference.

The central idea: Center the interval on the observed sample difference. Extend it in both directions by an amount that reflects sample variability, sample sizes and the chosen confidence level.

This method estimates μ1−μ2\mu_{1}-\mu_{2} for independent groups when the population standard deviations are unknown. The interval concerns a difference between averages, not the difference between every pair of individuals.

How much longer does service A take?

A business wants to estimate the difference in population mean delivery times between services A and B. In this study, the population means and standard deviations are unknown. 22 independent SRSs give these sample summaries:

Observed sample summaries, in minutes
GroupSample mean and SD⁡\operatorname{SD}Sample and population sizes
1: Service Axˉ1=32\bar x_{1}=32; s1=8s_{1}=8n1=40n_{1}=40 from N1=2,000N_{1}=2{,}000
2: Service Bxˉ2=28\bar x_{2}=28; s2=6s_{2}=6n2=36n_{2}=36 from N2=1,800N_{2}=1{,}800

Let μA−μB\mu_{A}-\mu_{B} be the difference in mean delivery time, in minutes, for the 22 defined delivery populations, using A−B\mathrm A-\mathrm B. A positive difference means A takes longer on average.

The point estimate is 32−28=4 min32-28=4 \,\mathrm{min}. A 95%95\% unpooled two-sample tt-interval will be approximately (0.785,7.215) min(0.785, 7.215)\,\mathrm{min}.

Pause and predict: Why not report exactly 4 min4 \,\mathrm{min} as the population difference? 44 is the observed sample difference. The interval allows for sampling variation around that estimate.

We will justify the procedure, calculate its standard error and margin of error, and connect the endpoints to the original question.

Key ideas and notation

Parameter

μ1−μ2\mu_{1}-\mu_{2} is the difference between 22 population means. Define both populations, the quantitative response and the subtraction order.

“A-minus-B mean delivery time” is more precise than “the difference.”

Point estimate

xˉ1−xˉ2\bar x_{1}-\bar x_{2} is the sample-based estimate at the center of the interval.

For the deliveries, it is 4 min4 \,\mathrm{min}.

Standard error

SE⁡\operatorname{SE} estimates how much the difference between sample means varies across repeated independent sample pairs.

Use each sample’s SD⁡\operatorname{SD} with its own sample size.

Margin of error

ME⁡=t∗×SE⁡\operatorname{ME}=t^* \times \operatorname{SE} is the distance from the point estimate to either endpoint.

The full interval width is 2×ME⁡2 \times \operatorname{ME}.

Confidence level and critical value

The chosen confidence level, such as 95%95\%, determines the central area used to find t∗t^* in a tt distribution with appropriate degrees of freedom. The confidence level describes the long-run success rate of the interval method under its conditions.

t∗t^* is a positive multiplier for interval construction. It is different from a test statistic calculated to test a null claim.

Choose the right method

Ask whether the response is quantitative and whether the 22 groups are independent. Check that you are estimating a difference between population means and that population standard deviations are unknown.

Different data designs call for different mean intervals
11 group11 population mean

Use a one-sample tt-interval for μ\mu when appropriate. There is 11 sample mean to estimate 11 mean.

Matched observationsMean paired difference

Form 11 within-pair difference per complete pair. Use a one-sample tt-interval on the differences.

Independent groupsDifference of population means

Use a two-sample tt-interval for μ1−μ2\mu_{1}-\mu_{2}, with separate sample means, standard deviations and sizes.

The study design chooses the method. Equal sample sizes do not create matched pairs, and 22 different group labels do not automatically establish independence.

For the delivery study, the samples are independently selected from 22 service populations, so the independent two-sample method fits the design.

Use the unpooled procedure here: Estimate each group’s contribution to variability separately. The formula in this lesson does not assume equal population variances. On the calculator, choose Pooled: No.

Check the conditions

A confidence interval needs more than 66 summary statistics. Explain why the collection method and data support the procedure.

Randomization22 independent random samples, or an appropriate randomized experiment with separate treatment groups.
IndependenceThe groups are independent. Within each sample, observations should be independent or sufficiently close to independent for the sampling approximation.
10%10\% for each sampleWhen sampling without replacement: n1≤0.10N1n_1\le0.10N_1 and n2≤0.10N2n_2\le0.10N_2.
Sample data / shapeBoth n1n_{1} and n2n_{2} are at least 3030, or suitable normal-population information supports the procedure. If either sample is smaller than 3030, examine both sample distributions for strong skewness and outliers.

Apply the checks to the deliveries

  • Randomization: The study gives 22 independently selected SRSs.
  • 10%10\%: 40≤0.10(2,000)=20040\le 0.10(2{,}000)=200 and 36≤0.10(1,800)=18036\le 0.10(1{,}800)=180.
  • Sample sizes: 40≥3040\ge 30 and 36≥3036\ge 30 support the course’s large-sample condition for the two-sample tt procedure.

These separate 10%10\% checks support treating observations within each sample as approximately independent. They do not make sampling without replacement exactly independent.

Small samples and experiments

When a sample is small, inspect the shape rather than adding the 22 sample sizes together. Under the course’s small-sample check, both sample distributions should be free from strong skewness and outliers; approximately normal population models also support the method.

For a randomized experiment, explain the random assignment of treatments. The sampling-fraction 10%10\% condition is not required merely for treatment assignment; a separate finite-population sampling stage still needs its own check. The design and sample-data checks still matter.

If a check fails: State the limitation. A large sample does not remove volunteer bias, and a calculator cannot repair a paired design treated as independent.

Calculate the interval

(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}}

Step 1: find the point estimate

Use the declared order: xˉA−xˉB=32−28=4 min\bar x_{A}-\bar x_{B}=32-28=4 \,\mathrm{min}.

Step 2: calculate the standard error

SE⁡=8240+6236=1.6+1=2.6≈1.612452 min\operatorname{SE}=\sqrt{\frac{8^{2}}{40}+\frac{6^{2}}{36}}=\sqrt{1.6+1}=\sqrt{2.6}\approx 1.612452 \,\mathrm{min}

Add the estimated variances of the separate sample means, then take the square root. The subtraction in the estimate does not mean subtracting standard deviations.

Step 3: find t∗t^* and the margin of error

For a 95%95\% unpooled interval, technology gives df≈71.752722\mathrm{df}\approx 71.752722 and t∗≈1.993581t^*\approx 1.993581. Thus:

ME⁡=t∗×SE⁡≈3.215 min\operatorname{ME}=t^* \times \operatorname{SE}\approx 3.215 \,\mathrm{min}

Step 4: calculate both endpoints

Using the rounded margin of error, the interval is approximately 4±3.2154\pm3.215, or (0.785,7.215) min(0.785, 7.215)\,\mathrm{min}.

Point estimate±margin of error\text{Point estimate}\pm\text{margin of error}
Anatomy of a confidence interval for a population mean differenceA 95 percent two-sample t interval for the A-minus-B population mean delivery-time difference. Point estimate 4 minutes, margin of error about 3.215, lower endpoint 0.785, upper endpoint 7.215. 0 2 4 6 8 Population mean time difference A − B (minutes) Lower 0.785 Estimate 4.000 Upper 7.215 ME ≈ 3.215 ME ≈ 3.215 Build a 95% two-sample interval Anatomy of a confidence interval for a population mean differenceA 95 percent two-sample t interval for the A-minus-B population mean delivery-time difference. Point estimate 4 minutes, margin of error about 3.215, lower endpoint 0.785, upper endpoint 7.215. 0 2 4 6 8 Population mean time difference A − B (minutes) Lower 0.785 Estimate 4.000 Upper 7.215 ME ≈ 3.215 ME ≈ 3.215 Build a 95% two-sample interval

The dot marks the observed A-minus-B sample mean difference. Each endpoint is 11 margin of error from the estimate. The interval estimates a population mean difference, not a range of individual delivery times.

A concise interpretation: We are 95%95\% confident that service A’s population mean delivery time is between about 0.7850.785 and 7.215 min7.215 \,\mathrm{min} longer than service B’s for the defined delivery populations.

Rounding: Keep full precision for SE⁡\operatorname{SE} and t∗t^* while calculating. Round the final endpoints and include units. Using rounded displayed values can change the last decimal slightly.

tt critical values, degrees of freedom and precision

Population standard deviations are unknown, so the SE⁡\operatorname{SE} uses sample standard deviations. A tt critical value accounts for this additional uncertainty. For confidence level CC, expressed as a proportion with 0<C<10\lt C\lt1, t∗t^* leaves central area CC under the chosen tt curve and area 1−C2\frac{1-C}{2} in each tail.

For 95%95\% confidence, each tail has area 0.0250.025. If you already know df\mathrm{df}, the inverse-tt input is invT⁡(0.975,df⁡)\operatorname{invT}(0.975,\operatorname{df}).

Why might df\mathrm{df} be a decimal?

The usual unpooled two-sample procedure uses Welch’s approximate degrees of freedom, calculated from both sample sizes and standard deviations. Fractional df\mathrm{df} is normal. Use the technology’s value without forcing it to n1+n2−2n_{1}+n_{2}-2.

The unpooled df\mathrm{df} lies between the smaller of n1−1n_{1}-1 and n2−1n_{2}-1 and n1+n2−2n_{1}+n_{2}-2. For the deliveries, those bounds are 3535 and 7474; df≈71.752722\mathrm{df}\approx 71.752722 is within them.

Optional: where the technology’s df\mathrm{df} comes from

Let a=s12n1a=\frac{s_1^2}{n_1} and b=s22n2b=\frac{s_2^2}{n_2}. Welch’s approximation is df⁡=(a+b)2a2n1−1+b2n2−1\operatorname{df}=\frac{(a+b)^2}{\frac{a^2}{n_1-1}+\frac{b^2}{n_2-1}}.

For the deliveries, a=1.6a=1.6 and b=1b=1, giving df≈71.752722\mathrm{df}\approx 71.752722. You can use a two-sample interval command to obtain this automatically.

If you are using a printed tt table

A conservative classroom option is df⁡=min⁡(n1−1,n2−1)\operatorname{df}=\min(n_1-1,n_2-1). For the deliveries, df=35\mathrm{df}=35 gives t∗≈2.030108t^*\approx 2.030108 and a 95%95\% interval of approximately (0.727,7.273) min(0.727, 7.273)\,\mathrm{min}.

This interval is slightly wider than the technology-based unpooled interval because the conservative df\mathrm{df} gives a larger t∗t^*. State which method you used. If your table lacks the selected row, follow the table’s instructions; using an available lower df\mathrm{df} preserves a conservative critical value.

What makes an interval wider or narrower?

  • Higher confidence: a larger t∗t^* and wider interval for the same data.
  • More variability: larger sample standard deviations increase SE⁡\operatorname{SE} and width, all else equal.
  • Larger samples: reduce contributions s12n1\frac{s_{1}^{2}}{n_{1}} and s22n2\frac{s_{2}^{2}}{n_{2}}, improving precision when variability stays similar.

If both sample sizes are multiplied by 44 and both sample standard deviations remain the same, SE⁡\operatorname{SE} becomes 12\frac12 of its original value. Under the usual unpooled procedure, df\mathrm{df} and t∗[Truncated]

Posted on Google Google
0000003998 : Abdad Alam Shamim Alam profile picture
0000003998 : Abdad Alam Shamim Alam
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
This is the bestest institution I have ever come to and I love it very much.
Posted on Google Google
Aliki S profile picture
Aliki S
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Posted on Google Google
Ali profile picture
Ali
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Sly is him
Posted on Google Google
Jitendra Kumar Kumawat profile picture
Jitendra Kumar Kumawat
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Posted on Google Google
Raahil Hasan profile picture
Raahil Hasan
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
Posted on Google Google
Tina Mudarres profile picture
Tina Mudarres
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
The classes are amazing and my child learnt so much
Posted on Google Google
alisha gadoya profile picture
alisha gadoya
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
I have experienced a lot of good things, it has taught me so many things and from B/Cs I have gone to an A! This is wonderful and Mavish’s class is awesome.
Posted on Google Google
smasher 123 profile picture
smasher 123
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
It’s sensational my kid went. First he only would get C now it’s all A’s really good and recommend
Posted on Google Google
Mosa Al- Samaraie profile picture
Mosa Al- Samaraie
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
AMAZING PRICES GREAT TEACHERS STRAIGHT FORWARD LEARNING STEADY PACE IN TUTORING
Posted on Google Google
Cael Dagnelie profile picture
Cael Dagnelie
Google star 1Google star 2Google star 3Google star 4Google star 5Trustindex verifies that the original source of the review is Google.
I had a great experience learning math with Ms. Mavish. She explains complex topics in a very clear and simple way, which made it easier for me to understand and enjoy the subject. Her patience and dedication really stood out, and she always made sure that everyone in the class was keeping up. I especially appreciated how approachable she was — I never felt afraid to ask questions, and she was always willing to help. Thanks to her teaching, my confidence in math has grown a lot. I’m really thankful for the effort she puts into every lesson!

NUM8ERS is one of finest tutoring institutes in UAE, Located in Al Barsha 1, Dubai. Close to DUBAI AMERICAN ACADEMY (DAA) & AMERICAN SCHOOL OF DUBAI (ASD).