Always Valid Inference AB Testing: Peek Without Inflating Errors

Always valid inference AB testing chart with a mint confidence band narrowing over 28 daily looks and a coral stop marker where the band clears the no difference line.

Always valid inference AB testing lets you check a running test as often as you like. You can stop when the evidence is strong. The false positive rate still stays at or below the level you chose, usually 5%. For an ecommerce store, it swaps the fixed p-value for an always valid p-value and a confidence sequence.

Our post on the peeking problem in AB tests showed what daily reads of a standard test do. This post is the fix. It is for ecommerce teams that must look early, during a sale or a launch, without shipping noise.

  • Daily looks at a standard 0.05 threshold turned 5% false winners into 27.6% in our 28-day simulation.
  • An always valid test checked daily on the same store kept false winners at 1.2%.
  • With a true 15% lift, the always valid test found the winner 92% of the time. It averaged 14.9 days instead of 28.
  • The price is lower power at a fixed end date. Plan a longer maximum run than a fixed test.

What Are Always Valid P Values?

An always valid p-value is a p-value you can read at any time and act on at any time. If the variants are identical, the chance it ever drops below 0.05 is at most 5%. A normal p-value only gives that promise once, at the planned end of the test.

Definition: Always valid p values are a running series of p-values that stays valid whenever you stop. For a store, a daily dashboard check cannot make a no-change variant a false winner over 5% of the time.

The idea was formalized for online experiments by Johari, Koomen, Pekelis and Walsh. Their paper Always Valid Inference: Continuous Monitoring of A/B Tests appeared in Operations Research in 2022 (checked Dec 2026). A related conference paper, “Peeking at A/B Tests”, was presented at KDD in 2017. The authors say the method was built into a large commercial testing platform. It had analyzed hundreds of thousands of experiments.

The second tool is the confidence sequence. It is a series of intervals that holds at every moment of the test, not just at the end. Howard, Ramdas, McAuliffe and Sekhon built confidence sequences valid over an unbounded time horizon. Their paper appeared in The Annals of Statistics in 2021 (checked Dec 2026). If you are new to interval reading, start with our guide to confidence intervals in AB testing.

Why Does Peeking Break a Normal P-Value?

Each look is a new chance for random noise to cross the 0.05 line. A fixed-horizon test spends its whole 5% error budget on one look. Peek ten times and you spend it ten times.

This is old news in statistics. Armitage, McPherson and Rowe studied it in 1969 in Repeated Significance Tests on Accumulating Data. The paper ran in the Journal of the Royal Statistical Society. We reran the idea with 200,000 simulated tests with no real effect. The looks were equally spaced, and each used a two-sided test at 0.05.

Number of looksChance of at least one false winner
1 (read once at the end)5.0%
28.4%
4 (weekly over four weeks)12.7%
7 (daily for one week)16.7%
14 (daily for two weeks)22.0%
28 (daily for four weeks)27.6%
Bar chart for always valid inference AB testing showing false winners rising from 5.0% with one look to 27.6% with 28 daily looks at a 0.05 threshold
Checking a standard AB test at the 0.05 level raises the chance of a false winner from 5.0% with one look to 22.0% with 14 daily looks and 27.6% with 28.

The p-value itself is not wrong. It answers a one-look question. Our guide to what a p-value means in AB testing covers that question in detail. The peeking problem AB test owners face comes from asking it 28 times.

How Does Always Valid Inference AB Testing Work?

Always valid inference AB testing tracks the strength of evidence as one running number. You stop the first time that number crosses a fixed bar. The bar is set so that a no-change test rarely crosses it, however long you watch.

The most common version is the mixture sequential probability ratio test, or mSPRT. A plain likelihood ratio compares “the variant changes conversion by exactly X” with “no change”. The mixture version averages over many possible lifts, weighted by a bell curve. That curve has one tuning value, tau. It is roughly the size of lift you expect.

For a conversion rate test, you need four inputs at each look:

  • D: the observed difference in conversion rate, variant minus control.
  • V: the variance of that difference, pA(1 minus pA)/nA plus pB(1 minus pB)/nB.
  • tau: the spread of lifts you consider plausible, in the same units as D.
  • alpha: your error level, usually 0.05.

The mixture likelihood ratio is:

LR = sqrt(V / (V + tau²)) × exp(tau² × D² / (2V × (V + tau²)))

You stop and declare a winner when LR reaches 1 / alpha, which is 20 at 0.05. The always valid p-value is 1 / LR, kept at its lowest value so far.

