When to use a paired t-test

By Jude Wallis · Published

Use a paired t-test when every value in one group is naturally matched to exactly one value in the other: before and after on the same subject, twins, left and right hand. Compute the differences first, then run a one-sample t procedure on that single column, with $df = n_{\text{pairs}} - 1$.

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.2 Constructing a Confidence Interval for a Population Mean or Population Mean Difference). The Fall 2026 AP Statistics course treats a matched pairs design as two dependent samples whose differences form one sample, analyzed in Unit 4 with a one-sample t procedure for a population mean difference.

The decision rule in one sentence

Ask whether each value in one group is naturally matched to exactly one value in the other. If yes, the data are paired and you subtract before you test. If no, the two groups stand on their own and you run an independent two-sample t procedure.

The word "naturally" is doing real work there. The match has to come from how the data were produced, not from how they happen to be listed. Two columns printed side by side in a spreadsheet are not paired unless row 7 of the first column and row 7 of the second column describe the same subject, the same twin set, or the same physical object.

Three structures produce genuine pairs:

  • Repeated measures. The same subject is measured twice, before and after a treatment, or under two conditions in a randomly assigned order.
  • Matched subjects. Subjects are paired on a characteristic that matters, then one member of each pair gets each treatment. Twins, littermates, and students matched on a pretest score all qualify.
  • Natural pairs within one unit. Left hand and right hand, the two halves of a split soil sample, two tires on the same axle.

Sample size gives you a fast tell. If the two groups have different counts, say 30 and 26, no matching is possible and the design is independent. Equal counts do not prove pairing, but unequal counts rule it out.

Subtract first, then run a one-sample t

A paired t-test is not a separate formula to memorize. Collapse the two columns into one column of differences, then run the one-sample t procedure you already know on that column.

  1. Compute di=x1ix2id_i = x_{1i} - x_{2i} for each pair, and state the order of subtraction out loud.
  2. Find dˉ\bar{d} (d-bar, the mean of the differences) and sds_d, the sample standard deviation of the differences.
  3. Test H0:μd=0H_0: \mu_d = 0 against a one-sided or two-sided alternative, where μd\mu_d (mu-sub-d, the population mean difference) is the true mean of the differences.
  4. Compute the statistic and the degrees of freedom:
t=dˉ0sd/n,df=npairs1t = \frac{\bar{d} - 0}{s_d/\sqrt{n}}, \qquad df = n_{\text{pairs}} - 1

Here nn is the number of pairs, not the number of measurements. Nine volunteers measured twice give 18 numbers, 9 differences, and df=8df = 8. Counting the measurements would give df=17df = 17 and a p-value smaller than the truth.

Stating the order of subtraction matters as much as the arithmetic. "Old time minus new time" makes a positive dˉ\bar{d} mean the new interface is faster; reverse the order and every sign flips, including the endpoints of any interval. The four-step structure is the same one laid out in the one-sample t-test walkthrough.

The conditions apply to the differences

Once you have subtracted, the original two columns stop mattering. Check all three conditions on the single column of differences.

Random. The data come from a random sample or a randomized experiment. In a repeated-measures design, randomizing the order of the two conditions within each subject is what protects you from practice effects and fatigue.

10%. When sampling without replacement, the population must be at least 10 times the number of pairs.

Sample data. If the number of differences is at least 30, you are fine. If it is under 30, the sample of differences should show no strong skewness and no outliers. Note that this is a claim about the differences: the raw before and after values can be wildly skewed while their differences sit in a tidy symmetric cluster.

There is no independence condition between the two columns, and there should not be. Paired data are dependent by design; the two measurements on one subject are supposed to move together. The independence you need is between pairs, meaning one volunteer's difference tells you nothing about another's.

Why running two independent samples throws the pairing away

Both procedures estimate the same quantity. The difference of the two sample means xˉ1\bar{x}_1 and xˉ2\bar{x}_2 (x-bar, the sample mean) always equals the mean of the differences, so xˉ1xˉ2=dˉ\bar{x}_1 - \bar{x}_2 = \bar{d} exactly. What changes is the standard error underneath it, and that is where the pairing pays off.

Take the library data from the worked example below: 9 volunteers timed on an old catalog interface and a new one. Same 18 numbers, two ways of analyzing them.

AnalysisSEtdfTwo-sided p
Paired, on the 9 differences0.6674.50080.0020
Independent two-sample, ignoring pairing2.8731.04415.350.313

The estimate is 3.0 seconds either way. The paired standard error is more than four times smaller, and the same 3 seconds goes from unremarkable to strong evidence.

The reason is visible in the raw times. Volunteers ranged from 39 to 60 seconds on the old interface, so the sample standard deviations are large: s1=6.692s_1 = 6.692 and s2=5.434s_2 = 5.434 seconds. That spread is mostly people being naturally fast or slow, and the two-sample standard error treats all of it as noise. Subtracting removes it, because each volunteer serves as the comparison for themselves. The 9 differences have sd=2s_d = 2 seconds, far tighter than either column.

