← Back to course

Paired Data & Two-Sample Means

You’ll be able to

Paired data: analyze the differences

Data are paired when each observation in one group is naturally matched to one in the other — the same subject measured twice (before/after), or matched pairs. The correct analysis is not a two-sample test: instead, compute the difference for each pair and run a one-sample t procedure on those differences. The hypotheses become H₀: μ_diff = 0 versus an alternative about μ_diff.

Paired vs. independent

The design determines the procedure. If a single sample provides two linked measurements (or subjects are deliberately matched), it is paired → one-sample t on differences. If two separate, independent groups are compared (e.g., a treatment group and a control group of different individuals), it is a two-sample t procedure. Misreading a paired design as two independent samples is a classic error.

Paired and two-sample t procedures
paired: t = (x-bar_diff − 0) / (s_diff / sqrt(n)), df = n − 1 · two-sample: t = (x-bar₁ − x-bar₂) / sqrt( s₁²/n₁ + s₂²/n₂ )
Paired reduces to a one-sample t on the differences. The two-sample standard error adds the two variance contributions (independence). Use technology for the two-sample df.
Worked example

Ten runners record their times before and after a training program. The mean improvement (before − after) is 3.2 seconds with s_diff = 4.0 seconds. Test whether training reduced times, at α = 0.05.

  1. 1.This is paired data (same runner measured twice), so analyze the 10 differences with a one-sample t. H₀: μ_diff = 0 vs. Hₐ: μ_diff > 0 (improvement).
  2. 2.Standard error: s_diff/sqrt(n) = 4.0/sqrt(10) ≈ 1.265.
  3. 3.t = (3.2 − 0)/1.265 ≈ 2.53, with df = 10 − 1 = 9.
  4. 4.p-value = P(t₉ > 2.53) ≈ 0.016, which is less than 0.05.
Answer: Treating the data as paired, t ≈ 2.53 with df = 9 gives p ≈ 0.016 < 0.05, so we reject H₀. There is convincing evidence that the training program reduced mean running times.
Checkpoint

Researchers measure each subject’s blood pressure before and after taking a medication. Which procedure is appropriate?

On the exam

Spot paired data by asking: is there a natural one-to-one link between the two measurements (same subject twice, twins, matched pairs)? If yes, take differences and run a one-sample t. Only use a two-sample t when the two groups are genuinely independent.

Checkpoint

Two independent samples have x-bar₁ = 20 (s₁ = 4, n₁ = 25) and x-bar₂ = 17 (s₂ = 3, n₂ = 25). What is the standard error of x-bar₁ − x-bar₂?

Answer the 2 checkpoints as you read.

Sign in to save your progress