Knowledge Sprint SeriesMT24 Learning

Phase 5 · Sprint 15/90 · Statistics & Experimental DesignFisher · Simpson · Hill · Holm

Experimental Design & Rigorous Inference

If I choose who gets the treatment, my choice becomes part of the result.

In short. Fisher's three rules, confounding and Simpson's paradox on real kidney-stone data, randomisation and blinding, and correcting for many tests.

Sprint 15 of 90 infographic: Experimental Design & Rigorous Inference. If I choose who gets the treatment, my choice becomes part of the result. The full text of the image is on this page.
Full resolution2160 × 2700 PNGPhase summary

The part of the image you are reading lights up. Tap a part to jump to its text.

Fig. 1 in words

  1. Stones removed (success rate)

    • Real kidney-stone data (Charig et al., 1986). B = percutaneous nephrolithotomy; dot area follows patient numbers. Stone size drove both the choice and the outcome.
    • A · open surgery (blue) · B · PCNL (gold)
    • success rate from 60% to 100%
    • Small · < 2 cm: A 93% 81/87 · B 87% 234/270
    • Large · ≥ 2 cm: A 73% 192/263 · B 69% 55/80
    • All · stones: A 78% 273/350 · B 83% 289/350
    • ① A, small stones · ② A, large stones · ③ B, all stones · ④ A, all stones

Entry 15 / 90

  • Observer M. Tahri
  • Seed 15
  • Sim. patients 100 000

01 Fisher's Three Rules

  • Replicate: to measure the error
  • Randomize: chance assigns treatment
  • Block: compare like with like

Fisher (1935), the tea test: 8 cups, 4 of each; a lucky guess of all: 1 in 70.

02 Confounding

  • A third factor drives both the choice and the outcome
  • Fig. 1: stone size. The code: severity

Adjusting fixes it only for what I measured: −1.262 became 0.996 once severity entered.

03 Randomize & Blind

  • A coin, not a person, assigns
  • Hide the next assignment; blind who measures

MRC streptomycin trial (1948): sealed envelopes. Its lasting lesson is concealment (Chalmers, 2011).

04 Many Tests, One Plan

  • 20 null tests at α = 0.05: 64% chance of a false hit
  • Holm (1979): the k-th smallest p faces α/(m − k + 1)

Name the primary outcome before the data.

05 Try It Yourself

sprint15_experimental_design_rigorous_inference.py

import numpy as np
rng = np.random.default_rng(15)
n = 100_000
z = lambda: rng.normal(size=n)
s = z()  # severity
def y(t):  # true effect of t: +1
    return t - 2 * s + z()
def gap(t, o):
    return o[t].mean() - o[~t].mean()
t = s + z() > 0  # sicker -> treated
o = y(t)
print(gap(t, o).round(3))  # observed
X = np.c_[np.ones(n), t, s]
b = np.linalg.lstsq(X, o)[0]
print(b[1].round(3))  # adjusted
r = rng.random(n) < .5  # coin flip
print(gap(r, y(r)).round(3))  # random

Output, as printed on the image

-1.262   0.996   0.998

Run it. sprint15_experimental_design_rigorous_inference.py · versions, data and steps

06 General Notes

  • Write the protocol first
  • Randomize what I cannot measure
  • Adjust only for what came before treatment
  • Report every outcome I tested

07 Mini Project

  • Run a tea or coffee test: 8 cups, 4 of each
  • Order by coin; a friend serves (blind)
  • Drop s from X in the code: watch the bias return

R Trusted Sources

  1. Fisher (1935). The Design of Experiments. Oliver & Boyd
  2. Holm (1979). Scand. J. Stat. 6(2)
  3. Charig et al. (1986). BMJ 292, 879–882
  4. Julious & Mullee (1994). BMJ 309, 1480
  5. Medical Research Council (1948). Streptomycin Treatment of Pulmonary Tuberculosis
  6. Chalmers (2011). James Lind Library
  7. Montgomery. Design and Analysis of Experiments

Cite this phase

Tahri, M. (2026). MT24 Learning — Knowledge Sprint Series, Phase 5: Statistics & Experimental Design (Version 1.0) [Educational resource]. Zenodo. https://doi.org/10.5281/zenodo.23063053

Version DOI 10.5281/zenodo.23063053 · all versions 10.5281/zenodo.23063052 · first published 27 September 2026