🩺 Blood pressure before and after a lifestyle programme
Research question: Did systolic blood pressure fall after the programme? Answer: Systolic BP after (mmHg) (M = 139.03, SD = 16.53) was significantly lower than systolic BP before (mmHg) (M = 148.28, SD = 12.89), t(39) = 6.18, p < .001, dz = 0.98; mean change 9.25, 95% CI [6.22, 12.28]. A Wilcoxon signed-rank test agreed, z = −4.53, p < .001.
Open this example in StatLab Dataset and codebook (CSV, Excel, .sav)
What is the situation?
A community clinic (fictional) measured systolic blood pressure of 40 adults with hypertension before and after an 8-week diet-and-walking programme. The data are synthetic — produced by a seeded random process for teaching; they describe no real people or organisations.
What is in the dataset?
40 cases.
| Variable | Label | Measure | Value labels |
|---|---|---|---|
id | Patient ID | scale | |
sex | Sex | nominal | 1 = Male, 2 = Female |
age | Age (years) | scale | |
sbp_before | Systolic BP before (mmHg) | scale | |
sbp_after | Systolic BP after (mmHg) | scale | |
sbp_change | Fall in systolic BP (mmHg) | scale |
How is it analysed, step by step?
- Compute variable — The paired t test is a test on the differences, so create them. (guide)
New variablesbp_change=sbp_before - sbp_after. - Explore — Check that the differences are roughly normal. (guide)
Fall in systolic BP (mmHg): M = 9.25, SD = 9.46, median = 8.00, Shapiro-Wilk W(40) = .974, p = .490 - Paired-samples t test — Main analysis. (guide)
Mean difference (Systolic BP before (mmHg) − Systolic BP after (mmHg)) = 9.25, SD = 9.46, 95% CI [6.22, 12.28], t(39) = 6.18, p < .001, dz = 0.98. - Wilcoxon signed-rank — Nonparametric check that does not assume normal differences. (guide)
34 cases fell, 6 rose, 0 unchanged; z = −4.53, p < .001, r = .72.
How would I write it up (APA style)?
Systolic BP after (mmHg) (M = 139.03, SD = 16.53) was significantly lower than systolic BP before (mmHg) (M = 148.28, SD = 12.89), t(39) = 6.18, p < .001, dz = 0.98; mean change 9.25, 95% CI [6.22, 12.28]. A Wilcoxon signed-rank test agreed, z = −4.53, p < .001.
Every number on this page was computed by StatLab's statistics engine from this dataset when the page was built, and the same analyses are part of the reference validation against scipy/statsmodels (527 reference test cases, 39,559 values checked against scipy/statsmodels/numpy, 0 failures). “Open this example” loads the data and runs these steps live in your browser.