Bell Statistics

What is sequential testing?

Sequential testing is a family of methods that let you analyse an experiment repeatedly while it runs without inflating the false-positive rate. They work by spending the error budget across looks, so a result can be acted on as soon as the evidence is strong enough.

Also called
sequential analysis, always-valid inference, group sequential design
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

A conventional experiment is a single question asked once: fix the sample size, wait, look at the result. That design is efficient and it is also unnatural, because everyone wants to know early whether something is badly broken or obviously working. The trouble is that looking repeatedly and stopping at the first significant reading turns a 5% false-positive rate into roughly 25% over a fortnight of daily checks. Each look is another chance to cross the threshold, and the threshold was priced for one.

Sequential methods fix this by making the threshold a function of when you look. Instead of one fixed critical value, you get a boundary that starts very strict early — when little data has accumulated and noise is largest — and relaxes towards the conventional value at the planned end. The total probability of crossing it anywhere across all looks is exactly the significance level you chose. The error budget is spent deliberately rather than accidentally.

There are two broad families. Group sequential designs, which come from clinical trials, specify a fixed number of interim analyses in advance and use an alpha-spending function — O'Brien-Fleming is the common one, and it is very conservative early, which suits a setting where stopping means declaring a drug effective. Always-valid or anytime-valid methods, built on mixture sequential probability ratio tests and confidence sequences, allow unlimited looks at any moment, which fits a dashboard that anybody can refresh.

None of this is free. A sequential design that permits continuous monitoring needs a larger maximum sample than a fixed-horizon test — commonly 10-25% more — because the early strictness has to be paid for somewhere. The trade is that the *expected* duration is often shorter, since large effects are detected and stopped early. If your effects are usually marginal, you will pay the premium and rarely collect; if they are often decisive or occasionally catastrophic, you collect regularly.

The clearest case for it is not speed but safety. A guardrail metric that catches a serious regression needs to be watched continuously, and waiting two weeks to discover that a release broke checkout is not an option. Running guardrails on a sequential boundary while the primary metric runs to a fixed horizon is a reasonable and common arrangement — and far better than the usual compromise, which is watching everything daily and pretending the arithmetic still holds. We work through the practical version in navigating sequential testing.

The formula

The unifying idea is that the critical value depends on how much information has accumulated. These are the three formulations you will meet.

What naive peeking costs
P(any look significant) ≈ 1 − (1 − α)^k for weakly dependent looks

Looks on accumulating data are strongly correlated, so the true figure is lower than this bound — but simulation puts fourteen daily looks at α = 0.05 near 0.25, five times nominal.

Alpha spending
α*(t), α*(0) = 0, α*(1) = α

t is the information fraction, from 0 to 1. The function decides how much of the budget each interim look may spend.

O'Brien-Fleming boundary
α*(t) = 2 − 2·Φ( z₁₋α/₂ / √t )

Spends almost nothing early and nearly all of it at the end, so the final analysis is close to a conventional test. The default for most group sequential designs.

Always-valid confidence sequence
P( ∀t: θ ∈ CIₜ ) ≥ 1 − α

Coverage holds simultaneously at every moment, not just at a pre-planned one, which is what makes unlimited peeking legitimate. Wider than a fixed-horizon interval at the same n.

Worked example

A team plans a 14-day test with a fixed sample of 120,000 per arm. They want to monitor it, so they compare three approaches: check daily and use the ordinary 0.05 threshold; use an O'Brien-Fleming boundary with five planned interim looks; or run the fixed test and look once at the end.

Fixed-horizon sample per arm
120,000
Naive daily peeking, realised alpha
≈ 0.25
O'Brien-Fleming, 5 looks, realised alpha
0.05
O'Brien-Fleming critical p at look 1
0.000005
O'Brien-Fleming critical p at look 5
0.041
Maximum sample needed for the sequential design
≈ 132,000 per arm (+10%)

Naive peeking runs at five times the stated error rate. The sequential design holds it at 5% and costs 10% more maximum sample, while stopping early whenever the effect is large.

Look at the boundary at the first interim: a p-value of 0.000005 is required to stop after a fifth of the data. That is not a technicality, it is the point — a difference that looks impressive on day three routinely evaporates, and the boundary encodes exactly how much scepticism day three deserves. By the final look the threshold has relaxed to 0.041, almost the conventional value, so a sequential design costs very little at the end. The 10% sample premium is the price of the option to stop early, and whether it is worth paying depends on your effects: a portfolio where occasional changes are strongly positive or actively harmful collects on that option regularly, while one of uniformly marginal effects pays the premium and almost never exercises it.

Common misconceptions

Peeking is fine as long as we do not stop the test early.
The inflation comes from the decision rule, not from the act of looking. If seeing a significant reading would change what you do — stop, ship, extend, or start writing the announcement — then the extra chances count. Looking with a genuine commitment to ignore what you see is safe and unusual.
Sequential testing lets us reach significance faster with the same data.
It lets you stop early when the effect is large, which is a different thing. At a given sample size a sequential boundary is stricter than a fixed-horizon test, so a marginal effect is detected later, not sooner. The expected duration falls; the maximum sample rises by 10-25%.
Bayesian analysis removes the peeking problem entirely.
It removes the specific arithmetic of p-value inflation, since a posterior is a valid summary at any moment. It does not remove the selection effect: stopping the first time the posterior crosses a threshold still preferentially catches moments when noise was favourable, and the reported effect is still biased upward.

Frequently asked questions

When should I use sequential testing instead of a fixed horizon?
When you genuinely need to act on interim information — guardrails that must catch a serious regression within hours, or expensive experiments where stopping a clear loser early saves real money. If nobody is going to change what they do before the planned end date, a fixed horizon is simpler and needs less sample. The worst arrangement is a fixed-horizon design that everybody watches daily anyway.
Should I use a group sequential design or an always-valid one?
Group sequential is more efficient when you can genuinely commit to a small number of pre-planned looks, because it concentrates the error budget rather than reserving some for looks that never happen. Always-valid methods are the better fit for a self-serve platform where anyone can open a dashboard at any time, since they cost a little more sample but make no assumption about when or how often people look.
Can I run guardrails sequentially and the primary metric on a fixed horizon?
Yes, and it is a sensible arrangement. The two are answering different questions: the guardrail is a continuous safety check where the cost of a delayed alarm is high, and the primary metric is a decision where the cost of a false positive is high. Using a sequential boundary for the first and a fixed horizon for the second matches each method to the error it should be protecting against.

Related terms

  • Guardrail metric

    A metric that can veto a launch but never justify one, and why that asymmetry is the whole point.

  • Multiple comparisons

    Test enough things and something will look significant — the arithmetic, and the four fixes.

  • Sample size

    Four inputs, one number, fixed before the test runs — and the square law that makes small effects expensive.

  • Significance level

    The false-positive rate you agree to in advance — a budget, and one most teams overspend.

  • Type I error

    The false positive — and the one whose cost lands months later, on a roadmap built around noise.

Calculate it

  • A/B test sample size

    Size a two-proportion experiment before you launch, then read the lift and its interval once it lands.

  • Two-sample t-test

    Compare the average of two independent groups — plan the sample size, then test the result.

  • One-proportion z-test

    Test one observed rate against a fixed target — an SLA, a benchmark, a contractual floor.

Knowing the term is the easy part

Applying it to a live measurement problem is the part that goes wrong. If you are designing an experiment, reading a result you do not trust, or trying to work out what your marketing actually caused, that is the work we do.