Plan a test

Four questions, one answer: how long to run your test before you can trust what it says.

1. What are you trying to move?
A rate: share of visitors who book, sign up, click. An average: spend, nights, items per visitor.
Settings for analysts
Improvement expressed as
New versions besides control
Significance level α
Power
Test
Planned looks at the results
Stopping boundary

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

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.

Four times the visitors halves the improvement you can spot.
WeeksVisitors per versionSmallest change you’d spotChance to spot yours
The maths

Per version, for an unpooled two-sample z-test (the same test the analyser runs):

n=(zα+zβ)2·σ2δ2 σ2=(σA2+σB2)(1−R2) zα=Φ−1(1−αsk)
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: α/2·(1−π)α/2·(1−π)+(1−β)π, 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.