Why peeking breaks the test
Watch false positives pile up when you check a test as it runs, and see what can be done instead.
What runs in CodeSplash
- Sequential monitoring — group-sequential boundaries and always-valid p-values Verified in Python and R
You will be able to
- Explain why repeated looks inflate the false-positive rate
- Tell apart safe monitoring from peeking
- Choose a stopping plan that allows the looks you want
Read first
A dashboard that never says no
ReadA p-value is valid when you look once, at a sample size you fixed in advance. Look every day and stop when it dips below 0.05, and you're asking a different question: did it ever cross the line?
Under no effect, the p-value wanders. Given enough looks, it will cross eventually. The chance of a false positive isn't 5% any more.
How high does it go?
PredictPredict first
An A/A test has no real difference. You check it 20 times and stop at the first p below 0.05. How often will you declare a winner?
Reveal
Roughly a quarter or more of the time, depending on how the looks are spaced. Run the simulation below to see it directly.
Run A/A tests
ExploreEExplorable · Peeking at an A/A test
If you check an experiment with no effect every day, how often will it look like a winner?
With no real difference and a look every day, how often will this A/A test cross p < α at least once?
Scrub through one experiment's life.
Commit your prediction above to see the result
Make your prediction to see the result.
Each path is a test with no real effect. Count how many cross the line at any point, then compare with how many are below it at the end.
Stop early, on purpose
ExploreBExplorable · Optional stopping
What happens to the false-positive rate if you check the p-value as data arrive and stop when it is significant?
With this peeking schedule, what share of no-effect studies will end 'significant'?
Commit your prediction above to see the result
Make your prediction to see the result.
Try the "break it" toggle and watch the rejection rate as the number of looks grows.
Looking isn't the problem
ReadYou can watch a test as much as you like, as long as a look can't change the decision. Monitoring for bugs and guardrail breaches is good practice. The damage comes from stopping for a win because the number looks good today.
If you really need to act early, plan for it. The studio's stopping plans include:
- Fixed horizon: one analysis at the planned size.
- Group-sequential looks: a few planned interim analyses.
- Always-valid: peek as often as you like.
- Wald SPRT: stop as soon as the evidence is clear.
Check your understanding
CheckpointCheck yourself
Why does stopping at the first significant look inflate false positives?
Show the answer
Answer: b
The data don't change, but the rule does: "significant at any look" is much easier to satisfy than "significant at the end".
Check yourself
Which is safe in a fixed-horizon test?
Show the answer
Answer: a
Monitoring for harm doesn't use up your false-positive budget for the win. Stopping or extending based on the primary result does.
Recap
Recap- A fixed-horizon p-value assumes one look at a size chosen in advance.
- Stopping at the first significant look can multiply false positives several times over.
- If you need to stop early, choose a plan built for it before the test starts.
Concepts in this lesson