Paired vs two-sample t-test: which to use
By Jude Wallis · Published
Use a paired t-test when each observation in one group is naturally matched to one in the other (same subject, before and after); use a two-sample t-test when the two groups are independent with no pairing.
AP Statistics: Unit 4 (topics 4.4 Setting Up a Test for a Population Mean or Population Mean Difference, 4.5 Carrying Out a Test for a Population Mean or Population Mean Difference, 4.9 Setting Up a Test for the Difference Between Two Population Means, 4.10 Carrying Out a Test for the Difference Between Two Population Means). In the Fall 2026 AP Statistics course, a matched pairs design is analyzed as a one-sample t procedure on the differences (the population mean difference in topics 4.4 and 4.5), while two independent groups use the two-sample t procedures in topics 4.9 and 4.10.
What a paired t-test is
A paired t-test applies when your two sets of numbers come in natural pairs, so each value in one group is linked to exactly one value in the other. Common sources of pairing are the same subject measured twice (before and after) and two subjects deliberately matched on key traits. You collapse each pair into a single difference, which turns two dependent samples into one sample of differences. The analysis is then a one-sample t procedure on those differences, testing the population mean difference (mu-d, the mean of the paired differences).
What a two-sample t-test is
A two-sample t-test applies when the two groups are independent, meaning no observation in one group is tied to any particular observation in the other. Two separate random samples, or two treatment groups formed by random assignment, are the usual setup. Here you compare the two population means directly, testing the difference . The standard error keeps each group's spread separate, , and the two sample sizes need not be equal.
Paired vs two-sample at a glance
The deciding feature is the structure of the data, and everything else follows from it.
| Feature | Paired t-test | Two-sample t-test |
|---|---|---|
| Data structure | Matched pairs (dependent) | Two independent groups |
| Parameter | Mean difference | Difference of means |
| What you analyze | One sample of differences | Two separate samples |
| Standard error | ||
| Degrees of freedom | (pairs minus 1) | From technology |
| Sample sizes | Equal by design (one per pair) | Can differ |
When to use which
Decide by looking at how the data are organized, not by what you are comparing. If every value in one column corresponds to exactly one value in the other through a subject or a match, the design is paired and you work with the differences. If the two groups were gathered or assigned independently, with no one-to-one link, the design calls for a two-sample test. When a study measures the same individuals under two conditions, that is the clearest signal to pair.
The classic mix-up and how to avoid it
The frequent mistake is running a two-sample t-test on data that are actually paired, which throws away the pairing and usually inflates the standard error, hiding a real effect. The reverse error, pairing two groups that have no natural correspondence, is not valid at all. Guard against both by asking a single question before you choose: does each observation in group A match one specific observation in group B? If yes, pair the data; if no, run a two-sample test with which statistical test to use as a backstop.
Paired data done right: a before-and-after study
Four students each take a practice test, complete a short course, then retake it. Their score pairs (before, after) are A: (70, 75), B: (80, 88), C: (65, 66), and D: (90, 96). Test whether the course raised scores, using the mean difference (after minus before).
Form the difference after minus before for each student: .
Mean of the differences: .
Squared deviations from : ; ; ; . Their sum is .
Sample variance of the differences: , so .
Standard error and test statistic with pairs: , and on degrees of freedom.
For contrast, ignoring the pairing and running a two-sample t-test on the four before scores and four after scores gives a standard error of about and . The paired analysis is far more sensitive because it removes the large student-to-student differences.
The paired t-test gives with 3 degrees of freedom, strong evidence the course helped; the same numbers analyzed as two independent samples would give only and miss the effect.
Frequently asked questions
Is a paired t-test the same as a one-sample t-test?
Mechanically, yes. Once you reduce each pair to a single difference, a paired t-test is exactly a one-sample t-test run on the column of differences, testing whether the mean difference is 0.
Why does pairing usually give a smaller standard error?
Pairing subtracts out the variation that comes from differences between subjects, leaving only the variation in the change itself. When subjects differ a lot from each other, removing that source of noise shrinks the standard error and makes a real effect easier to detect.