Valid Early Stopping: Interim Looks, Always-Valid Tests, Many Metrics
Statistics & ExperimentsModel answerLast updated
Design an A/B test that can be stopped early for a win or for futility without inflating false positives, covering fixed-look boundaries, always-valid methods and multiple metrics.
Your team wants to watch an online experiment as data arrives and be able to end it early, either because the treatment clearly wins or because it is clearly not going to. Stakeholders keep checking the dashboard, and you need to make sure this does not produce spurious "significant" results.
Answer the following.
a) Take a two-sided test at overall level 0.05 with two interim analyses plus a final analysis, at equally spaced information fractions. Compare the Pocock and O'Brien-Fleming boundaries. Give the critical z-values at each look, and discuss the trade-offs in early stopping, final-look power and sample size. Say how you would add a futility rule. Also say what changes if "two looks" means one interim plus the final.
b) Explain how a mixture sequential probability ratio test (mSPRT) or an e-value approach gives inference that stays valid no matter when or how often people peek. State what property makes it work and what you would report to stakeholders (p-values, intervals).
c) Describe how you would combine sequential monitoring with several metrics (a primary metric, secondary metrics and guardrails) so that the overall error rate is not inflated either by repeated looks or by testing many metrics.
A strong answer is structured, gives the numbers, and calls out the costs and common mistakes.
Hints
Hint 1
Start by quantifying the problem: repeatedly applying a fixed 1.96 threshold makes the real false-positive rate climb well past 5% (around 14% with five looks). Boundaries must be chosen so the probability of crossing at any look under H0 is 0.05, using the correlation Corr(Z_j, Z_k) = sqrt(t_j / t_k).
Hint 2
Pocock uses the same threshold at every look, while O'Brien-Fleming uses c_k proportional to sqrt(K/k), so it is extremely strict early and close to 1.96 at the end. For three looks the values are roughly 2.289 (flat) versus 3.471, 2.454, 2.004.
Hint 3
For always-valid inference, find a quantity that is a nonnegative martingale with mean 1 under H0, then apply Ville's inequality: P(sup Lambda_n >= 1/alpha) <= alpha. Averaging or multiplying e-values stays valid, which is what you need for multiple metrics.
Hint 4
For multiple metrics, split or recycle the alpha budget (Bonferroni or graphical procedures), give each metric its own spending function or e-process, and use e-BH if you want FDR control under arbitrary dependence. Keep futility rules non-binding.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Why naive peeking fails
Running a fixed-horizon test (|z| > 1.96) at every look inflates the type I error. With about 5 looks the real rate is near 14%. With unlimited looks it tends toward 100%, by the law of the iterated logarithm. There are two clean remedies: group sequential designs with a planned set of looks, and always-valid methods that allow any number of looks.
Part a: Pocock vs. O'Brien-Fleming
Setup. Two-sided alpha = 0.05, K = 3 analyses (two interim plus final) at information fractions 1/3, 2/3 and 1. Under H0 the cumulative statistics Z_k are approximately N(0,1) with Corr(Z_j, Z_k) = sqrt(t_j / t_k). Boundaries c_k are chosen so that P(|Z_k| >= c_k for some k | H0) = 0.05.
- Pocock: the same c at every look.
- O'Brien-Fleming (OBF): c_k = C * sqrt(K/k), very strict early and close to the fixed-horizon value at the end.
| Look | Pocock z (nominal p) | OBF z (nominal p) |
|---|---|---|
| 1/3 | 2.289 (0.022) | 3.471 (0.0005) |
| 2/3 | 2.289 (0.022) | 2.454 (0.014) |
| 1 | 2.289 (0.022) | 2.004 (0.045) |
If "two looks" means one interim and the final (K = 2): Pocock is 2.178 at both looks; OBF is 2.797 then 1.977.
Alpha spending (Lan-DeMets). Looks need not be pre-scheduled or equally spaced. You specify a cumulative spending function alpha(t) and derive boundaries from the information actually accrued.
- OBF-type: alpha(t) = 2 - 2 * Phi(z_0.025 / sqrt(t)). Cumulative spend is about 0.0007 at t = 1/3 and about 0.016 at t = 2/3.
- Pocock-type: alpha(t) = alpha * ln(1 + (e - 1) t). Cumulative spend is about 0.023 at t = 1/3 and 0.038 at t = 2/3.
These give boundaries close to, but not identical to, the classical ones (for example OBF-type with K = 2 gives 2.963 then 1.969).
Trade-offs.
| Pocock | OBF | |
|---|---|---|
| Early stopping | Stops early more readily, so lower expected sample size when the effect is large | Rarely stops early unless the effect is very large |
| Final look | Threshold 2.289, so the maximum sample size is about 17% above fixed-horizon at 90% power (K = 3) | Threshold about 2.0, so inflation is only about 2% |
| Awkward outcomes | A final | z |
| Typical use | Speed matters most | Default choice in most settings |
Futility. Add a lower boundary through beta-spending, or use conditional power ("stop if CP < 10%"). Make it non-binding: compute the efficacy boundaries as if futility did not exist. Then ignoring a futility recommendation never inflates alpha, which matters because business owners often want to keep running.
Common mistakes. Recomputing boundaries after seeing the data, using 1.96 at an interim look, and reporting a naive confidence interval after an early stop (it is biased and needs adjustment).
Part b: Always-valid inference
Group sequential designs need the look schedule or information fraction to be roughly fixed up front. For dashboards that anyone can open at any time, you need validity at arbitrary stopping times.
mSPRT. Place a mixing prior theta ~ N(0, tau^2) over the alternative. For a mean difference x̄_n with variance parameter sigma^2:
Lambda_n = sqrt(sigma^2 / (sigma^2 + n tau^2)) * exp( n^2 tau^2 x̄_n^2 / (2 sigma^2 (sigma^2 + n tau^2)) )
Why it works.
- Under H0, Lambda_n is a nonnegative martingale with expectation 1.
- Ville's inequality gives P(sup_n Lambda_n >= 1/alpha) <= alpha.
- So "reject when Lambda_n >= 1/alpha" controls type I error at alpha however often you look and even if the stopping rule depends on the data.
What to report.
- An always-valid p-value: p_n = min(p_{n-1}, 1/Lambda_n), which only decreases.
- A confidence sequence, an interval series that covers the truth at all times simultaneously with probability at least 1 - alpha. This is the correct interval after stopping early.
E-values generalize this. An e-variable satisfies E >= 0 and E_H0[E] <= 1, so Markov gives P(E >= 1/alpha) <= alpha. An e-process (test martingale) extends this to any stopping time. Products of conditionally valid e-values are valid, which supports continuing across experiments, and averages are valid under arbitrary dependence, which is useful in part c.
Costs and tuning.
- Power is lower at a given horizon; expect roughly 20-40% more samples than a fixed-horizon test.
- Set tau near the smallest effect you care about. Too small makes big effects slow to detect; too large wastes power on small ones.
- sigma^2 must be estimated (pre-period or running estimate), so the guarantee is asymptotic. Variance reduction such as CUPED is compatible.
Part c: Multiple metrics plus monitoring
The target is joint control, over looks and over metrics, of the family-wise error rate (FWER) or false discovery rate (FDR).
- Pre-register a hierarchy. One or a few primary metrics carry the efficacy alpha. Guardrails (latency, crashes, revenue) get one-sided non-inferiority tests with a separate budget. Everything else is labeled exploratory.
- Split alpha, then spend over time. For example 0.04 for the primary and 0.01 shared across guardrails. Each metric gets its own spending function or mSPRT at its share. The union bound gives FWER <= sum of alpha_j regardless of correlation. Graphical procedures (Maurer-Bretz) recycle alpha from rejected hypotheses to the rest and recompute the sequential boundaries.
- Gatekeeping needs care. Testing a secondary metric only after the primary succeeds is a fixed-sequence idea, but if the primary stops at an interim look the secondary needs its own sequential boundary at that look. Using 1.96 there inflates error.
- E-value route. For FWER, reject metric j when e_j >= m/alpha (Bonferroni for e-values). For FDR, use e-BH, which is valid under arbitrary dependence between metrics. Averaging e-processes gives a single "anything is harmed" alarm.
- Asymmetric treatment. Stopping for harm is cheap, so guardrails can use more aggressive always-valid boundaries. Efficacy should use conservative OBF-like boundaries. Futility remains non-binding.
- Operational hygiene. Check for sample ratio mismatch at every look, fix a maximum duration in advance, and cover whole weekly cycles to limit novelty and day-of-week effects.
Summary
Use OBF-type spending when you want a few planned looks and a near-full-power final test. Use mSPRT or e-processes with confidence sequences when continuous peeking is unavoidable. Allocate alpha across metrics by pre-registered hierarchy or e-BH, and never reuse a fixed-horizon threshold at an interim look.