What is the difference between a paired and an unpaired (independent samples) t-test, and when should you use each?
A paired t-test is used when each observation in one group is naturally linked to one observation in the other — same subject before and after, or matched controls. An unpaired (independent-samples) t-test is used when the two groups have no subject-level correspondence. Pairing removes between-subject variance and increases power when that variance is substantial.
How to think about it
Choosing the wrong variant wastes power (unpaired on paired data) or inflates Type I error (paired on unrelated data). The decision flows from how the data were collected, not from the analyst’s preference.
Independent-samples (unpaired) t-test
Two separate groups with no linking structure between individuals. Examples: treatment vs control with random assignment to distinct groups; men vs women; users from two independent A/B buckets.
The test statistic compares x_bar1 - x_bar2 against the pooled (or Welch-adjusted) standard error of that difference.
Welch’s t-test (unequal variances assumed) is the safer default over Student’s pooled t-test:
t = (x_bar1 - x_bar2) / sqrt(s1^2/n1 + s2^2/n2)
Paired t-test
Each data point in group 1 is matched to exactly one data point in group 2. Compute the within-pair differences d_i = x_i1 - x_i2 and run a one-sample t-test on those differences against zero.
t = d_bar / (s_d / sqrt(n))
where n is the number of pairs, d_bar is the mean difference, and s_d is the standard deviation of differences.
Why pairing increases power
Between-subject variability (some people are just faster, taller, or sicker) inflates the standard error in an unpaired design. Pairing cancels this out — only within-subject variability remains in d_i. If the between-subject correlation is high, pairing can dramatically reduce SE and detect smaller effects with fewer subjects.
| Design | When | df |
|---|---|---|
| Unpaired | Two independent groups | n1 + n2 - 2 (or Welch df) |
| Paired | Matched pairs or repeated measures | n_pairs - 1 |
Example
Measuring blood pressure before and after a drug in 30 patients: paired (same patient, two time points). Comparing blood pressure between 30 patients who got the drug and 30 different patients who got placebo: unpaired.