Problem
An analyst hears that a Bayesian A/B test is better than a frequentist one: the -value is hard to read, prior knowledge can be added, the test can stop early, the results can be checked at any moment, and many tests need no correction. The decision is binary (roll out or not), so a rule is judged by its two error rates: type I must equal the significance level, type II should be as small as possible.
Example from the article: a conversion of 0.3 and an expected lift of 0.1, tested with a one-sided test on Bernoulli data.
Solution in brief
The author compares both rules by simulation on 10,000 synthetic A/A and A/B experiments and reads off the error rates with confidence intervals. With the same data the Bayesian rule (probability that B beats A above ) gives the same errors as the -test. An informative prior only shifts the balance between the two errors. Early stopping, peeking and multiple testing show no Bayesian gain either.
Questions this case answers
- How to compare two experiment decision rules by their error rates on synthetic A/A and A/B data before choosing one
- How to monitor a running experiment and stop early without inflating the false-positive rate
- How to decide whether switching an A/B test from a frequentist to a Bayesian analysis will give better decisions?
- How to check by simulation that an A/B decision rule keeps the type I error at the significance level and the type II error at the planned level?
Tools and methods
- Bayesian A/B test with a beta prior — samples both posteriors and takes the share of draws where B beats A.
- Frequentist -test for proportions — one-sided test with
proportions_ztest. - A/A and A/B simulation — 10,000 runs to estimate error rates and their confidence intervals.
- Power analysis — group size from , , the effect and the variances.
Google or a one-time email code. No password.
