Why paired measurements matter
Ten participants were measured under two conditions. We compare the results with and without accounting for the pairing of measurements from the same person.

Each line connects measurements for one participant. Values represent extra sleep in hours relative to baseline.
Start with the observations
The dataset contains two observations per participant. A paired analysis uses the within-person differences to assess the difference between conditions.
This is a statistical demonstration using R's teaching dataset. It is not a clinical assessment of treatment effectiveness.
All ten pairs
| Participant | Condition 1, h | Condition 2, h | Difference, h |
|---|---|---|---|
| 1 | 0.7 | 1.9 | 1.2 |
| 2 | −1.6 | 0.8 | 2.4 |
| 3 | −0.2 | 1.1 | 1.3 |
| 4 | −1.2 | 0.1 | 1.3 |
| 5 | −0.1 | −0.1 | 0.0 |
| 6 | 3.4 | 4.4 | 1.0 |
| 7 | 3.7 | 5.5 | 1.8 |
| 8 | 0.8 | 1.6 | 0.8 |
| 9 | 0.0 | 4.6 | 4.6 |
| 10 | 2.0 | 3.4 | 1.4 |
Estimates and uncertainty
Both analyses give a mean difference of 1.58 hours. Their confidence intervals differ because they account for variability differently.

The paired calculation reflects the study design. Interpretations also depend on the data and the assumptions of the chosen test.
Reproduce the calculation
Download the data and R script into the same directory and run Rscript check.R. The script checks the data against R's built-in dataset and prints both estimates and intervals.
Discuss your data
Tell us about your research question and the materials you have.