Paired T-Test: Formula, Assumptions and Example

A paired t-test compares two measurements taken on the same people or things, such as before and after a treatment, or left hand versus right hand. It works on the differences within each pair, which removes the variation between individuals and makes the test far more sensitive.

A worked example

Eight people record their resting heart rate before and after six weeks of training.

PersonBeforeAfterDifference
172684
280764
368671
475705
584795
677752
770691
879745
  1. Find each difference (before − after), as in the last column.
  2. Mean difference d̄ = 3.375 beats per minute. SD of the differences sd = 1.768.
  3. Standard error = 1.768 ÷ √8 = 0.625.
  4. t = 3.375 ÷ 0.625 = 5.40, with df = 8 − 1 = 7.
  5. p = 0.001. Resting heart rate dropped significantly.

Run the heart-rate example in the paired t-test calculator

Why pairing makes such a difference

Before the training, these people’s heart rates ranged from 68 to 84, a standard deviation of about 5.4. But every single one of them went down, by between 1 and 5 beats. The differences have a standard deviation of only 1.8. The paired test only sees the differences, so the large gaps between people don’t get in the way.

If you ran an independent-samples t-test on the same numbers by mistake, you would get t = 1.37 and p = 0.19. Not significant. Same data, opposite conclusion. Choosing the right test matters.

Is my data paired?

Your data are paired if each value in one column belongs with one specific value in the other. Common cases:

  • The same person measured twice (before and after, or under two conditions).
  • Matched pairs, such as twins, or patients matched on age and sex.
  • Two measurements on the same object, such as two labs testing the same blood sample.

If you could shuffle one column without losing anything, the data are not paired. Use the independent-samples t-test.

Assumptions

The differences should be roughly normal. The before and after values themselves don’t need to be. With small samples, check the differences for outliers. If one pair has a huge difference that doesn’t fit, the Wilcoxon signed-rank test is safer.

Common mistakes

  • Entering the two columns in a different order. Person 3’s before value must line up with person 3’s after value.
  • Dropping a person from one column but not the other. If someone has no after reading, remove their before reading too.
  • Mixing up the sign. Before − after = +3.4 means the rate went down. After − before = −3.4 means the same thing. Say which way round you did it.

Check yourself

Ten students take a quiz before and after a lesson. The mean gain is 2 points and the SD of the gains is 4. What is t?

SE = 4 ÷ √10 = 1.265, so t = 2 ÷ 1.265 = 1.58 with df = 9. The p-value is about 0.15, so not significant at 0.05.

You compare reaction times of 20 people in the morning with 20 different people in the evening. Paired or independent?

Independent. Different people are in each group, so there is nothing to pair.