Bell Statistics

What is always-valid inference?

Always-valid inference produces p-values and confidence sequences that remain correct no matter how often they are checked or when the experiment is stopped. It removes the peeking problem by construction, at the cost of needing more data to reach the same conclusion.

Also called
mSPRT, mixture sequential probability ratio test, anytime-valid inference, always valid p-values
Allon Korem

Written by Allon Korem

Chief Executive Officer

Last updated

In plain English

A conventional p-value is valid at one moment: the sample size you planned for. Check it repeatedly and stop when it looks good and it stops meaning what it claims — that is the peeking problem. Always-valid inference is the family of methods that removes the constraint entirely. The p-value is constructed so that its guarantee holds at every point simultaneously, so any stopping rule at all is legitimate, including one that depends on the data.

The corresponding interval is a confidence sequence rather than a confidence interval: a sequence of intervals with the property that the true effect lies inside all of them simultaneously with 95% probability. That simultaneity is the whole point and it is a strictly stronger claim than an ordinary interval makes. It is also what lets a dashboard show a live estimate that nobody can misuse by looking at the wrong moment.

The best-known implementation is mSPRT — the mixture sequential probability ratio test — which extends Wald's sequential test by integrating over a prior distribution on the effect size rather than testing a single fixed alternative. That mixture is what makes it work without knowing the effect in advance, and the prior's width is a real parameter: a wider one is more robust to being wrong about the plausible effect and costs more data, a narrower one is sharper if the guess is good.

The cost is a sample premium, typically 20 to 40% more traffic to reach the same conclusion as a fixed-horizon test that ran to completion. That is the price of the anytime guarantee and it is not a defect. Compared with the alternative — a fixed test that gets peeked at anyway — it is clearly worth paying. Compared with a fixed test that is genuinely run to its horizon, it is a real cost, and the choice depends on whether your organisation can actually leave experiments alone.

The related option is alpha spending, which permits a fixed number of pre-planned interim looks rather than unlimited ones. It is more efficient than always-valid inference for the looks it allows, and more rigid: the schedule must be set in advance and adhered to. Always-valid inference is the better fit for a platform with live dashboards where anyone can look at any time; alpha spending suits a small number of planned checkpoints.

The formula

The guarantee is the definition. The mSPRT statistic below is the standard way of achieving it.

The anytime guarantee
P( ∃ t : p_t ≤ α | H₀ ) ≤ α

The probability of EVER crossing the threshold is bounded, not just the probability at one fixed time.

The mSPRT statistic
Λ_t = ∫ ( likelihood under θ / likelihood under H₀ ) dπ(θ)

A likelihood ratio mixed over a prior π on the effect. The mixture is what removes the need to name the alternative.

The p-value
p_t = min( 1, 1 / Λ_t ), monotone decreasing in evidence

Never increases with more data, which is what makes stopping at any point safe.

The premium
n_always-valid ≈ 1.2 to 1.4 × n_fixed

The price of the guarantee — see the sample size calculator for the fixed-horizon baseline.

Worked example

A team compares three approaches on a 4% conversion metric where they want to detect a 5% relative lift. Their organisational reality is that experiments get checked daily and stopped when they look decisive, which has happened on most recent tests.

Fixed horizon, run to completion
128,000 per arm, 21 days
Fixed horizon as actually practised
stopped early, false-positive rate ≈ 26%
Always-valid, same power
168,000 per arm if run to the end (+31%)
Always-valid, median stop when effect is real
94,000 per arm, 15 days
Always-valid, false-positive rate
5.0%
Always-valid, median stop when effect is zero
never stops early — runs to horizon

The premium is 31% in the worst case and the median real effect is detected in 15 days rather than 21, with the error rate held at 5%.

The two middle rows are what make the case here, and they pull in opposite directions. Always-valid inference does cost 31% more traffic if you run it to the full horizon — that is the honest headline premium. But its whole point is that you do not have to: when a real effect exists it is typically detected well before that, and the median stopping point of 94,000 per arm is actually less than the fixed test's 128,000. The premium is paid only in the cases where the effect is small or absent, which are exactly the cases you want to run longer anyway. Against this team's actual practice rather than their intended practice, it is not a cost at all — they were already stopping early at a 26% error rate, and always-valid inference gives them the same convenience at 5%. That comparison is the one to make: not against the fixed test you designed, but against the fixed test you run.

Common misconceptions

Always-valid inference lets you stop as soon as anything looks promising.
It lets you stop whenever you like at ITS thresholds, which are more demanding than a fixed test's early on. The guarantee comes from the boundaries being constructed for continuous monitoring, not from the constraint being lifted. Applying a conventional 0.05 threshold to a live estimate is peeking regardless of what the method is called.
The 30% sample premium makes it not worth using.
Compare it against what your organisation actually does rather than against a fixed test run to completion. If experiments are being stopped when they look good, the effective error rate is around 25% and the premium buys correctness rather than costing efficiency. If tests genuinely run to their pre-registered horizon, the premium is real and a fixed design is the cheaper choice.
mSPRT is the same thing as always-valid inference.
mSPRT is one implementation of the anytime-valid guarantee, and the best known in experimentation. Others exist — confidence sequences built from e-values, and various mixture and boundary constructions — with different efficiency profiles. The guarantee is the concept; mSPRT is a particular way of achieving it.

Frequently asked questions

How much extra data does always-valid inference need?
Typically 20 to 40% more than a fixed-horizon test to reach the same power at the full horizon. That is the worst case rather than the expected one: when a real effect exists, always-valid methods usually detect it well before the horizon, so the median experiment can finish sooner than the fixed design would have. The premium is paid mainly on experiments where there is little or nothing to find.
Should I use always-valid inference or alpha spending?
Alpha spending is more efficient for a small number of pre-planned interim analyses and requires committing to the schedule in advance. Always-valid inference permits unlimited unplanned looks and costs more data for that flexibility. If your platform shows live results to anyone who opens a dashboard, always-valid matches how the tests are actually used; if checkpoints are formal and few, alpha spending is sharper.
How does the prior in mSPRT affect the result?
It sets which effect sizes the test is tuned for. A wide prior is robust to being wrong about the plausible effect and costs more data; a narrow one centred near the true effect is sharper but loses power if the guess is off. Most implementations default to something wide enough to be safe. It is worth knowing the parameter exists, since two platforms implementing mSPRT with different priors will not give identical answers on the same data.

Related terms

  • Alpha spending

    Divide the 5% across your planned looks — strict early, lenient at the end, and the schedule is fixed before you start.

  • P-hacking

    Enough defensible choices, made after seeing the data, will find significance in anything.

  • Peeking problem

    Look often enough and something crosses the line — checking daily for a fortnight turns 5% into roughly 25%.

  • Sequential testing

    How to look at a running test without breaking it — and what peeking costs when you do not.

  • Bayesian A/B testing

    Friendlier output, the same underlying evidence — and it does not fix peeking, which is why most teams adopt it.

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.

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.