Lesson
The theory — Optional Stopping
Optional stopping is deciding when to end an experiment by watching its results: testing after each batch of data and stopping as soon as the test is significant. With the fixed-sample threshold |zk| ≥ 1.96 at each of K looks, the chance of a false positive is P(|zk| ≥ 1.96 for some k ≤ K), which is more than 5% for every K ≥ 2. A group sequential boundary chooses thresholds c1, …, cK so that this chance is exactly 5%: Pocock's uses one constant, O'Brien and Fleming's uses CB√(K/k).
What each symbol means
K- the number of looks, equally spaced through the data
zₖ- the z-statistic of all the data up to look k
cₖ- the threshold at look k; the experiment stops when |zₖ| ≥ cₖ
θ- the real effect, added to every batch, in standard deviations of one batch's total
- Assumes
- The data are normal with a known standard deviation, or numerous enough for the z-test to hold; the looks are equally spaced; every test is two-sided, each naive look at 5% and each boundary at the stricter level that holds the overall rate at 5%; and the largest sample is fixed in advance and the same for every rule, so the looks only divide it.
Problem solved in full
-
The fourth look of ten 4 steps
An online shop tests a new checkout page on 10,000 visitors and looks at the result after every 1,000. Under O'Brien–Fleming's boundary, how small must the p-value be at the fourth look for the test to stop there? Press Ten looks, O'Brien–Fleming first: the page gives the threshold at the first and the last look.
-
From the page, the threshold at the last look is CB:
-
Every other threshold is CB scaled by √(K/k). At the fourth look of ten:
-
As a two-sided p-value, from the normal distribution:
-
For comparison, stopping at any p < 0.05 over the same ten looks, from the table:
Answer
p below 0.00097, about one in a thousand. A fourth-look result of p = 0.004, which would end a naive test with a headline, keeps O'Brien–Fleming's test running. At the tenth look the bar is p < 0.0369, a little stricter than 0.05, and the whole procedure holds the false-positive rate at 5%, where stopping at the first p < 0.05 lets 19.34% through.
-
Learning path
What p < 0.05 does not promise
References (2)
- The first insight's history: Klim McPherson's 1974 note in the New England Journal of Medicine, showing that testing accumulating data ten times without adjustment raises a nominal 5% false-positive rate to nearly 20% (the page computes 19.34%), and his earlier tables of the inflation with Peter Armitage and B. C. Rowe (1969). Also the source for O'Brien and Fleming's 1979 boundary being the one that became standard: C. Gluud and K. Thorlund, "Long overdue recognition of Klim McPherson's 1974 article on sequential analysis of trial data," JLL Bulletin: Commentaries on the history of treatment evaluation, James Lind Library, 2025 (also J R Soc Med 2025;118:304–307). On K. McPherson, N Engl J Med 1974;290:501–502; P. Armitage, C. K. McPherson and B. C. Rowe, J R Stat Soc A 1969;132:235–244; P. C. O'Brien and T. R. Fleming, Biometrics 1979;35:549–556.
- Pocock's group sequential design: patients enter in equal-sized groups, the trial stops or continues after each group on a repeated significance test, with exact results for two treatments and a normal response of known variance, which is the model the page computes. The constants the page prints (2.178, 2.289, 2.361, 2.413, 2.555 for 2, 3, 4, 5, 10 looks) are the module's own, asserted in check:compute: S. J. Pocock, "Group sequential methods in the design and analysis of clinical trials," Biometrika 64(2), 191–199, 1977. doi:10.1093/biomet/64.2.191