When the same subjects are measured twice
Before and after. Pre-test and post-test. Left hand and right hand. Paired data carry a gift: each subject serves as their own control, so the analysis works on the differences, and all the variation between subjects (some people just score higher) cancels out of the comparison. The paired t-test is simply a one-sample t-test on those differences, against a hypothesised difference of zero.
Eight students, quiz before and after a revision week. Differences (after − before): 6, 7, 5, 13, 14, 5, 6, 15; mean gain 8.875 marks, SD of differences 4.3239. t = 5.805 on 7 df, two-tailed p = 0.0007. The gain is real, and its 95% interval sits well clear of zero. Notice what pairing bought: the raw scores ranged from the low 70s to 91, so there was plenty of noise. The differences are far steadier, and the test is correspondingly stronger.
Assumptions, in plain sight
- The differences (not the raw scores) should be roughly normal. It is the only normality that matters here.
- Pairs are independent of each other: one student's gain must not sway another's.
- The pairing is real: same subject, matched twins, left/right. Arbitrary pairing of unrelated rows manufactures nothing.
Analysing paired data with the two-sample test. It still "works" mechanically, but it throws the pairing away, inflates the standard error, and can turn a clear effect (p = 0.0007 above) into a shrug.
Frequently asked questions
Does the order of before/after matter?
Only for the sign. This calculator computes after − before, so a positive mean difference means scores rose. Swap the columns and the t flips sign; the two-tailed p is unchanged.
What if some pairs are incomplete?
A pair with a missing side cannot produce a difference. Drop the pair. The calculator expects both columns to be the same length.