Skip to content

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.

Applied ~8 min7 steps

What runs in CodeSplash

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

01

A dashboard that never says no

Read

A 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.

02

How high does it go?

Predict

Predict 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?

About 5%About 10%About 30% or more
Reveal

Roughly a quarter or more of the time, depending on how the looks are spaced. Run the simulation below to see it directly.

03

Run A/A tests

Explore

EExplorable · 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?

0.30
How sure?
28
28

Scrub through one experiment's life.

0.05
Simulating…

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

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.

04

Stop early, on purpose

Explore

BExplorable · 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'?

0.50
How sure?
10
200
Simulating…

Commit your prediction above to see the result

Make your prediction first; the figure appears when you commit.

Make your prediction to see the result.

Try the "break it" toggle and watch the rejection rate as the number of looks grows.

05

Looking isn't the problem

Read

You 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.
06

Check your understanding

Checkpoint

Check 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.

07

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