The problem
The figure and the analysis are the same decision.
In a paired design each subject is its own control. A figure that shows two group means has quietly discarded the link between the two measurements — and a reader cannot recover it. The choice of graph is not cosmetic here: it mirrors exactly the choice between a paired and an unpaired analysis of the same sixteen numbers.
The measurements
| Subject | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Before | 120 | 135 | 128 | 140 | 132 | 125 | 138 | 130 |
| After | 115 | 128 | 122 | 133 | 130 | 119 | 131 | 124 |
| Change | −5 | −7 | −6 | −7 | −2 | −6 | −7 | −6 |
Eight of eight subjects decreased. The changes cluster tightly between −7 and −5, with subject 5 the only mild responder at −2.
What two bars would show
| Group summary | Mean | SD |
|---|---|---|
| Before | 131.000 | 6.698 |
| After | 125.250 | 6.319 |
Two bars 5.75 apart with SDs above 6 each. They overlap heavily, and the figure suggests a small effect swamped by subject-to-subject variation. That reading is wrong — but it is the only reading the figure permits, because the between-subject spread that dominates it is precisely the nuisance the paired design was built to remove.
The same sixteen numbers, two analyses
| Analysis | t | P (two-sided) |
|---|---|---|
| Paired t test (df = 7) | −9.744 | 0.0000254 |
| Unpaired t test, pairing ignored | −1.766 | 0.0991 |
The paired analysis estimates the mean within-subject change: −5.750, SD of the differences 1.669, 95% confidence interval −7.145 to −4.355 using t(7) = 2.3646. The unpaired analysis asks a different question — whether two independent groups differ — and against a between-subject SD near 6.5 the same 5.75 shift is unremarkable.
Building the figure
- Enter Before and After as two columns of the same table with one row per subject, so row position carries the pairing.
- Plot subject lines from Before to After — eight lines, all descending here, which is the finding.
- Or plot the eight differences as a single column with a mean and its confidence interval, and mark zero explicitly.
- Label the axis with the measured quantity and its units, not with “change” alone; a reader needs to know the direction of benefit.
- Run the paired analysis on the same table, so the figure and the P value cannot drift apart.
What Plotwright checks
Both t tests above come from the engine's t-test routes, which carry published-reference checks on the validation page. Every value on this page is reproducible from the sixteen visible measurements in the linked editable project.
Sources and reproducibility
- Weissgerber, T. L., Milic, N. M., Winham, S. J. & Garovic, V. D. (2015), “Beyond Bar and Line Graphs: Time for a New Data Presentation Paradigm”, PLOS Biology—why summary bars mislead for small samples and paired designs, with recommended alternatives.
- Paired vs unpaired t test—the same estimand question worked through a different dataset.
- Grouped bar graphs and error bars—what SD, SEM and confidence-interval bars each claim.
- Plotwright statistical validation—published expected values, numerical tolerances and evidence limits.