- Introduced by
- Herbert Robbins (bandit framework); Thompson Sampling formalized by William R. Thompson
- Year
- 1952 (Robbins); applied to A/B testing from ~2010s onward
- Type
- Adaptive experimental design
- Family
- Experimental design
What does it do?
An Adaptive A/B test is an experimental design that reallocates traffic or participants toward better-performing variants while the experiment is still running, rather than holding allocation fixed until the end.
It draws on multi-armed bandit algorithms such as Thompson Sampling or Upper Confidence Bound (UCB), which balance exploring uncertain variants against exploiting those already performing well. The aim is to reduce the cost of running weaker variants. Valid inference about the comparison then requires sequential or Bayesian analysis designed for adaptive allocation, not standard end-of-study tests.
The intuition behind the method
In a classic A/B test you split visitors 50/50 between two versions and wait until the end to declare a winner — meanwhile half the traffic keeps hitting the inferior variant. An adaptive A/B test works more like a learning system: it starts roughly even, but as evidence accumulates that variant B is outperforming variant A, it gradually shifts more traffic to B. The experiment continues to collect data for statistical inference, but the cost of running the worse option is actively minimized in real time. The analogy is a slot machine player who tracks which machines pay out more and shifts their play accordingly, while still sampling all machines enough to stay confident in the comparison.
History
The theoretical basis lies in the multi-armed bandit problem, a sequential decision framework in which an agent repeatedly chooses among actions with uncertain payoffs and must balance exploiting the best-known action against gathering information about the others. Thompson Sampling, a posterior-sampling rule for this problem, has long been studied and is now one of the most widely used bandit algorithms, as Russo et al. (2018) describe in their tutorial. Response-adaptive randomization in clinical trials and, more recently, bandit methods in online A/B testing draw on the same idea. Their growing use in online experimentation reflects the wish to reduce the opportunity cost of testing at scale.
When to use it
Choose an adaptive design when running a weaker variant has a real cost, such as lost revenue, harm to participants, or a limited campaign window, and when allocation can actually shift during the trial. This requires enough outcomes for the algorithm to learn which variant is better, and outcomes that arrive quickly relative to the allocation cadence. It is also suited to comparing several variants at once, where fixed equal allocation would spread the sample thinly, and to settings where maximizing outcomes during the trial matters. Avoid it when outcomes are delayed relative to allocation decisions, since updates then rest on incomplete data. Avoid it when the total sample is too small for allocation to meaningfully adapt, when a protocol or regulator requires interpretable fixed allocation ratios, and when a balanced randomized design would answer the question adequately with simpler analysis.
Limitations and considerations
- Depends on outcomes arriving fast enough to update allocation; when feedback lags for a long period, the update loop breaks down and adaptation loses its purpose.
- Inference is harder than under fixed allocation: ordinary end-of-study tests assume a design that no longer holds, so sequential or Bayesian procedures are needed.
- Adaptive allocation produces unequal group sizes, which reduces power for detecting small effects and makes subgroup comparisons less precise.
- Requires infrastructure for real-time data capture, posterior or confidence updating, and traffic routing, which standard survey or laboratory platforms often lack.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Lowers cumulative exposure to weaker variants compared with fixed equal allocation, which matters when each participant's outcome carries moral or commercial weight.
- Scales to multi-arm settings, where fixed allocation would spread the sample thinly across many variants.
- Valid inference remains possible when allocation is combined with pre-registered stopping rules and analysis suited to adaptive data.
- Pairs naturally with Bayesian updating, so the current evidence about each variant can be reported at any point in the trial.
- Applies across settings with different cost structures, including online experiments, response-adaptive clinical randomization, and field experiments.
Applications
- Online product experimentation: routing web traffic toward higher-converting page variants during the test to reduce revenue lost to inferior designs.
- Digital health interventions: adaptively allocating participants to more effective arms in remote or app-based trials.
- Email and push-notification campaigns: shifting delivery toward subject lines or content with higher open or click rates while the campaign runs.
- Educational technology: assigning students to more effective instructional variants based on learning outcome signals as they arrive.
- Pricing and recommendation systems: testing several price points or recommendation algorithms while steering users toward the better-performing options during the test period.
How it works
How it works
The researcher specifies the variants to compare (typically two or more versions of a webpage, message, treatment, or product), the primary outcome metric (e.g., conversion rate, click-through, task completion), the minimum detectable effect size, and the stopping rule — either a fixed horizon (maximum sample size) or a sequential boundary (pre-registered alpha-spending rule).
Each variant starts with a prior belief about its performance, expressed as a probability distribution over the expected outcome. For binary outcomes this is typically a Beta distribution. For continuous outcomes such as mean revenue or time on task, a normal prior is commonly placed on each arm's mean, with a normal likelihood whose variance is either assumed known or estimated from the data. This assumes the variance is broadly stable across arms, and departures from that assumption should be checked. In frequentist UCB approaches, the initial confidence intervals are set wide to reflect equal uncertainty across variants. Allocation starts roughly even so that every variant receives enough early observations to be assessed.
At each decision epoch, which may be a single participant, a batch, or a time unit, the algorithm decides where the next unit goes. Under Thompson Sampling, a performance value is drawn from each variant's current posterior and the variant with the highest draw receives the unit; under UCB, the variant with the highest upper confidence bound is chosen. This step repeats throughout the experiment.
After each observation, the outcome is recorded and the chosen variant's belief is updated: a Bayesian posterior update in Thompson Sampling, or a recalculated confidence interval in frequentist UCB approaches. The updated beliefs inform the next allocation decision, so the design learns from evidence as it accumulates.
The experiment stops when a pre-registered criterion is met: the maximum sample size is reached, a sequential boundary is crossed, or the posterior probability that one variant is best exceeds a pre-specified threshold (e.g., 95%). Stopping rules must be declared before data collection, because continuous monitoring without them inflates the Type I error rate.
The researcher reports the estimated effect size and uncertainty for each variant, the proportion of participants allocated to each variant, and the overall metric gain relative to a fixed-allocation benchmark. Inferential statements follow the pre-registered stopping rule framework (frequentist or Bayesian) rather than conventional end-of-study t-tests, which do not account for adaptive allocation.
Common pitfalls
- Peeking without a stopping rule: monitoring outcomes continuously and stopping when significance first appears, without a pre-registered alpha-spending rule, substantially inflates the Type I error rate. Pre-register the stopping criterion.
- Ignoring delayed outcomes: if the metric lags the treatment (for example, 30-day retention for a variant assigned today), the algorithm updates on incomplete data and allocates incorrectly. Use designs that account for delayed feedback or switch to a fixed design.
- Applying fixed-allocation analysis: reporting standard confidence intervals or p-values from an end-of-study t-test after adaptive allocation can produce biased estimates. Use sequential tests with valid stopping boundaries, Bayesian credible intervals, or off-policy correction estimators.
- Too few observations for adaptation to matter: with a small total sample, the algorithm barely shifts allocation before the experiment ends, and a balanced randomized design is more efficient.
- Conflating the exploration goal with the inference goal: adaptive allocation optimizes aggregate outcomes during the trial. If the sole goal is precise estimation of every arm's effect, a balanced fixed design usually gives more precise comparisons across arms. Adaptive designs can improve precision for the best or largest effect under some conditions, so simulate both designs before choosing.
Frequently asked questions
Is an adaptive A/B test statistically valid?
It can be, provided the allocation rule, the stopping rule and the analysis are all pre-registered and the analysis is matched to the adaptive design. Ordinary t-tests and fixed-sample confidence intervals computed at the end do not account for the changing allocation. Sequential tests with a pre-specified alpha-spending rule are designed for this setting. Bayesian credible intervals give valid posterior statements under the stated model, but their frequentist coverage under adaptive allocation has to be checked separately rather than assumed. Off-policy estimators such as inverse propensity weighting rely on their own assumptions and need to be justified for the design. The central discipline is fixing the stopping rule and analysis before data collection begins.
How is this different from a standard multi-arm experiment?
A standard multi-arm experiment assigns participants to variants in fixed proportions, often equal ones, throughout the trial and analyzes all data at the end. An adaptive A/B test updates the allocation ratios during the trial based on accumulating outcome data, so better-performing arms receive more participants over time. The inferential machinery must account for this non-fixed allocation, whereas standard multi-arm analysis assumes fixed randomization.
What is Thompson Sampling and why is it popular?
Thompson Sampling is a Bayesian algorithm that, at each decision step, draws a performance value from each variant's current posterior distribution and assigns the next unit to the variant with the highest draw. It is popular because it is comparatively simple to implement and balances exploring uncertain variants with exploiting strong ones through the posterior itself. The tutorial literature describes it as computationally efficient and widely used. For binary outcomes, Beta posteriors make the update a simple count-based calculation.
When should I stick with a classic fixed-allocation A/B test?
Use a fixed design when outcomes are substantially delayed relative to the allocation decisions, when the sample is too small for the algorithm to adapt meaningfully, when regulatory or protocol requirements mandate balanced allocation (as in certain confirmatory clinical trials), or when the sole objective is precise effect estimation rather than maximizing outcomes during the trial. In these situations a balanced randomized controlled design gives cleaner inference with simpler analysis.
Can adaptive A/B testing be used for more than two variants?
Yes. The multi-armed bandit framework extends to any number of arms. With many variants, adaptive allocation is especially useful, because fixed equal allocation spreads the sample very thinly across poorly performing arms. Thompson Sampling and UCB both extend directly to multi-arm settings.
Related methods
Sources
Russo, D., Van Roy, B., Kazerouni, A., Osband, I., & Wen, Z. (2018). A Tutorial on Thompson Sampling. Foundations and Trends in Machine Learning, 11(1), 1–96.
Open DOI referenceOffer-Westort, M., Coppock, A., & Green, D. P. (2021). Adaptive Experimental Design: Prospects and Applications in Political Science. American Journal of Political Science, 65(4), 826–844.
Open DOI reference