Pairing determines the unit of analysis
Matched pairs connect two measurements through the same person or an explicit match between comparable units. Pairing must come from the study design, not from arbitrarily placing two lists side by side. An equal sample size alone does not create a paired study.
With before-and-after data, each person acts as their own comparison. With two treatments, similar units can be matched and the treatments assigned within pairs. A design should also address order effects, carryover, and randomization where they are relevant.
Analyze within-pair differences
Choose a subtraction direction before calculating:
Compute the mean and sample standard deviation of those differences. A paired t-test tests the population mean difference using:
is the number of complete pairs. Dependence within a pair is intentional; independence is needed between pairs. With a small sample, the usual t model requires a reasonably normal population of differences, without severe outliers. The relevant distribution is that of differences, not necessarily each original measurement column separately.
A new example: two page-loading configurations
Four test files are measured under an old and a new configuration. This is an illustrative dataset, not a real benchmark.
| File | Old time (s) | New time (s) | New minus old (s) |
|---|---|---|---|
| A | 8 | 6 | −2 |
| B | 11 | 10 | −1 |
| C | 7 | 4 | −3 |
| D | 10 | 10 | 0 |
The mean difference is seconds. The squared deviations from that mean sum to 5, so seconds. Each difference compares the same file. Sorting the two time columns independently would destroy that correspondence. An inferential test would still need defensible sampling, independence, and distribution assumptions; four convenient files do not establish a population result by themselves.
Direction and interpretation
If improvement means a smaller measurement and is new minus old, the alternative is . If improvement means a larger measurement, use . A question about any difference calls for a two-sided alternative. Choose the direction from the scientific question, not after seeing the results.
Statistical evidence of a mean change does not imply that every pair improved or that the intervention alone caused the change. A pre/post study without a suitable control can also reflect time trends, practice, or other influences. Keep the inferential and causal claims separate.
Related question
Apply this knowledge
Use the concept guide to understand the reasoning, then return to the complete question and worked answer.
Matched Pairs Design: Test Cholesterol Before and After a DietSources
These references support the core concepts and interpretation boundaries explained above.