Exploration vs exploitation

A classic A/B test is pure exploration: we spend the same amount of traffic on both variations right
up to the final decision. MAB balances the two:

  • Exploration — it keeps sending a small share of traffic to the weaker variation, in case the
    data so far is misleading
  • Exploitation — it gives most of the traffic to the leading variation while the test is still running
Day 1:  A — 50%,  B — 50%  (not much data yet)
Day 5:  A — 35%,  B — 65%  (B starts to pull ahead)
Day 10: A — 10%,  B — 90%  (B is clearly better)
Day 14: A — 3%,   B — 97%  (B has all but monopolised the traffic)

Thompson sampling — how the algorithm works

  1. Each variation carries a beta distribution, Beta(α, β), where α = conversions and β = non-conversions
  2. For every new visitor the algorithm samples a value from each variation’s distribution
  3. The visitor is shown the variation with the highest sampled value
  4. As data accumulates the distributions narrow → the leader receives more and more traffic

When MAB beats a classic A/B test

Scenario Classic A/B MAB
Long test, high traffic ✓ Preferred Works fine
Short seasonal test May never reach its sample ✓ Optimal
Three or more variations Needs a Bonferroni correction ✓ Native
Strict p-value significance required ✓ Preferred Not guaranteed
Recommendation algorithms Works fine ✓ Optimal

The limits of MAB

MAB is not perfect. Its limitations:

  • It does not guarantee strict statistical significance in the classic sense
  • It can pick a winner too quickly on thin traffic, off early fluctuations
  • The final result is harder to interpret when the decision has to be documented