Bayesian vs Frequentist A/B Testing: Which Should You Use?

⏱️ 4 min read 📈 Data Analysis

Frequentist testing asks how surprising your data would be if the variants were identical, and answers with a p-value. Bayesian testing asks how likely each variant is to be better given the data and a prior, and answers with a probability. With weak priors and the same data they usually agree on the numbers; they differ in what the numbers mean and in how easy they are to misuse.

Quick answer: On the same test (5.00% vs 5.50% conversion, 10,000 users per arm) the frequentist result is p = 0.113 with a 95% CI on the difference of [-0.12 pp, +1.12 pp], and the Bayesian result with a uniform Beta(1,1) prior is P(B beats A) = 94.3% with a 95% credible interval of [-0.12 pp, +1.12 pp]. The intervals are nearly identical; only the framing differs. Bayesian gives you a directly usable "probability B is best" and expected loss; frequentist gives you a fixed, well-understood error rate. Neither one makes peeking free.

What is the actual difference between the two approaches?

The difference is what gets treated as random. Frequentist methods treat the true conversion rate as a fixed unknown constant and your data as random; Bayesian methods treat the data as fixed once observed and represent your uncertainty about the rate as a probability distribution.

FrequentistBayesian
Parameter isFixed unknown constantRandom variable with a distribution
Primary outputp-value, confidence intervalPosterior distribution, P(B > A), credible interval
Requires a priorNoYes (can be deliberately uninformative)
Guarantee offeredLong-run error rate (α) across repeated testsCoherent probability statement given the prior
Decision rulep < α with a pre-set sample sizeP(B > A) above a threshold, or expected loss below a cap
Reports "chance of winning"No, and cannotYes, directly

That last row is the honest reason Bayesian A/B testing spread through product teams: stakeholders want "how likely is B better?" and the frequentist framework structurally cannot answer that question. It answers a different one.

What do the two methods say about the same test?

Almost the same thing, expressed differently. Take control at 500 conversions from 10,000 users and variant at 550 from 10,000, a 10% relative lift.

FREQUENTIST (two-proportion z-test)
  p̂_A = 5.00%   p̂_B = 5.50%   difference = +0.50 pp
  z = 1.585      p = 0.113     → not significant at α = 0.05
  95% CI on the difference: [-0.118 pp, +1.118 pp]

BAYESIAN (Beta-Binomial, uniform Beta(1,1) prior)
  posterior_A = Beta(501, 9501)    posterior_B = Beta(551, 9451)
  P(B > A) = 94.3%
  Expected loss if you pick B = 0.0077 pp
  Expected loss if you pick A = 0.507 pp
  95% credible interval on the difference: [-0.120 pp, +1.119 pp]

The intervals agree to two decimal places, because with a flat prior and this much data the posterior is dominated by the likelihood. What changed is the sentence you can say out loud. Frequentist: "if the variants were truly identical, we would see a gap this big or bigger 11% of the time." Bayesian: "given the data and a flat prior, there is a 94% probability B's true rate exceeds A's." Same evidence, and 94.3% sounds far more decisive than p = 0.113 to a room full of non-statisticians. That asymmetry in perceived decisiveness is the main practical risk of switching.

What is expected loss and why does it matter?

Expected loss is the average amount of conversion rate you give up if you pick a given variant and it turns out to be the worse one. It is the number that makes Bayesian testing genuinely useful for decisions, and it is more informative than P(B > A) alone.

Expected loss(B) = E[ max(rate_A - rate_B, 0) ]

In the test above: 0.0077 percentage points.
On a 5% baseline that is a 0.15% relative downside.

The interpretation is concrete: if you ship B and you are wrong, you expect to lose about 0.008 percentage points of conversion on average. A common rule is to ship when expected loss falls under a threshold you set from business tolerance, such as 0.1% of baseline. That converts the statistics into a caring-about-money statement, and it correctly distinguishes "B is probably better by a hair" from "B is probably better by a lot." P(B > A) = 94% cannot tell those apart; expected loss can.

Does Bayesian A/B testing let me stop whenever I want?

No, and this is the most damaging myth in the field. Continuous monitoring with a "stop when P(B > A) > 95%" rule inflates your error rate just as peeking inflates a frequentist α.

The confusion comes from a true statement: a Bayesian posterior is valid at every point in time given the data seen so far, so there is no "you looked too early" violation of the math. But the decision rule layered on top is a stopping rule, and stopping rules have error rates. If you check daily and stop the first time P(B > A) crosses 95%, then across many genuinely null tests you will hit that threshold far more often than 5% of the time, because you gave yourself many chances. The posterior is honest; the procedure is not.

What actually helps:

How do I choose a prior without cheating?

Use a weak, uninformative prior unless you have a defensible reason not to, and always report which prior you used. Beta(1,1) is uniform over [0,1] and is the standard neutral default for conversion rates.

PriorMeaningWhen to use
Beta(1, 1)Uniform, all rates equally likelyDefault; safe, lets the data speak
Beta(0.5, 0.5)Jeffreys prior, slightly favors extremesVery small samples, reference analysis
Beta(50, 950)Centered on 5%, worth ~1,000 prior observationsStrong historical baseline; will visibly pull small-sample results

The rule of thumb: a Beta(a, b) prior is worth roughly a + b pseudo-observations. If your test has 20,000 users per arm, a Beta(50, 950) prior contributes about 5% of the total information and barely moves the answer. If your test has 800 users per arm, that same prior is doing most of the work. Informative priors are legitimate, but they must be chosen before the test and disclosed, or they are just a thumb on the scale.

Which one should my team actually use?

Either works if you fix the sample size in advance and read the interval rather than the headline number. Pick based on your audience and your governance needs, not on which one is philosophically superior.

SituationBetter fitWhy
Regulated or audited decisionsFrequentistFixed, universally understood error rates; no prior to defend
Product teams making ship/no-ship callsBayesianExpected loss maps directly to business cost
Many low-traffic testsBayesianPriors and expected loss degrade more gracefully than p-values
Multi-armed tests with a "pick the best" goalBayesianP(best) generalizes past two arms naturally
Comparing against published external resultsFrequentistEveryone else reports p-values and CIs
Team with no statistician on handFrequentistFewer knobs to set wrong; prior selection is a real failure mode

The genuinely important discipline is identical in both worlds: one pre-registered primary metric, a sample size fixed before launch, a full business cycle of runtime, and a decision based on the size of the effect rather than the significance verdict. Teams that do those four things get similar answers from either framework. Teams that do not get bad answers from both.

Common mistakes in Bayesian and frequentist testing

Pro Tip: Whichever framework you pick, report all three numbers on the results page: the point estimate, the interval (confidence or credible), and the sample size. The single-number summary — whether it is "p = 0.03" or "96% chance to win" — is where every misreading in this article starts. An interval next to the estimate makes an over-claim visible to anyone in the room.

← Back to Data Analysis Tips