AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Optimizely Handles Sample Size in Multi-Armed Bandit Experiments

Boris Graf · 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 requirements for multi-armed bandit (MAB) experiments. If you open Optimizely and look for a sample size calculator before launching a bandit rule, you will not find one. That absence is not an oversight—it is the direct mathematical consequence of how bandit algorithms work.

At 365Finds, we regularly see product managers and data analysts stumble into this exact trap. They transition from classic A/B testing, open their documentation, and ask: "What sample size do I need before I can call this bandit test?" The short answer is that the question itself applies the wrong statistical framework to the problem.

A standard A/B test is a hypothesis test. A multi-armed bandit is an online optimization policy. Once you recognize that fundamental division, the way Optimizely allocates traffic and evaluates bandit performance makes complete sense.


Why Bandit Algorithms Do Not Have a Sample Size Formula

In classic fixed-horizon or sequential A/B testing, sample size calculation answers a specific question: How many visitors must be exposed to detect a Minimum Detectable Effect (MDE) of size $\delta$ at a chosen statistical power (typically 80%) and significance level (typically 95%)?

To answer that question, you need:

Multi-armed bandits discard this entire apparatus. A bandit does not exist to discover whether Variation B is fundamentally superior to Variation A with bounded false-discovery rates. A bandit exists to minimize cumulative regret—the opportunity cost incurred by sending real visitors to inferior variations while you figure out which one works best.

Because traffic allocation shifts dynamically on an hourly or daily basis toward current winners, the exposure counts per variation are random variables rather than fixed denominators. You cannot run a static power calculation on a moving denominator. Optimizely’s MAB engine does not calculate a required sample size because it never intends to deliver a $p$-value or declare statistical significance.


How Optimizely Dynamically Allocates Bandit Traffic

Instead of asking you for an MDE or a required sample size, Optimizely relies on dynamic reallocation governed by the metric type you choose as your primary optimization goal:

1. Unique Conversions: Thompson Sampling

When your primary metric is binary (a visitor either converts or does not, such as signups or clicks), Optimizely uses Thompson Sampling:

2. Numeric and Revenue Metrics: Epsilon-Greedy

For non-binary metrics (such as order value, pageviews, or average session duration), Optimizely shifts to an Epsilon-Greedy approach:

What the Results Page Shows Instead of Significance

On a standard Optimizely A/B results page, you monitor confidence intervals, statistical significance flags, and sample sizes per variation. On an Optimizely MAB results page, those figures vanish.

Optimizely replaces them with "Improvement over original" (or improvement over equal allocation). This calculates the net conversion lift harvested during the experiment compared to what you would have achieved by keeping traffic pinned 50/50 or serving 100% original baseline traffic. The reporting measures captured business value, not permanent scientific proof.


The Practical Catch: Traffic Thresholds Still Matter

Mathematically, a bandit can start with zero sample size requirements. Operationally, you cannot run an effective bandit on a trickle of traffic.

At 365Finds, our primary critique of how teams deploy bandits in Optimizely is what we call "algorithmic wishful thinking." Teams assume that because an MAB doesn't demand a sample size calculation, it will magically solve sample size shortages. It will not.

Bandits require conversion velocity to work as intended:

Operational ConsiderationWhat Happens with Low Traffic (< 100 conversions total)What Happens with Adequate Traffic (> 50–100 conversions/day)
Exploitation EfficiencyBeta distributions remain wide; traffic barely shifts away from an even splitThe algorithm quickly detects genuine lift and routes 80%+ of traffic to the winner
Susceptibility to NoiseA random run of 3 early conversions can starve the true winner for daysRandom noise washes out quickly before allocation skews irreparably
Campaign DurationPromotion ends before the algorithm concentrates trafficThe bandit captures significant incremental conversions during the campaign window

If your campaign only lasts 48 hours and expects 40 conversions across three variations, a multi-armed bandit provides virtually no advantage over a coin toss. By the time Thompson Sampling tightens its posteriors, the promotional window is over. 365Finds recommends ensuring a baseline volume of at least 30 to 50 conversions per variation within your intended runtime before choosing an MAB over a straightforward rule.


Choosing Between MAB, A/B, and Stats Accelerator in Optimizely

Optimizely offers three distinct routing mechanisms. Choosing the right one requires being honest about whether your goal is harvesting revenue or building permanent institutional knowledge:

                      Do you need permanent statistical proof?
                                   /             \
                                 YES              NO
                                 /                 \
        Can you afford equal traffic splits?       Use Multi-Armed Bandit (MAB)
                 /                 \               (Maximize short-term conversions)
               YES                  NO
               /                     \
       Classic A/B Test        Stats Accelerator
  (Optimizely Stats Engine)  (Dynamic routing to significance)

1. Optimizely Multi-Armed Bandit (MAB)

2. Classic A/B Testing with Optimizely Stats Engine

3. Optimizely Stats Accelerator


365Finds Recommendation: How to Approach Bandit Planning

When preparing an experiment in Optimizely, stop searching for an MAB sample size calculator. Instead, follow this workflow:

  1. Classify the decision: If a winning result will be codified into your product for the next two years, do not use a multi-armed bandit. Run a standard A/B test and calculate your required sample size using baseline conversion rates and your target MDE.
  2. Audit event velocity: If the experiment is for a short-term campaign, calculate your expected daily conversion count. If you cannot realistically generate at least 30 conversions per variation before the campaign closes, keep the test simple rather than relying on dynamic machine learning allocation.
  3. Set the primary metric carefully: Optimizely locks your primary metric once a bandit rule begins. Ensure your primary metric directly reflects business value (unique conversions for Thompson Sampling or transaction revenue for Epsilon-Greedy), because the algorithm will ruthlessly optimize toward that single signal.

Bandit algorithms replace pre-experiment sample sizing with active real-time traffic management. In Optimizely, you do not calculate when a bandit is powered to finish; you launch it to harvest conversions while the opportunity exists, and you stop it when the campaign window closes.

References