How to Perform a Paired T-Test (Step by Step)
Learn how to perform a paired t-test from start to finish. Step-by-step guide with worked examples, assumptions, and interpretation.
Start with identity, not two columns of numbers
A paired t-test analyzes a mean difference within the same units or defensibly matched pairs. Before and after measurements of eight students give eight differences, not sixteen independent students.
The small-sample normality condition concerns the differences. Pairs should be independent of other pairs. Two columns with the same length are not automatically paired.
1. Define the direction and question
Use d = after − before throughout this example. Test H₀: μ_d = 0 against H₁: μ_d ≠ 0, two-sided, with α = 0.05 chosen in advance.
If your calculator subtracts sample 2 from sample 1, enter after as sample 1 and before as sample 2 to match this direction. Reversing them changes the sign but not the two-sided p-value.
2. Calculate one difference per student
| Student | Before | After | After − before |
|---|---|---|---|
| 1 | 72 | 78 | 6 |
| 2 | 65 | 70 | 5 |
| 3 | 80 | 85 | 5 |
| 4 | 68 | 72 | 4 |
| 5 | 75 | 82 | 7 |
| 6 | 82 | 84 | 2 |
| 7 | 70 | 76 | 6 |
| 8 | 77 | 80 | 3 |
Keep row identity intact. Do not sort before and after separately. Resolve missing members of pairs consistently and describe any exclusions.
Download the paired scores (CSV)3. Summarize the differences
The differences sum to 38, so d̄ = 38/8 = 4.75 points. Their squared deviations from 4.75 sum to 19.5.
Use the SD of the differences, not the SD of before, the SD of after, or their unpaired average.
4. Calculate the test and interval
The two-sided p-value is about 0.0000876. The 95% critical value is 2.3646, giving:
At α = 0.05, reject the zero-mean-difference null under the model. The estimated change is positive, and the interval gives its uncertainty in the original score units.
Use the t-test calculator, paired mode:
- Sample 1 (after):
78,70,85,72,82,84,76,80 - Sample 2 (before):
72,65,80,68,75,82,70,77
It uses sample 1 minus sample 2 and calculates a two-sided test. The t-table connects the interval cutoff to df and tail probability.
5. Write a conclusion the design supports
“The eight students’ mean after-minus-before change was 4.75 points (95% t interval 3.35–6.15); the paired test gave t(7) = 8.05, two-sided p < 0.001.”
That is evidence of change under the model. It does not, by itself, establish that a teaching intervention caused it. Practice, time trends, changing conditions, or selection can also contribute. An appropriate randomized or controlled comparison is needed for a stronger causal claim.
6. Inspect assumptions and practical value
Plot the differences to look for extreme observations and strong asymmetry. Eight pairs offer limited evidence about shape. A large standardized effect does not validate the normal model or generalize the result to every student.
A paired standardized effect d_z = d̄/s_d is about 2.8459 here. Label the definition because other paired effect sizes use different denominators. Practical importance still depends on score meaning, costs, and the relevant population.
If the differences are unsuitable for mean-based t inference, choose an alternative that matches the question. Wilcoxon signed-rank has a symmetry requirement for a location interpretation; the sign test uses directions rather than magnitudes. See non-parametric methods.
Practice
If all differences change sign because you reverse subtraction, what happens to the two-sided p-value and interval?
Show the explanation
The two-sided p-value stays the same. The mean difference and t change sign. Interval [a, b] becomes [−b, −a]. The substantive direction must match the labels you report.
Further reading
The t-test lesson compares one-sample, independent, and paired designs. NIST’s two-sample t-test reference explains the distinction between paired and unpaired settings.
Statistics formula sheet
Essential formulas and critical values. Available to read, print, or download.
Related Articles
How to Read Statistical Tables (Z, T, F, χ²)
Learn how to read a z-table, t-table, chi-square table, and F-table. Annotated examples show exactly where to look for critical values.
Hypothesis Testing: A Beginner's Complete Guide
Learn to report a hypothesis test with its estimate, confidence interval, assumptions, and practical meaning using a complete example.
Pearson Correlation Coefficient Explained
Understand Pearson's r correlation coefficient with clear examples, formulas, and interpretation guidelines. Includes worked examples.