Understanding the paired t-test — concept and principle
A paired t-test compares two measurements taken on the same units: blood pressure before and after a treatment, scores on a pre-test and post-test, or two instruments measuring the same samples. Because each pair shares the same subject, the test works on the differences within pairs, which removes the large person-to-person variation and makes it far more sensitive than an independent two-sample test.
How it is calculated
- For each pair compute the difference d = After − Before.
- Mean difference d̄ and standard deviation of the differences s_d (divisor n − 1).
- Standard error: SE = s_d ÷ √n, where n is the number of pairs.
- t = d̄ ÷ SE, with n − 1 degrees of freedom.
- Two-tailed p-value = 2 × P(T > |t|).
A positive mean difference means the "After" values are higher on average. The result is in the units of the measurements.
The principle
A paired t-test is simply a one-sample t-test applied to the differences, testing H₀: mean difference = 0. Stable traits of each subject (some people always score high, others low) appear in both measurements and cancel when you subtract, so only the change is left. The smaller the spread of the differences, the smaller the standard error and the easier it is to detect a real change.
Worked example
- Before: 80, 75, 90, 68, 72. After: 84, 79, 91, 74, 75 (n = 5 pairs).
- Differences: 4, 4, 1, 6, 3. Mean difference d̄ = 18 ÷ 5 = 3.6.
- s_d = 1.816590; SE = 1.816590 ÷ √5 = 0.812404.
- t = 3.6 ÷ 0.812404 = 4.431293675, with df = 4.
- Two-tailed p = 0.0114105717.
How to read the result
Every participant improved, by 3.6 points on average. With 4 df the 5% critical value is about 2.776, and t = 4.43 exceeds it, so p ≈ 0.011 < 0.05: the improvement is statistically significant. Whether 3.6 points matters in practice depends on the scale; a 95% confidence interval for the mean change (d̄ ± 2.776 × 0.812, about 1.3 to 5.9) is a useful companion.
Common mistakes
- Entering the groups in a different order for Before and After, which breaks the pairing.
- Analysing paired data with an independent two-sample test, which usually gives a much larger p-value. Here the independent Welch test would give p ≈ 0.49.
- Forgetting that the sign of the mean difference depends on which column is subtracted.
Frequently asked questions
What if one value of a pair is missing?
That pair must be dropped; the calculator needs the same number of Before and After values in matching order.
Is there a non-parametric alternative?
Yes, the Wilcoxon signed-rank test works on the ranks of the differences.
Can I use it for two different but matched people?
Yes, if they were deliberately matched (twins, matched age and sex), the pairs can be analysed this way.
Sources: Student (1908). The probable error of a mean. Biometrika, 6(1), 1–25. · NIST/SEMATECH e-Handbook of Statistical Methods.