AP Statistics · Topic 4.7 · Reading guide, about 5 min

Building a two-sample t-interval

Build a two-sample t-interval for mu1 minus mu2, with parameters, conditions, standard error, degrees of freedom and margin of error.

In one minute

When you want to estimate how much two population means differ, you take one sample from each group, or randomly assign subjects to two treatments, and build a two-sample t-interval for μ1−μ2\mu_1 - \mu_2. It extends the one-sample t-interval, with a standard error that combines both groups.

Here we focus on building the interval correctly: naming it, defining the parameters, checking conditions, and computing each piece.

Key terms

Two-sample t-interval
An interval estimate for μ1−μ2\mu_1 - \mu_2 based on two independent samples or two randomly assigned groups.
Parameter μ1−μ2\mu_1 - \mu_2
The true difference between the two population means (or treatment means), in the order you state.
Point estimate xˉ1−xˉ2\bar{x}_1 - \bar{x}_2
The difference of the sample means, the center of the interval.
Standard error
s12n1+s22n2\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}, the estimated standard deviation of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2.
Margin of error
t∗t^* times the standard error.
Degrees of freedom
Given by technology, a number between the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 and n1+n2−2n_1 + n_2 - 2. The smaller of the two is the conservative choice.
Randomized experiment
A study that assigns subjects to treatments at random, so groups can be compared without bias and cause and effect can be investigated.
Pooling
Combining the two sample standard deviations into one. Do not pool for two-sample t procedures.

Naming the procedure and defining parameters

State "two-sample t-interval for μ1−μ2\mu_1 - \mu_2." Then define each mean in words and context, and say which group is first. For example: "Let μ1\mu_1 be the true mean exam score of students who study with spaced practice and μ2\mu_2 the true mean exam score of students who study by cramming." The order sets the sign of everything that follows.

Choose this procedure when the two groups are independent: separate individuals with no pairing. If each value in one group is matched to one in the other, such as before and after on the same person, use the matched pairs interval from 4.2.

Conditions

Randomization: a separate random sample from each population, drawn independently of the other, or an experiment whose subjects were randomly assigned.

10% condition: for each sample drawn without replacement, the sample size is less than 10% of that population. This does not apply to a randomized experiment.

Normality: the sampling distribution of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 is approximately normal if both n1≥30n_1 \ge 30 and n2≥30n_2 \ge 30, or if both populations are approximately normal. If either sample is under 30, look at both samples: neither should show strong skew or outliers.

The interval

The interval is (xˉ1−xˉ2)±t∗s12n1+s22n2(\bar{x}_1 - \bar{x}_2) \pm t^* \sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}. Use each group's own standard deviation. Never combine them into one pooled value. The critical value t∗t^* comes from technology, which also supplies the degrees of freedom.

If you must use a table, use the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 as df. This is safe: it gives a larger t∗t^* and a slightly wider interval, so it never overstates your precision. Technology's df is between that value and n1+n2−2n_1 + n_2 - 2.

Parts of the two-sample t-interval
PieceFormula
Point estimatexˉ1−xˉ2\bar{x}_1 - \bar{x}_2
Standard errors12/n1+s22/n2\sqrt{s_1^2/n_1 + s_2^2/n_2}
Margin of errort∗×t^* \times standard error
Intervalpoint estimate ±\pm margin of error

Worked example

In an invented study, 65 students volunteer for an experiment and are randomly assigned to two study plans. Group 1 uses spaced practice (n1=30n_1 = 30, xˉ1=78.4\bar{x}_1 = 78.4, s1=9.2s_1 = 9.2 points on a later exam). Group 2 crams (n2=35n_2 = 35, xˉ2=72.1\bar{x}_2 = 72.1, s2=11.0s_2 = 11.0). Build a 95% interval.

Procedure and parameters: two-sample t-interval for μ1−μ2\mu_1 - \mu_2, where μ1\mu_1 is the true mean later-exam score for students like these using spaced practice and μ2\mu_2 the true mean score for students using cramming.

Conditions: students were randomly assigned, so the 10% condition does not apply. Both n1=30n_1 = 30 and n2=35n_2 = 35 are at least 30, so the sampling distribution of the difference is approximately normal.

Calculation: the point estimate is 78.4−72.1=6.378.4 - 72.1 = 6.3. The standard error is 9.2230+11.0235=2.8213+3.4571=6.2785≈2.5057\sqrt{\dfrac{9.2^2}{30} + \dfrac{11.0^2}{35}} = \sqrt{2.8213 + 3.4571} = \sqrt{6.2785} \approx 2.5057. Technology gives df≈62.97df \approx 62.97 and t∗≈1.998t^* \approx 1.998. The margin of error is 1.998×2.5057≈5.0071.998 \times 2.5057 \approx 5.007, so the interval is 6.3±5.007=(1.29,11.31)6.3 \pm 5.007 = (1.29, 11.31).

With the conservative df=29df = 29 (smaller of 29 and 34), t∗=2.045t^* = 2.045, the margin is about 5.124, and the interval is (1.18,11.42)(1.18, 11.42), slightly wider, with the same conclusion.

Conclusion: with 95% confidence, the true mean later-exam score under spaced practice is between about 1.3 and 11.3 points higher than under cramming. The interval is entirely above 0, and because the groups were randomly assigned, the difference can reasonably be credited to the study plan.

How it connects

  • Back to 4.2: the structure (estimate plus critical value times standard error) is the same; only the standard error changes.
  • Back to 4.6: the standard error estimates the spread of xˉ1−xˉ2\bar{x}_1 - \bar{x}_2 by replacing each σ\sigma with s.
  • Forward to 4.8: interpret the interval, including what it says about 0 and which mean is larger.

Common mistakes

  • Pooling the standard deviations. Two-sample t procedures keep s1s_1 and s2s_2 separate.
  • **Using n1+n2−2n_1 + n_2 - 2 as df.** That is the largest possible value. Use technology, or the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 for the safe choice.
  • Treating paired data as two independent samples. The design decides: matched individuals mean one sample of differences.
  • Skipping the order of subtraction. State which mean comes first; it determines the sign of the interval.

How it shows up on the exam

  • A study description where you choose between two-sample and paired procedures from the design, name the interval and define μ1\mu_1 and μ2\mu_2.
  • Summary statistics or technology output from which you build and complete the interval with conditions in context.
  • A question asking which sample-size or normality evidence you need, given two small samples and graphs.

Check yourself

  1. What makes two samples independent, and what is a design that is not?
  2. Why is the smaller of n1−1n_1 - 1 and n2−1n_2 - 1 called the conservative df?
  3. Do you need the 10% condition in a randomized experiment, and why or why not?
  4. What would you do if one of two samples of size 14 shows an extreme outlier?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.