Bayesian A/B Test Calculator

Run a Bayesian A/B test analysis. Compute the probability that variant B beats control A using Beta posterior distributions and Monte Carlo simulation.

Control (A)

Variant (B)

P(B beats A)
97.3%
โœ… High confidence
Control CR (A)
3.00%
Beta(151, 4851)
Variant CR (B)
3.70%
Beta(186, 4816)
Relative Lift
+23.33%
Observed (B โˆ’ A) / A
Planning notes, formulas, and examples

About the Bayesian A/B Test Calculator

Bayesian A/B testing provides a more intuitive answer than frequentist methods: "What is the probability that B is better than A?" Instead of p-values and significance thresholds, you get a direct probability (e.g., "there is a 96% chance that the variant outperforms the control").

This calculator uses Beta posterior distributions to compute P(B > A) from conversion data. Each group's conversion rate is modeled as a Beta distribution updated with observed successes and failures. The probability of B being better is computed analytically or via simulation.

Bayesian analysis also naturally handles the peeking problem โ€” you can check results at any time without inflating false positive rates, because the probability statement is always valid. This makes Bayesian methods particularly appealing for teams that want to monitor tests continuously.

When This Page Helps

Bayesian analysis answers the question stakeholders actually ask: "How confident are we that B is better?" in a direct probability. No more explaining p-values. The results are actionable and intuitive for non-technical decision-makers.

How to Use the Inputs

  1. Enter visitors and conversions for the control group (A).
  2. Enter visitors and conversions for the variant group (B).
  3. The calculator computes the posterior Beta distribution for each group.
  4. Review the probability that B beats A.
  5. A probability above 95% is typically used as the decision threshold.
Formula used
Posterior A ~ Beta(ฮฑ_A + x_A, ฮฒ_A + n_A โˆ’ x_A) Posterior B ~ Beta(ฮฑ_B + x_B, ฮฒ_B + n_B โˆ’ x_B) P(B > A) computed via closed-form or Monte Carlo sampling Using non-informative prior: ฮฑ = 1, ฮฒ = 1 (uniform)

Example Calculation

Result: P(B > A) = 97.3%

Control: 150/5,000 = 3.0%, modeled as Beta(151, 4851). Variant: 185/5,000 = 3.7%, modeled as Beta(186, 4816). Monte Carlo sampling of 100,000 draws shows B beats A in 97.3% of simulations. There is a 97.3% probability the variant is genuinely better.

Tips & Best Practices

  • A probability of 95%+ is a common threshold, but the exact threshold depends on the cost of being wrong.
  • The non-informative prior (Beta(1,1)) lets the data speak; use informative priors only if you have strong prior knowledge.
  • Bayesian analysis handles sequential peeking naturally โ€” the probability is valid at any point during the test.
  • For high-stakes decisions, wait until P(B > A) exceeds 99%.
  • Expected loss (see companion calculator) adds a risk dimension beyond just probability.
  • Bayesian and frequentist methods usually agree for well-powered tests.

The Bayesian Advantage

Bayesian A/B testing eliminates the most common frustrations with frequentist methods: unintuitive p-values, the prohibition on peeking, and binary significant/not-significant conclusions. Instead, you get a continuous probability that naturally accommodates monitoring and evolves as data arrives.

Understanding the Beta Distribution

The Beta distribution is the natural model for proportions (conversion rates). With parameters ฮฑ (successes + 1) and ฮฒ (failures + 1), it represents our uncertainty about the true conversion rate. More data = narrower distribution = more certainty.

Decision Framework

Instead of a binary ship/no-ship decision, Bayesian analysis enables nuanced decision-making. You can set different thresholds based on risk: 90% probability for low-cost reversible changes, 95% for standard features, 99% for irreversible or high-cost decisions. Combine with expected loss for even more robust decisions.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • There is a 95% probability that the variant's true conversion rate is higher than the control's. Unlike a p-value, this is a direct probability statement about the hypothesis, which is more intuitive and easier to act on.