Formula card for always valid inference AB testing showing the mSPRT likelihood ratio for conversion rates, each term explained and a worked ecommerce example
The mSPRT likelihood ratio turns each look into one evidence score, and you stop only when it reaches 20, which is 1 divided by an alpha of 0.05.

Ville’s inequality from probability theory makes this safe. For a no-change test, the chance that LR ever reaches 20 is at most 1 in 20. With large samples, that promise holds across every look.

Worked Example: A Daily Check on a 3% Store

Picture a Shopify store with a 3.0% conversion rate. Each arm gets 2,000 visitors a day. Their new product page goes live, and someone opens the dashboard each morning. They set tau to 0.003, or 0.3 percentage points. That is a 10% relative lift on 3%.

Day 7. Each arm has 14,000 visitors. Control has 420 orders (3.00%). The variant has 490 orders (3.50%). So D is 0.005.

  • V = (0.03 × 0.97 + 0.035 × 0.965) / 14,000 = 0.062875 / 14,000 = 0.00000449.
  • A standard z-test gives z = 0.005 / 0.00212 = 2.36, so the fixed p-value is 0.018.
  • tau² is 0.000009, so V + tau² is 0.00001349.
  • The first factor is sqrt(0.00000449 / 0.00001349) = 0.577.
  • The exponent is (0.000009 × 0.000025) / (2 × 0.00000449 × 0.00001349) = 1.86.
  • LR = 0.577 × 6.40 = 3.7. The always valid p-value is 1 / 3.7 = 0.27.

A naive reader sees p = 0.018 and ships. The always valid reader sees 0.27 and keeps going. The bar is simply higher this early.

Day 14. Each arm has 28,000 visitors, with 840 and 980 orders. The rates are unchanged at 3.00% and 3.50%.

  • V halves to 0.00000225, and the fixed p-value falls to 0.0008.
  • The first factor is now 0.447, and the exponent is 4.46.
  • LR = 0.447 × 86.1 = 38.5. That is above 20.
  • The always valid p-value is 1 / 38.5 = 0.026, so the team can stop.

The always valid 95% interval for the lift on day 14 runs from +0.04 to +0.96 percentage points. A fixed 95% interval would run from +0.21 to +0.79. The wider range is the honest cost of having looked 14 times. Report it alongside the point estimate of +0.5 points.

Read more: How to Analyze A/B Test Results: A 7-Step Checklist

Is Anytime Valid Inference Slower Than a Fixed Test?

Yes, at a fixed end date it has less power. It often stops much earlier when the effect is clear, though. Anytime valid inference trades some power for the right to stop at any time.

We simulated the same store 20,000 times per row. Both arms started at 3.0%, with 2,000 visitors per arm per day. Each test was capped at 28 days and checked daily. The always valid test used an mSPRT with tau at 0.003.

ScenarioFixed 28-day test, read onceNaive daily peeking at 0.05Always valid test, checked daily
No real effect: false winners5.0%27.6%1.2%
True 15% lift: winners found98.9%99.6%92.0%
True 15% lift: average days used286.514.9
True 10% lift: winners found82.3%90.6%53.1%
True 10% lift: average days used2811.422.3

Average days count tests that never stopped as 28. The naive column only looks fast and powerful. It calls more than a quarter of no-effect tests winners.

Two lessons follow. A large lift gets found about twice as fast, with false winners held below 5%. A small lift needs more room. In a second run, raising the cap to 42 days lifted power for the 10% lift to 76.8%. False winners stayed at 1.7%.

The choice of tau matters less than people fear. In that second run, we tried tau at 0.0015, 0.003 and 0.006. They found the 15% lift 86.7%, 92.2% and 91.5% of the time. Set tau close to your minimum detectable effect and leave it alone once the test starts.

Set Your Stopping Rule Before Launch

Choose the primary metric, the minimum run time and the maximum run time before any shopper sees the variant. Use every CustomFit.ai feature free for 14 days.

Start Free Trial No credit card required

Sequential AB Testing Stopping Rules You Can Use Today

Sequential AB testing works only when the stop rule is written before launch. The always valid p-value tells you when the evidence is strong. These six rules tell you what to do with it.

What you see at a daily lookWhat to do
Always valid p-value below 0.05, variant ahead, at least 7 days runStop and ship the variant
Always valid p-value below 0.05, variant behindStop and keep the control
Always valid p-value above 0.05, before the maximum run timeKeep running and ignore the fixed p-value
Guardrail harm, such as checkout errors or a drop in revenue per visitorStop for harm, whatever the p-value says
Sample ratio mismatch alertPause, fix the split and restart the test
Maximum run time reached, always valid p-value above 0.05Stop, call it inconclusive and report the always valid interval

