Peeking checker
You checked the results before the test finished. Everyone does. This is what it cost you, and the threshold that would have bought it back.
Readout
--- ----
- false +--
- factor--
- fix-- --
- nextNext test? Size it to be read once, at the end →
Inputs live in the URL. Send this link to a colleague.
Watch it happen
Numbers from a formula are easy to disbelieve, so here is the same claim as an experiment. Below, thousands of A/B tests are simulated in your browser in which the variant is identical to the control. Every significant result is a false positive by construction. One run peeks the way you did; the other applies the corrected threshold.
Ready.
The advanced version: spending the error deliberately
A constant corrected threshold (Pocock) is the easiest to act on, but it is strict at the final look, which is where most of the information is. O'Brien-Fleming spends almost nothing early and nearly the full budget at the end (the usual choice when you want the option to stop early without paying much for it).
| Look | Pocock z | Pocock p | O'Brien-Fleming z | O'Brien-Fleming p |
|---|
Both are computed live by the same recursion that produced the headline number, at your significance level.
When your looks were not evenly spaced
Everything above assumes the looks divide the data evenly, and real peeking almost never does: you check on the Monday, again when someone asks on the Thursday, then at the end. Lan-DeMets alpha spending drops that assumption: tell it how much of the data you had seen at each look and it solves for a boundary fitted to that exact schedule. This is the version to use if you are setting the rules before the test rather than counting the cost afterwards.
| Look | Data seen | Critical z | Stop if p < | Budget spent by here |
|---|
What this assumes, and what it does not cover
- Equally spaced looks, in the headline figure and the corrected threshold. The looks are assumed to divide the data evenly. Peeking mostly early is less costly than this says; peeking mostly late is worse. If you know your actual schedule, the Lan-DeMets section above solves for it exactly instead of assuming it away.
- You would have stopped at the first significant result. That is the standard model of peeking. If you saw significance and kept running anyway, this arithmetic does not describe what you did.
- A two-sided z-test on accruing, independent data, with the normal approximation, the same footing as the sample size calculator.
- This is retrospective. It tells you what looking has already cost. It cannot rescue a test you have already stopped: a result that only cleared 0.05 is not made valid by reading this page.
- The prospective fix is a different tool. If you want to monitor continuously and stop whenever you like, you need always-valid inference (mixture SPRT or confidence sequences) set up before the test starts. That is what Statsig, Optimizely and GrowthBook run internally. Platforms with batched daily data, like Spotify, tend to choose group-sequential methods instead, which is the family this page belongs to, and why discrete looks are the right model here.
- Not covered: futility stopping, several metrics at once, unequal information between looks in the headline figure, and Bayesian stopping rules (which are not immune to this problem either).
The recursion behind this page is checked against a multivariate-normal integration in scipy, against the values published by Armitage, McPherson & Rowe (1969), Pocock (1977) and O'Brien & Fleming (1979), and against a million-run Monte Carlo. The alpha-spending boundaries are checked separately, on the stricter test of whether they spend the error they promise. See the published comparison.
Part of a small suite of experimentation calculators. Every result comes with the caveat that would invalidate it, and every formula is checked against a reference implementation.
Built by Igor Lima. MIT License.