Paired Samples t-test

Statistics
Introduced by
Student (W. S. Gosset)
Year
1908
Type
Parametric mean comparison (paired)

What does it do?

The paired samples t-test is a parametric hypothesis test that compares two measurements taken on the same subjects, such as a reading before and after an intervention, to decide whether the average change differs from zero.

It rests on the t-distribution introduced by Student (W. S. Gosset) in 1908 and works on the within-subject difference scores rather than the raw measurements.

The intuition behind the method

When the same people are measured twice, for example before and after a training program, the two readings are linked, and comparing them as if they came from independent groups discards that link. The paired test first computes each person's change, then asks whether the average change is large relative to how much individual changes vary. Because stable differences between people cancel out in the subtraction, the test can detect a real average change that would be hidden in the spread of the raw scores.

History

The t-distribution on which the test rests was derived by William Sealy Gosset, writing as 'Student', in his 1908 Biometrika paper on the probable error of a mean. The paired form, applied to within-subject difference scores, became a standard tool for pre-test/post-test designs and is presented as a textbook method (Field, 2013). Cohen's work on statistical power analysis is a standard reference for effect sizes. The paired effect size used on this page, d = d̄ / s_d, divides the mean difference by the standard deviation of the difference scores.

When to use it

Use the paired t-test when the same units are measured twice on one continuous outcome, as in a pre-test/post-test design or a matched-pairs setup, and the question is whether the average change between the two measurements is zero. Each unit should contribute exactly one pair, the two measurements should be on the same scale, and the pairs should be independent of one another, so that no clustering or repeated pairs are present. Do not use it for two independent groups; for that, the independent t-test applies. The test assumes the difference scores are approximately normally distributed. Check this on the differences rather than the raw values, using a histogram or Q-Q plot together with a Shapiro-Wilk test. Normality matters most in small samples, where it is hard to assess and power is limited. If the differences are clearly skewed or heavy-tailed, the nonparametric Wilcoxon signed-rank test is a common alternative, although it addresses a related but different question.

Limitations and considerations

  • Requires genuinely paired data, such as repeated measurements on the same units or matched pairs; it cannot compare two independent groups.
  • Relies on the normality of the difference scores, and this assumption is hard to check and fragile in small samples.
  • Limited to exactly two related measurements; three or more time points call for a repeated-measures analysis such as repeated-measures ANOVA.
  • Assumes the pairs are independent of one another. Clustered data, such as several pairs drawn from the same subject or pairs that share a unit with other pairs, violate this assumption and make the result look more precise than it is.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Because the subtraction removes stable between-subject differences, the test can be more powerful than an independent t-test for the same effect, provided the paired measurements are positively correlated.
  • Reports a paired effect size, d = d̄ / s_d, alongside the p-value and the 95% confidence interval for the mean difference, so practical magnitude is visible and not only statistical significance.
  • Requires only the differences to be analysed, which keeps the calculation to a single sample of n values with n - 1 degrees of freedom.

Applications

  • Comparing a measurement before and after an intervention on the same participants (pre-test/post-test).
  • Evaluating change after a treatment, training program, or therapy within one group.
  • Comparing two conditions tested on the same subjects in a within-subjects experiment.
  • Assessing matched pairs, such as twins or case-control matches, on a continuous outcome.

How it works

How it works

1

The null hypothesis states that the mean of the paired differences is zero, meaning no average change between the two measurements. The alternative states that the mean difference is nonzero. The test decides between these two claims.

Formula
H_0:\ \mu_d = 0 \quad H_1:\ \mu_d \neq 0
2

For each subject the difference between the two measurements is computed, d_i = x_2i - x_1i. The t statistic divides the mean difference d̄ by its standard error, the standard deviation of the differences s_d divided by the square root of the sample size n. A larger or more consistent average change pushes t further from zero. The statistic is compared against the Student t-distribution with n - 1 degrees of freedom.

Formula
t = \dfrac{\bar{d}}{s_d / \sqrt{n}}, \quad d_i = x_{2i} - x_{1i}
3

If the two-tailed p-value falls below the conventional 0.05 threshold, the null hypothesis is rejected and the average change is treated as statistically detectable. The two-tailed test is the default. A one-tailed test is a separate choice that must be fixed before data collection, because it examines only one direction and must not be selected after seeing the results. Alongside the verdict, the mean difference is reported with its 95% confidence interval, together with the effect size d = d̄ / s_d given in the formula above, which expresses the mean change in standard-deviation units of the differences.

Formula
\text{reject } H_0 \text{ if } p < 0.05;\quad d = \dfrac{\bar{d}}{s_d}

Common pitfalls

  • Checking normality on the raw measurements instead of on the difference scores, which is the quantity the test actually assumes to be normal.
  • Running the test on unpaired data, or mismatching the before and after readings so that the pairing is broken; the subtraction then mixes unrelated values.
  • Reporting only the p-value without the mean difference, its confidence interval, or an effect size, which hides how large the change is.
  • Gaining power from the pairing only when the two measurements are positively correlated; if the correlation is weak or negative, the paired test can perform worse than an independent comparison.
  • Ignoring outliers in the difference scores. A few extreme differences can dominate both the mean difference and s_d, and therefore the t statistic. Inspect the differences first, for example with a boxplot, and report the analysis with and without extreme values, or consider a nonparametric alternative.

Frequently asked questions

How is this different from the independent t-test?

The independent t-test compares two separate groups, while the paired t-test compares two measurements on the same subjects. The paired test works on the within-subject differences, so it is usually more sensitive when the measurements are genuinely linked and positively correlated.

What if the difference scores are not normal?

Normality applies to the differences, not the raw values. Inspect a histogram or Q-Q plot of the differences alongside the Shapiro-Wilk result, since a significance test alone is unreliable, especially in small samples. If the differences are clearly skewed or heavy-tailed, consider the Wilcoxon signed-rank test. It is not a drop-in replacement: it tests whether the differences are centred on zero under a symmetry assumption, a related but different question from whether their mean is zero. With larger samples, the t-test tolerates moderate departures from normality reasonably well.

How many pairs do I need?

No fixed minimum guarantees a valid result. Small samples make it hard to judge whether the differences are approximately normal and give the test limited power to detect a modest change. Plan the number of pairs in advance with a power analysis for the smallest change that matters, as described in Cohen (1988).

Why report an effect size?

The p-value only tells you whether the average change is statistically detectable, not how large it is. The paired effect size d = d̄ / s_d expresses the mean difference in standard-deviation units, so you can judge practical importance alongside the mean difference and its 95% confidence interval.

Related methods

Sources

  1. Field, A. (2013). Discovering Statistics Using IBM SPSS Statistics (4th ed.). SAGE.

    ISBN: 978-1446249185
  2. Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences (2nd ed.). Lawrence Erlbaum Associates.

    Open DOI reference