Peek-Proof: The p-Hacking Simulator

A fair coin (50/50, zero edge) streams in as fake "trading results." Watch a classical p-value get fooled by pure noise — and watch an anytime-valid e-value refuse to lie, no matter when you stop looking.

Grounded in: "Propose, Don't Judge: An Anytime-Valid Referee for LLM Agents That Mine Investment Factors" — arXiv:2609.27051

Live Stream null is true — no edge

Each tick flips a fair coin (p = 0.50). Play it out, peek whenever you want, and hit the button the instant you think you've "found something."

Flips (n)
0
Heads / n
0 / 0
Classical p-value
1.000
significant if < 0.05
Anytime e-value
1.00
significant if ≄ 20 (1/α)
ā— classical p-value (data-so-far)dashed = α = 0.05
ā— anytime-valid e-value (log scale, test martingale)dashed = threshold 1/α = 20

GROUND TRUTH: fair coin, p = 0.50. There was never an edge.

Classical p-value peeker
Anytime-valid e-value
The math (simplified, real): the e-value is a sequential likelihood ratio En = (p₁/pā‚€)headsĀ·((1āˆ’p₁)/(1āˆ’pā‚€))tails testing pā‚€=0.50 vs. an assumed edge p₁=0.55. En is a nonnegative martingale under the null (E[En] = 1 for all n), so by Ville's inequality, P(supn En ≄ 1/α) ≤ α — a guarantee that holds no matter when or how often you look. The classical p-value has no such guarantee under repeated peeking.

Live Fooled-Rate 3,000 simulated peekers

Background Monte Carlo of 3,000 independent fair-coin streams, run once at load. Shows what fraction of peekers get fooled by the time they reach the live stream's current flip count.

Classical p-value, stopped at first p<0.05 seen so far—
Anytime-valid, stopped at first En≄20 seen so far—

Your Scoreboard

Every time you hit "I quit here" it's tallied here. Ground truth is always the same fair coin — any "win" for a method is a false positive.

Naive p-value
0%
fooled 0 / 0 runs
Anytime-valid
0%
fooled 0 / 0 runs
Why this matters: by the Law of the Iterated Logarithm, a classical p-value computed on accumulating noise is guaranteed to dip below any fixed threshold infinitely often if you watch forever. "Just check whenever you feel like it" is a broken protocol. The anytime-valid e-value is built so its error budget never leaks, however you peek.