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 μd\mu_d (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 μ1μ2\mu_1 - \mu_2. The standard error keeps each group's spread separate, s12n1+s22n2\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}, 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.

FeaturePaired t-testTwo-sample t-test
Data structureMatched pairs (dependent)Two independent groups
ParameterMean difference μd\mu_dDifference of means μ1μ2\mu_1 - \mu_2
What you analyzeOne sample of differencesTwo separate samples
Standard errorsdn\frac{s_d}{\sqrt{n}}s12n1+s22n2\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}
Degrees of freedomn1n - 1 (pairs minus 1)From technology
Sample sizesEqual 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).

  1. Form the difference after minus before for each student: 5,8,1,65, 8, 1, 6.

  2. Mean of the differences: dˉ=5+8+1+64=204=5\bar{d} = \frac{5 + 8 + 1 + 6}{4} = \frac{20}{4} = 5.

  3. Squared deviations from dˉ=5\bar{d} = 5: (55)2=0(5-5)^2 = 0; (85)2=9(8-5)^2 = 9; (15)2=16(1-5)^2 = 16; (65)2=1(6-5)^2 = 1. Their sum is 0+9+16+1=260 + 9 + 16 + 1 = 26.

  4. Sample variance of the differences: sd2=2641=263=8.6667s_d^2 = \frac{26}{4 - 1} = \frac{26}{3} = 8.6667, so sd=8.6667=2.9439s_d = \sqrt{8.6667} = 2.9439.

  5. Standard error and test statistic with n=4n = 4 pairs: SE=sd4=2.94392=1.4720SE = \frac{s_d}{\sqrt{4}} = \frac{2.9439}{2} = 1.4720, and t=dˉ0SE=51.4720=3.397t = \frac{\bar{d} - 0}{SE} = \frac{5}{1.4720} = 3.397 on n1=3n - 1 = 3 degrees of freedom.

  6. 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 8.688.68 and t0.58t \approx 0.58. The paired analysis is far more sensitive because it removes the large student-to-student differences.

The paired t-test gives t3.397t \approx 3.397 with 3 degrees of freedom, strong evidence the course helped; the same numbers analyzed as two independent samples would give only t0.58t \approx 0.58 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.