Course contentsShow
← Data Science
Lesson 370 of 2,14510. Hypothesis Tests for MeansFree lesson

Differences as the Unit of Analysis

Learn why paired t-tests analyze the differences within pairs rather than comparing two separate groups.

Differences as the Unit of Analysis

You'll learn why paired t-tests work by analyzing the differences within pairs rather than treating the two measurements as separate groups.

The Core Idea

When you have paired data—like before-and-after measurements on the same subjects—you don't compare Group A vs. Group B as independent samples. Instead, you calculate the difference for each pair, then analyze those differences as if they were a single sample.

Why? Because paired data is inherently connected. The same person measured twice, the same patient before and after treatment, or matched twins in an experiment share characteristics that make them non-independent. By subtracting "after" from "before" for each subject, you create a new variable: the change score.

Plain English Analogy

Imagine weighing 10 people before and after a diet program. You could treat "before weights" and "after weights" as two separate groups—but that ignores the crucial fact that each pair of measurements comes from the same person. A 200-lb person losing 5 lbs is paired with their own starting weight, not randomly matched with someone else's.

Instead, you compute 10 differences: difference = after - before for each person. Now you have one sample of 10 differences. You test whether the average difference is significantly different from zero.

Why This Matters

This approach:

  • Removes between-subject variability (some people naturally weigh more)
  • Increases statistical power by focusing only on within-pair changes
  • Uses the one-sample t-test on the differences (simpler than two-sample methods)

Key Takeaway: In paired t-tests, you transform two related measurements into a single difference per pair, then test whether the average difference differs from zero—making the difference itself your unit of analysis.