So the paired test usually wins on power, the probability of detecting a real effect. Two caveats keep that honest. The gain comes from the two measurements in a pair being positively correlated, which is what happens when subjects differ a lot from each other. And pairing costs degrees of freedom: 8 here instead of about 15. When the pairing is meaningless, that lost df makes the paired test slightly less powerful. Design the pairing so it captures a real source of variation, and the trade is worth taking.

Classify the design before you pick the test

Run these three checks on any comparison of two means, in order.

  1. Count the values in each group. Different counts mean independent samples, and you are done.
  2. Try to name the link. Say out loud what connects the first value in group 1 to the first value in group 2. If you can finish the sentence with "the same person", "the same twin pair", or "the same object", the data are paired. If the best you can manage is "they are both in row 1", they are not.
  3. Ask how the treatments were assigned. Randomly assigning subjects into two separate groups gives independent samples. Randomly assigning the order of two conditions within each subject gives pairs.

One common trap sits behind check 3. A completely randomized design splits 40 volunteers into a group of 20 and a group of 20, and equal group sizes make it look paired. It is not: volunteer 7 in the first group has no counterpart in the second. Compare that with a matched pairs design, where 20 pairs are formed first and then one member of each pair is randomly assigned to each treatment. See paired vs two-sample t-test for the side-by-side version, and matched pairs design for the design vocabulary.

Mistakes that change the answer

  • Using the number of measurements for nn. With 9 pairs you have df=8df = 8, not 17.
  • Computing sds_d from the raw columns instead of from the differences. In the library data that swaps sd=2s_d = 2 for values near 6, and the test statistic collapses.
  • Leaving the order of subtraction unstated. The reader cannot tell whether a positive dˉ\bar{d} means faster or slower.
  • Testing H0:μ1=μ2H_0: \mu_1 = \mu_2 instead of H0:μd=0H_0: \mu_d = 0. They agree numerically here, but only the second names the parameter the paired procedure actually estimates.
  • Checking normality on the before and after columns rather than on the differences. The condition applies to the column you are testing.
  • Reaching for the Welch degrees of freedom. Paired data give a whole number, npairs1n_{\text{pairs}} - 1; a decimal df belongs to the two-sample procedure, as explained in why df is a decimal on a two-sample t-test.

Check your arithmetic against the one-sample t-test calculator by entering the differences as a single sample.

A paired t-test end to end, from raw times to a conclusion

A library is testing a new catalog interface. Nine users, randomly selected from the library's several thousand registered members, each search for an assigned title twice, once on the old interface and once on the new one, with the order randomly assigned. Times in seconds are old: 48, 41, 55, 39, 60, 44, 52, 47, 50 and new: 42, 41, 50, 38, 55, 42, 50, 44, 47, listed by user. Is there convincing evidence at α=0.05\alpha = 0.05 that the new interface is faster on average?

  1. Recognize the design: each user is measured under both interfaces, so the values are paired user by user and you analyze the differences.

  2. Differences, old minus new, so a positive value means the new interface was faster: 4842=648-42=6, 4141=041-41=0, 5550=555-50=5, 3938=139-38=1, 6055=560-55=5, 4442=244-42=2, 5250=252-50=2, 4744=347-44=3, 5047=350-47=3.

  3. State: let μd\mu_d be the true mean of (old time minus new time) for this population of users. H0:μd=0H_0: \mu_d = 0 against Ha:μd>0H_a: \mu_d > 0, at α=0.05\alpha = 0.05.

  4. Conditions. Random: the 9 users were randomly selected and the order of the two interfaces was randomly assigned within each user. 10%: the library has several thousand members, more than 10×9=9010 \times 9 = 90. Sample data: there are 9 differences, fewer than 30, and the values 0, 1, 2, 2, 3, 3, 5, 5, 6 show no strong skewness and no outliers.

  5. Mean difference: dˉ=6+0+5+1+5+2+2+3+39=279=3.0\bar{d} = \frac{6+0+5+1+5+2+2+3+3}{9} = \frac{27}{9} = 3.0 seconds.

  6. Deviations from 3 and their squares: 393 \to 9, 39-3 \to 9, 242 \to 4, 24-2 \to 4, 242 \to 4, 11-1 \to 1, 11-1 \to 1, 000 \to 0, 000 \to 0. Sum of squares =9+9+4+4+4+1+1+0+0=32= 9+9+4+4+4+1+1+0+0 = 32.

  7. Sample variance of the differences: sd2=3291=328=4s_d^2 = \frac{32}{9-1} = \frac{32}{8} = 4, so sd=4=2.0s_d = \sqrt{4} = 2.0 seconds.

  8. Standard error: SE=sdn=2.09=2.03=0.6667SE = \frac{s_d}{\sqrt{n}} = \frac{2.0}{\sqrt{9}} = \frac{2.0}{3} = 0.6667 seconds.

  9. Test statistic and degrees of freedom: t=3.000.6667=4.500t = \frac{3.0 - 0}{0.6667} = 4.500 with df=91=8df = 9 - 1 = 8.

  10. One-sided p-value: P(T8>4.500)=0.0010P(T_8 > 4.500) = 0.0010. The two-sided value would be 2×0.0010=0.00202 \times 0.0010 = 0.0020.

  11. Table check on the t-table: row 8 has an upper-tail 0.005 entry of 3.355, and 4.5004.500 exceeds it, so the one-tail area is below 0.005, consistent with 0.0010.

  12. Decide: p=0.0010<α=0.05p = 0.0010 < \alpha = 0.05, so reject H0H_0.

  13. Estimate the size of the effect. With the critical value t=2.306t^* = 2.306 (t-star) at df=8df = 8, the 95% interval for μd\mu_d is 3.0±2.306×0.6667=3.0±1.5373.0 \pm 2.306 \times 0.6667 = 3.0 \pm 1.537.

