AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Optimizely Calculates Sample Size and Statistical Significance for Multi-Armed Bandit Experiments

Ana Flávia Magalhães · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Optimizely does not calculate sample size, and it does not calculate statistical significance for multi-armed bandit experiments.

At 365Finds, we watch experimentation teams walk into this exact wall every month. A growth lead sets up a Multi-Armed Bandit (MAB) optimization, navigates to the reporting dashboard, and frantically searches for the familiar sample size calculator, the minimum detectable effect (MDE) inputs, and the 95% statistical significance marker. They find none of them. They assume the dashboard is lagging, or that someone misconfigured the experiment ruleset.

It is not broken. The omission is deliberate.

Asking how Optimizely calculates sample size and statistical significance for a multi-armed bandit optimization is a category error. Bandits and classical hypothesis tests are designed to solve two fundamentally incompatible mathematical problems. Until a team understands which problem they are paying to solve, deploying an MAB in Optimizely is an easy way to burn analytical credibility.

The Mathematics of Earning vs. Learning

Classical A/B testing is an exercise in scientific discovery. You state a null hypothesis ($H_0$), establish a minimum detectable effect, cap your acceptable false positive rate ($\alpha$, usually 5%) and false negative rate ($\beta$, usually 20%), split your traffic 50/50, and lock the doors. You collect an identical volume of data across all variations until you hit a fixed sample horizon, strictly preserving the independent and identically distributed (i.i.d.) nature of your visitors. The sole priority is learning: determining whether variation B genuinely beats variation A, or whether you are being deceived by random noise.

Multi-armed bandits discard that objective entirely.

Bandits do not care why a variation is winning. They do not care whether an observed lift represents an enduring behavioral shift or a fleeting holiday anomaly. Their mandate is not learning; it is earning.

In reinforcement learning terms, multi-armed bandits solve the "regret minimization" problem. Every visitor sent to an inferior variation represents lost conversions and lost revenue. Instead of maintaining an equal traffic split to preserve statistical integrity, a bandit dynamically diverts traffic toward whatever variation happens to be leading at that exact moment.

Because the algorithm continuously starves losing variations and feeds winning ones, two things happen immediately:

  1. Pre-experiment sample size calculations become meaningless. There is no fixed sample size horizon to calculate. The experiment does not "end" when a predetermined number of visitors have passed through the gate. Traffic flows continuously, and the split adapts in perpetuity.
  2. Standard p-values become mathematically invalid. Skewing traffic based on real-time performance violates the core assumptions of classical frequentist inference. If you attempt to calculate a standard p-value on dynamically manipulated sample distributions, your Type I error rate skyrockets, selection bias contaminates the estimates, and the reported confidence intervals collapse into fiction.

Optimizely understood this reality when building its platform. Rather than slapping misleading p-values onto a dynamic traffic allocation engine, Optimizely deliberately stripped statistical significance and sample size calculations from the MAB results page.

How Optimizely Actually Allocates Bandit Traffic

Instead of waiting for a sample size threshold, Optimizely relies on adaptive Bayesian and heuristic algorithms to route traffic on the fly. How traffic moves depends entirely on the metric type assigned to the rule.

1. Binary (Bernoulli) Metrics: Thompson Sampling

When you optimize for binary events—actions that either happen or do not, such as button clicks, lead form submissions, or newsletter signups—Optimizely deploys Thompson Sampling.

Under the hood, Optimizely models the unknown conversion rate of each variation as a Beta distribution:

$$\text{Beta}(\alpha, \beta)$$

Here, $\alpha$ represents the observed conversions, while $\beta$ represents the non-conversions. At the start of an experiment, when data is sparse, the probability distributions for all variations are wide and flat. Uncertainty is high, which naturally forces the algorithm to explore all variations with roughly equal probability.

As visitor interactions accumulate, Optimizely regularly updates these Beta distributions and runs Monte Carlo simulations (typically 10,000 draws). In each draw, the algorithm samples a conversion rate from each variation's current distribution and records which one comes out on top. The proportion of simulations won by a specific variation directly dictates the percentage of incoming live traffic allocated to that variation for the next cycle.

If Variation B wins 7,200 out of 10,000 simulated rounds, it receives approximately 72% of upcoming visitor traffic. If its conversion performance falters during the next cycle, the distribution tightens downward, and subsequent draws automatically shift traffic back toward other contenders.

