Bayes theorem and updating beliefs

Bayesian statistics rests on a simple idea: you start with a belief (the prior), you observe data, and
you update that belief in line with the new evidence (the posterior).

Applied to an A/B test:

Prior (before the test): “conversion is usually 2–3%”
Data (from the test):    control CR = 2.1%, variation CR = 2.5%, sample 10K
Posterior:               “variation B beats the control with 91.7% probability”

None of this requires a p-value threshold or a sample size fixed in advance.

The Bayesian approach in A/B testing

In e-commerce A/B testing, the Bayesian model on the beta distribution has become the standard for
product teams. Instead of a binary significant / not significant you get:

Metric Frequentist Bayesian
Primary result Is p-value < 0.05? Probability to be best = X%
Stopping early Breaks the statistics Allowed
Expected loss Not calculated Can be calculated
Intuitiveness Low High

Expected loss — the expected cost of choosing the wrong variation — is a particularly useful
number: it lets you make a good-enough decision even at 85% confidence, as long as the cost of an
error is small.

The beta distribution for conversion metrics

The beta distribution Beta(α, β) is the natural model for conversion metrics, since CR is a value
between 0 and 1. Its parameters update as data accumulates:

At the start:                     Beta(1, 1) — uniform, “we know nothing”
After 100 conversions and 4,900 non-conversions: Beta(101, 4901) — CR ≈ 2%

Comparing two beta distributions — control vs variation — gives the probability that one value is
greater than the other, and that is exactly the probability to be best.

MAB as Bayesian optimization

Multi-armed bandit works on the same principle: each variation is described by a beta distribution,
and the Thompson sampling algorithm picks the variation for the next user with a probability
proportional to its current posterior. Traffic flows automatically toward the better variations.

Tip: the Bayesian approach does not remove the need to plan sample size. Set a minimum test
duration (two weeks) and a minimum traffic volume per variation — even a high probability after
100 users is not enough data for a production decision.