The seven-day floor does not break validity, because any stopping time is allowed. It protects you from weekday effects and novelty spikes. For the maximum run time, our simulation suggests about 1.5 times your planned fixed test length.

The CustomFit.ai team compares SPRT, mSPRT and Bayesian options in its guide to sequential testing in A/B testing. Our peeking post covers group sequential designs with a few planned looks.

When Should You Use Always Valid Inference?

Use always valid inference AB testing when someone will check the test before it ends, which is most teams. It suits sale windows, costly variants and high test volume. Skip it when you can wait for a fixed sample and need the tightest estimate.

MethodLooks allowedFalse positive controlMain cost
Fixed horizonOne, at the planned end5% at that single lookYou must wait for the full sample
Naive peekingAnyNone, 27.6% in our simulationFalse winners reach production
Group sequentialA few, planned in advance5% across the planned looksLook dates are fixed before launch
Always valid (mSPRT, confidence sequence)Any, even continuousAt most 5% at any stopping timeLess power at a fixed cap, and you pick tau
Bayesian probability to beat controlAnyNo frequentist guaranteeDaily stopping still adds wrong calls

Vendors now offer this as a setting. Optimizely’s statistical analysis methods overview lists fixed horizon, Bayesian and sequential Stats Engine options (checked Dec 2026). If your tool reports a Bayesian probability instead, read the CustomFit.ai guide on Bayesian vs frequentist A/B testing first.

Common Mistakes in Always Valid Inference AB Testing

  • Changing tau mid-test. Tuning tau after seeing data breaks the guarantee.
  • Mixing p-values. Reading the fixed p-value on the same dashboard brings the peeking problem back.
  • Testing many metrics at once. Always valid control covers one comparison. Correct for several variants or metrics.
  • Trusting the first big lift. Early stops overstate the effect. Report the interval, not just the point estimate.
  • Ignoring revenue outliers. The normal approximation needs enough orders. Cap extreme order values before you read revenue per visitor.

Run Tests You Can Check Every Day

Start with one high-traffic page, a written stopping rule and a single primary metric. Try CustomFit.ai free for 14 days, no credit card required.

Try CustomFit.ai Free No credit card required

Summary

Always valid inference AB testing lets you look at a test every day without inflating false winners. In our simulation, daily naive checks gave 27.6% false winners, while an mSPRT kept them at 1.2%. It finds big lifts fast but needs a longer cap for small ones. Write the stopping rule, tau and maximum run time down before launch, then follow the table.

FAQs

What is the difference between always valid inference and group sequential testing?

Group sequential testing allows a few looks planned in advance, each with its own stricter boundary. Always valid inference allows any number of looks at any time, even continuous monitoring. Group sequential designs keep slightly more power when you know the look dates. Always valid methods win when people will check the dashboard whenever they like.

Can I use always valid p values for revenue per visitor?

Yes, with care. The mSPRT needs a variance estimate for the metric. Revenue per visitor is noisy and skewed by a few large orders. Cap extreme order values at a high percentile before analysis. Expect a wider interval and a slower stop than for conversion rate. Keep conversion as a guardrail metric.

Is Bayesian AB testing always valid?

Not in the frequentist sense. A Bayesian probability to beat control is a different statement. It makes no promise about false winners under daily stopping. Stop the first time it reaches 95%, checking daily, and you will call more wrong winners than it suggests. Set a minimum run time and a maximum run time.

Can I extend an always valid test past its planned end date?

Yes. The guarantee holds across an unlimited time horizon, so adding a week does not inflate the false positive rate. That differs from a fixed-horizon test, where extending after a near miss is another form of peeking. Decide the new cap before you look again, and log the reason in the test brief.

Does always valid inference fix testing many variants at once?

No. It controls the error for one comparison at a time. Compare three variants with control, or read five metrics, and the chance of a false winner grows again. Apply a Bonferroni-style split of alpha or a false discovery rate method, and name one primary metric before launch.

How do I choose tau for an always valid test?

Set tau near the smallest lift you would act on, in absolute terms. For a 3% conversion rate and a 10% relative minimum effect, that is 0.003. Our simulation found only a modest power change between half and double that value. Pick it before launch and never change it after seeing data.

Read more:

Leave a Comment

Your email address will not be published. Required fields are marked *