The peeking problem is the inflation of the false positive rate that occurs when analysts repeatedly check the results of a running test and stop it as soon as the p-value crosses the significance threshold. In experimentation, and especially in online A/B testing on product data, a test designed for a fixed sample size assumes one single analysis at the end; every additional unplanned look gives random noise another chance to appear significant.
Peeking is not a flaw in the data or the software. It is a mismatch between the analysis procedure and the statistical method: classical fixed-horizon tests are valid only when the decision is made once, at a horizon chosen in advance.
Why repeated looks inflate the error rate
Repeated looks inflate the error rate because the test statistic performs a random walk while data accumulate. Under the null hypothesis, a z-statistic computed after each new batch of users wanders up and down, and the probability that it touches the critical value at least once over many looks is much larger than the probability that it sits beyond that value at one predetermined moment.
With a nominal alpha of 0.05, a single final analysis yields a 5% chance of a false positive. If the same test is evaluated after every day of a month-long run and stopped at the first significant result, the actual false positive rate can exceed 25%. In the limit of continuous monitoring, the law of the iterated logarithm guarantees that a fixed threshold will eventually be crossed, so the error rate approaches 100% given enough looks.
The table below shows approximate false positive rates for a two-sided test at a nominal 5% level when the analyst checks at equally spaced points and stops at the first significant reading.
| Number of looks | Nominal alpha | Approximate actual alpha |
|---|---|---|
| 1 | 5% | 5% |
| 2 | 5% | 8% |
| 5 | 5% | 14% |
| 10 | 5% | 19% |
| 20 | 5% | 25% |
| Continuous | 5% | Approaches 100% |
The inflation grows quickly at first and then more slowly, which is why even a few casual looks at a dashboard materially change the reliability of a conclusion.
Forms of peeking in practice
Peeking takes several forms, and not all of them involve an explicit early stop. The common thread is that the decision rule depends on interim results that the original design did not account for.
| Form of peeking | What happens | Main consequence |
|---|---|---|
| Early stopping on significance | Test ends at first p below 0.05 | Inflated false positives |
| Extending a flat test | Run continues until a result appears | Inflated false positives |
| Stopping on a bad trend | Promising variant killed early | Lost true effects |
| Metric shopping at interim | Primary metric changed after looking | Selective reporting bias |
| Dashboard-driven decisions | Stakeholders act on live p-values | Informal, untracked looks |
Extending a test that has not reached significance is the mirror image of stopping early and is equally harmful. Both practices let chance fluctuations choose the stopping time, which biases the outcome toward significance.
Effect on estimates, not only on p-values
Peeking also biases the estimated effect size. A test stopped at the moment its statistic first crosses a threshold tends to stop at a random high point, so the reported lift is systematically larger than the true lift. This phenomenon is often called the winner’s curse or truncation bias.
The consequence is visible after launch: a feature that showed a 4% conversion lift in an early-stopped test frequently delivers a much smaller gain in production. Teams then blame the novelty effect or seasonality, when the actual cause was a biased stopping rule. Confidence intervals computed with fixed-horizon formulas after peeking are also too narrow, so they understate the real uncertainty.
Valid alternatives to fixed-horizon testing
Valid monitoring is possible when the analysis method is designed for repeated looks. These approaches, grouped under the name sequential testing, spend the error budget across interim analyses so that the overall false positive rate stays at the nominal level.
| Method | How it controls error | Typical use |
|---|---|---|
| Group sequential design | Planned looks with adjusted boundaries | Clinical trials, scheduled reviews |
| Alpha spending function | Distributes alpha over information time | Flexible look timing |
| Always-valid inference | Confidence sequences valid at any time | Continuous product dashboards |
| Mixture sequential probability ratio test | Likelihood ratio with a mixing prior | Online experimentation platforms |
| Bayesian decision rules | Posterior thresholds with expected loss | Decision-focused product teams |
Boundaries such as O’Brien-Fleming are very strict at early looks and close to the nominal threshold at the final look, which preserves most of the statistical power. Pocock boundaries use a constant, stricter threshold at every look and stop earlier on large effects, at the cost of a larger maximum sample size.
Bayesian monitoring is sometimes presented as immune to peeking. That claim is only partly true: posterior probabilities remain coherent under optional stopping, but if a team still judges the procedure by its frequentist false positive rate, repeated checking of a posterior threshold also inflates that rate.
How to prevent the peeking problem
Prevention combines pre-registration of the analysis plan with tooling that either hides or corrects interim results. The plan should state the primary metric, the minimum detectable effect, the required sample size and the stopping rule before the first user is exposed.
| Situation | Recommended approach | Reason |
|---|---|---|
| Fixed traffic, no urgency | Fixed horizon, single final analysis | Simplest and most powerful |
| Need to stop harmful variants | Guardrail monitoring with strict bounds | Safety without full peeking cost |
| Stakeholders watch live results | Always-valid p-values | Every look remains valid |
| Few planned review meetings | Group sequential boundaries | High power, controlled alpha |
| Large effect expected quickly | Pocock-style early stopping | Faster decisions on clear wins |
- Compute the required sample size in advance from the baseline rate, minimum detectable effect and statistical power.
- Run the test for whole weekly cycles to avoid day-of-week bias, even when using sequential methods.
- Show interim results with sequentially valid intervals or label them clearly as not decision-grade.
- Log every interim look so that reviewers can audit the stopping decision.
- Treat early stops for harm separately through guardrail metrics, which protect users without licensing early wins.
Common misconceptions about peeking
A frequent misconception is that looking is harmful in itself. Merely viewing interim data does not change the error rate; the damage comes from acting on the view by stopping, extending or changing the metric. Monitoring sample ratio mismatch or data quality during a test is therefore legitimate and recommended.
Another misconception holds that large samples protect against peeking. They do not: the inflation depends on the number of looks and the decision rule, not on traffic volume. A related error is to correct peeking with a simple Bonferroni division of alpha, which is valid but overly conservative because successive looks are highly correlated. Peeking is also distinct from the multiple comparisons problem, which concerns many metrics or variants evaluated once, although both inflate false discoveries in a similar way.
In plain words
Imagine flipping a fair coin and deciding in advance to call it unfair only if it shows a very lopsided result after 1,000 flips. That rule is fair. Now imagine checking after every 10 flips and stopping the moment the count looks lopsided. Sooner or later, a streak will appear by chance, and the fair coin will be declared unfair.
The peeking problem is exactly this. Checking a test again and again and stopping at the first good-looking result makes chance look like a real effect. The fix is either to wait until the planned end or to use a method that was built for checking along the way.
A real-world example
An online retailer tests a new checkout button against the current one. The plan calls for two weeks and about 80,000 visitors per variant to detect a 2% relative lift in conversion. On day three, the product manager opens the dashboard, sees a 6% lift with a p-value of 0.03, and asks the team to ship the new button immediately.
The analyst points out that the test was designed for one final analysis, and the platform has already shown results daily. The team lets the test finish. At the planned end, the lift has shrunk to 0.4% with a p-value of 0.61, a result consistent with no effect. The early signal was random fluctuation amplified by peeking.
After this episode, the team switches its experimentation platform to always-valid confidence sequences. Managers can now check results every day, and a test stops early only when the sequential boundary is crossed, keeping the overall false positive rate at 5%.