Moving to A(/B) Bayesian World — Part 1

Tom Armitage, Dustin Hayden13 Aug 2024

Problem

Analysts at Auto Trader UK compared the average CTR of two groups and then ran frequentist significance tests. A bare average has no error bar, and the p-value cutoff of 0.05 is an arbitrary convention. Confidence intervals answer "what difference is plausible" only with nuanced interpretation, so results are hard to explain to stakeholders. The team also wanted a clear stopping rule and an estimate of test duration before launch.

Example from the article: a front page that prominently features electric vehicles (experimental group) against one featuring internal combustion vehicles (control), compared on the click-through rate (CTR) for electric vehicles.

Solution in brief

Model each group's metric as a posterior distribution, then draw samples from both posteriors and read off the difference, the Chance to Beat and the Expected Loss. Use Expected Loss, which is in the metric's own units, as the stopping threshold. Estimate worst-case duration by simulating identical variants of growing size.

Questions this case answers
  • How to turn a two-variant experiment readout into a risk-based stop-or-ship decision that non-statisticians can interpret
  • How to estimate the worst-case duration of an experiment before it starts from the metric level and daily traffic
  • How to report A/B test results so stakeholders see the plausible range of the effect, not just a significant or non-significant verdict?
  • How to decide when to stop a running A/B test using the size of the possible loss instead of a p-value?

Tools and methods

  • Posterior per variant — a probability distribution of the metric from a likelihood and a prior
  • Chance to Beat — share of sampled differences where the experiment wins
  • Expected Loss — average loss across sampled differences, used as a risk number and stopping threshold
  • time_to_result simulation — worst-case duration estimate from identical variants
  • In-house Python package — internal, distributed via pip to the Analytics Group
Continue reading — it's free

Google or a one-time email code. No password.