Plan a test
Four questions, one answer: how long to run your test before you can trust what it says.
— Run the test for this long, in full weeks, then decide.
That gives — visitors in each version (— in total), enough to reliably spot — if it happens.
Before you start
- Don’t stop early because it looks good, and don’t extend it because it doesn’t. Both quietly break the result.
- Run whole weeks. People behave differently on Monday and on Saturday.
With planned looks
- At most
- —
- On average, if the change works
- —
- On average, if it doesn’t
- —
At each look, stop only if the evidence (|z|) is above:
Put the looks on whole weeks and do not stop for a win before the first full week; stopping for harm is always allowed. A test that stops early overstates the effect: plan on less than it shows. Why.
Why not shorter?
How to read itFor each possible duration in whole weeks, the line shows the smallest improvement the test could reliably spot. The dot is your plan; the dashed line is the smallest improvement worth shipping. Once the line is below the dashed one, the test is long enough. Each extra week buys less than the one before.
| Weeks | Visitors per version | Smallest change you’d spot | Chance to spot yours |
|---|
The maths
Per version, for an unpooled two-sample z-test (the same test the analyser runs):
Slowly, with your numbers
s is 1 or 2 sides, k the number of new versions (Bonferroni), R² the variance explained by pre-test data (CUPED). For rates, σ² = p(1 − p).
Planned looks use Lan–DeMets alpha spending; the planner finds the drift that keeps your power and reports the extra maximum and the expected sample.
False wins: , with π your success rate (Kohavi, Deng & Vermeer 2022).
Assumes: unique users per week; the user is the unit of randomisation and of the metric; equal split between versions.
Why each question matters: How many people, and for how long.