Paired Data vs Two Independent Samples
The same design question the course keeps asking — are these two sets of numbers linked, or independent? — decides which t-procedure applies.
Recap, and a new question
The previous lesson gave you the two-sample Welch t-test for comparing the means of two independent groups — two separate samples with no link between an observation in one and an observation in the other.
But plenty of real data are not independent. A weight-loss program measures the same person before and after. A taste test asks the same taster to rate two recipes. A study matches each smoker to a similar non-smoker of the same age and sex. In every one of these, an observation in one group is deliberately tied to a specific observation in the other. That link changes which procedure is correct.
Ask one question before you touch a formula: was each observation in one group deliberately linked to one specific observation in the other?
- Yes (before/after on the same subject, matched pairs, twins, the same item measured twice) — use the paired t test.
- No (two separate, independently chosen groups) — use the two-sample Welch t test from the previous lesson.
WRONG: Analyzing paired data — before/after measurements, matched pairs, twins, the same subject measured twice — with the two-sample t-test.
RIGHT: When each observation in one group is deliberately linked to one in the other, you must use the paired t on the differences. A two-sample test applied to paired data uses the wrong standard error and the wrong degrees of freedom, and it throws away the within-pair correlation that pairing was designed to exploit — usually losing power you already paid for by pairing.
The paired t procedure: collapse two measurements into one
Pairing lets you sidestep subject-to-subject variability entirely. For each pair \( i \), compute the difference \( d_i = x_i - y_i \). Now you have a single sample of \( n \) differences — one per pair — and you run an ordinary one-sample t-test on that sample, exactly like the one-sample procedure from the previous lesson, just applied to the \( d_i \)'s instead of raw measurements.
This is the same matched-pairs idea from Designing Experiments: each subject serves as their own control, or two similar subjects are matched and treatments assigned within the pair. The design decision made back then is what makes this analysis valid now.
WRONG: 'Paired t has \( n_1 + n_2 - 2 \) degrees of freedom.'
RIGHT: Paired t works on the \( n \) differences: \( \text{df} = n - 1 \), where \( n \) is the number of pairs. There is only one sample here — of differences — not two.
WRONG: 'The t procedure requires the sample to be normal.'
RIGHT: The condition is that the population — for a paired t, the population of differences — is approximately normal, or that \( n \) is large enough for the central limit theorem to apply. You inspect your sample of differences for gross skew or outliers as evidence about that population, but the assumption itself is about the population, not the sample.
When two-group data really are two independent groups, not pairs, one more habit needs correcting.
WRONG: 'Always pool the two-sample variance.'
RIGHT: Prefer Welch's (unpooled) t: it does not assume the two groups have equal variances, and it is valid even when they differ — while giving nearly the same answer as the pooled t when the variances happen to be equal. The pooled t requires an equal-variance assumption that is rarely safe to make, so Welch is the house default.
A confidence interval for the paired difference
Just as a one-sample t statistic has a matching confidence interval, so does the paired t. Instead of testing whether the mean difference equals a hypothesized value, you can report a range of plausible values for the true mean difference \( \mu_d \) directly:
- Data (before, after, difference d = before minus after) for the 6 runners: (82, 76, 6), (78, 75, 3), (90, 82, 8), (85, 79, 6), (76, 74, 2), (88, 83, 5).
- Mean difference: \( \bar{d} = (6+3+8+6+2+5)/6 = 30/6 = 5.0 \) bpm.
- Deviations of the differences from 5 are 1, −2, 3, 1, −3, 0; squared they are 1, 4, 9, 1, 9, 0, summing to 24. Sample standard deviation: \( s_d = \sqrt{24/5} = \sqrt{4.8} \approx 2.191 \) bpm.
- Standard error: \( s_d/\sqrt{n} = 2.191/\sqrt{6} \approx 2.191/2.449 \approx 0.894 \) bpm.
- Test statistic: \( t = \bar{d}/(s_d/\sqrt{n}) = 5.0/0.894 \approx 5.59 \), with \( \text{df} = n - 1 = 5 \).
- For a one-sided test at \( \alpha = 0.05 \) with df = 5, the critical value is about 2.015; our t = 5.59 is far beyond it, so the p-value is well under 0.05.
- 95% confidence interval for the mean difference, using \( t^{*}_{5} \approx 2.571 \): \( 5.0 \pm 2.571 \times 0.894 \approx 5.0 \pm 2.30 \), i.e., about (2.70, 7.30) bpm.
WRONG: 'Since p > α we accept H0.'
RIGHT: We fail to reject H0 — insufficient evidence against it, not proof that it is true.
WRONG: 'The significant difference proves the treatment worked.'
RIGHT: A causal reading requires random assignment (see the scope-of-inference rule in Designing Experiments). A paired before/after study with no randomized control group shows an association within the subjects studied, not an airtight causal proof.
Check your understanding
- Two-group data are either linked (paired) or independent — decide this before choosing a test: a deliberate link between one observation and a specific observation in the other group means paired t; no link means two-sample Welch t.
- Paired t collapses two measurements into one: compute the differences d_i, then run a one-sample t on them, with df = n − 1 where n is the number of pairs.
- Applying a two-sample test to paired data gets the standard error and degrees of freedom wrong and throws away the within-pair correlation that pairing was designed to exploit.
- The two-sample Welch t (the house default, unpooled) remains the right tool for genuinely independent groups; its degrees of freedom are computed by software, between min(n1, n2) − 1 and n1 + n2 − 2.
- The normality condition is about the population — of differences, for a paired t — not the sample; you check the sample only for gross skew or outliers as evidence.
- A confidence interval for a paired mean difference is d-bar plus-or-minus t-star times s_d over root n; a significant result still needs random assignment before it supports a causal claim.