2. Continuous (Numeric) Metrics: Epsilon-Greedy

When optimizing for numeric metrics with high variance—such as revenue per visitor or total order value—Thompson Sampling can become unstable due to heavy tails and outliers. In these scenarios, Optimizely shifts to an Epsilon-Greedy allocation strategy.

Epsilon-Greedy splits traffic into two explicit operational modes:

What Optimizely Reports Instead of P-Values

Since Optimizely’s MAB dashboard contains neither p-values nor statistical confidence scores, what does it actually report?

The primary metric on an Optimizely MAB results page is Improvement over Original (or improvement over equal allocation). Optimizely models the total conversions or revenue captured under the bandit’s adaptive traffic routing and contrasts that figure against an estimated counterfactual: what would have happened if 100% of that traffic had been locked into the original variation, or split equally across all arms.

It is an accounting of captured value, not a certificate of scientific truth.

The Common Point of Confusion: Stats Accelerator

Much of the confusion surrounding this topic stems from naming and product crossover. Practitioners often read that "Optimizely uses multi-armed bandits to reach statistical significance faster" and assume this refers to standard MAB optimizations.

It does not. That capability belongs to an entirely separate Optimizely feature called Stats Accelerator (formerly Accelerate Learning).

Stats Accelerator is fundamentally different from a pure MAB optimization:

DimensionMulti-Armed Bandit (MAB) OptimizationStats Accelerator
Core ObjectiveMaximize total conversions / revenue (earning)Find statistically significant winners as fast as possible (learning)
Primary AlgorithmThompson Sampling (binary) or Epsilon-Greedy (numeric)Upper Confidence Bound (UCB) family
Statistical EngineNone (significance omitted)Optimizely Stats Engine (Sequential mSPRT)
P-Values & SignificanceNot calculated or displayedAlways-valid p-values with False Discovery Rate (FDR) control
Sample Size DynamicsFluid, continuous; no target sample sizeDynamically minimized total sample size needed across variants
End StateRuns continuously or until campaign endsRetires variations as they reach significance; reallocates traffic

Stats Accelerator was designed in collaboration with academic researchers, including Kevin Jamieson, specifically to bridge the gap between adaptive routing and valid statistical inference.

Instead of routing traffic strictly to current winners via Thompson Sampling, Stats Accelerator uses an Upper Confidence Bound (UCB) heuristic. It examines the confidence intervals generated by Optimizely’s Stats Engine and actively routes traffic to the variations with the highest potential to resolve uncertainty—specifically, the variations whose confidence boundaries are closest to crossing the significance threshold against the baseline.

Because Stats Accelerator is powered by Optimizely’s Stats Engine, it relies on always-valid p-values derived from mixture Sequential Probability Ratio Tests (mSPRT). This mathematical foundation allows the system to continuously evaluate incoming data and dynamically skew traffic without inflating the false discovery rate. Once a specific variation crosses the significance threshold, it is retired from active exploration, and traffic is reallocated to remaining contenders.

Stats Accelerator calculates statistical significance and dramatically reduces the total sample size required to conclude a multi-variation test. Pure MAB optimizations do neither.

365Finds Recommendation: Where Bandits Belong (and Where They Don't)

At 365Finds, our assessment of Optimizely’s dynamic multi-armed bandit is clear: bandits are tactical revenue engines, not strategic research instruments.

The temptation to replace standard A/B tests with multi-armed bandits is understandable. Nobody likes explaining to an executive why 50% of website traffic was forced onto a clearly inferior checkout page for three consecutive weeks just to satisfy an arbitrary sample size calculation. Bandits promise an escape from that commercial pain.

That escape comes with a steep cost. When you choose a bandit, you forfeit the ability to understand why something worked, you sacrifice clean baseline comparisons, and you cannot reliably extrapolate the test’s conclusions into future product development.

At 365Finds, we recommend applying Optimizely’s experimentation features using the following operational boundaries:

When to Deploy Pure MAB Optimizations

When to Strictly Forbid Pure MAB Optimizations

In Optimizely Feature Experimentation, an MAB optimization is configured by creating a feature flag rule with the rule type explicitly set to multi_armed_bandit, routing live requests via the SDK's Decide method without hypothesis thresholds, whereas tests requiring statistical proof are bound to the Stats Engine with predetermined error rates.

References