dˉ=3.0\bar{d} = 3.0 s, sd=2.0s_d = 2.0 s, SE=0.6667SE = 0.6667 s, t=4.500t = 4.500, df=8df = 8, and the one-sided p=0.0010p = 0.0010. Reject H0H_0: there is convincing evidence that the new interface is faster on average for this population of users. The 95% confidence interval for the mean improvement is (1.463,4.537)(1.463, 4.537) seconds.

Classify two designs before testing anything

For each study, decide whether a paired t procedure or an independent two-sample t procedure applies, and say what the degrees of freedom would be. (a) A soil lab splits each of 12 field samples into two halves, sends one half to Lab A and the other half to Lab B, and records the nitrogen reading from each. (b) An orchard measures fruit diameter on 30 randomly chosen trees in an organic block and 26 randomly chosen trees in a conventional block.

  1. Study (a), check the counts: 12 readings from Lab A and 12 from Lab B, so pairing is at least possible.

  2. Study (a), name the link: reading ii from Lab A and reading ii from Lab B come from the same field sample. That is a natural pair within one physical unit, so the design is paired.

  3. Study (a), set up the analysis: compute 12 differences (Lab A reading minus Lab B reading), test H0:μd=0H_0: \mu_d = 0 with a one-sample t procedure on those differences, and use df=121=11df = 12 - 1 = 11.

  4. Study (b), check the counts: 30 trees against 26 trees. Unequal group sizes make one-to-one matching impossible, so the design cannot be paired.

  5. Study (b), name the link: tree 1 in the organic block has nothing connecting it to tree 1 in the conventional block beyond list position, which is not a link.

  6. Study (b), set up the analysis: an independent two-sample t procedure for μ1μ2\mu_1 - \mu_2, with the unpooled standard error s12/30+s22/26\sqrt{s_1^2/30 + s_2^2/26} and a Welch degrees of freedom from technology, falling between min(29,25)=25\min(29, 25) = 25 and 30+262=5430 + 26 - 2 = 54.

(a) Paired: analyze the 12 differences with a one-sample t procedure, df=11df = 11. (b) Independent two-sample t procedure, with a decimal Welch df between 25 and 54. The unequal sample sizes in (b) settle the question on their own.

Frequently asked questions

Is a paired t-test the same as a one-sample t-test?

Once you subtract, yes. The paired procedure is a one-sample t procedure applied to the column of differences, testing H0:μd=0H_0: \mu_d = 0 with df=npairs1df = n_{\text{pairs}} - 1. The only extra work is computing the differences and stating the order of subtraction.

What if the two groups have different sample sizes?

Then the data cannot be paired, since pairing requires each value in one group to have exactly one partner in the other. Use an independent two-sample t procedure. Unequal counts are the quickest way to rule out pairing on a timed exam.

Does the order of subtraction change the conclusion?

It flips every sign but not the decision. Reversing the order turns dˉ=3.0\bar{d} = 3.0 into 3.0-3.0 and t=4.500t = 4.500 into 4.500-4.500, and a one-sided alternative flips from μd>0\mu_d > 0 to μd<0\mu_d < 0. The p-value is unchanged. State the order so the reader knows which direction a positive difference means.

Can pairing ever hurt?

Yes, though rarely by much. A paired analysis of nn pairs has about half the degrees of freedom of a two-sample analysis of the same 2n2n measurements, which slightly widens the t curve. If the paired measurements are unrelated, that lost df is not repaid by any reduction in the standard error, and the paired test comes out marginally weaker. Pair on something that genuinely predicts the response.

Do I need to check that the before and after columns are normal?

No. The sample data condition applies to the differences, since those are what the test analyzes. With fewer than 30 differences, check that the differences show no strong skewness and no outliers. Heavily skewed raw columns can still produce well-behaved differences.