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.

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. Whether you are a beginner or experienced professional, this free online tool provides instant, reliable results without manual computation. By automating the calculation, you save time and reduce the risk of costly errors in your planning and decision-making process.

Why Use This Bayesian A/B Test Calculator?

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. Having a precise figure at your fingertips empowers better planning and more confident decisions. Manual calculations are error-prone and time-consuming; this tool delivers verified results in seconds so you can focus on strategy.

How to Use This Calculator

  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

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

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.

Frequently Asked Questions

What does P(B > A) = 95% mean?

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.

What prior should I use?

The default prior Beta(1,1) is non-informative (uniform). This means you have no prior belief about the conversion rate. For mature products, you could use an informative prior based on historical data (e.g., Beta(30, 970) if you know the CR is around 3%).

Can I check Bayesian tests early?

Yes, with caveats. The probability P(B > A) is always valid, so peeking does not inflate false positives like in frequentist testing. However, early probabilities fluctuate more due to small samples. Wait until the probability stabilizes before deciding.

How does Bayesian differ from frequentist testing?

Frequentist: "If there is truly no difference, would we see data this extreme?" (p-value). Bayesian: "Given the data, what is the probability B is better?" (posterior). Bayesian answers the more natural question and allows valid peeking.

What is the expected loss?

Expected loss measures the average cost of choosing B when A might actually be better. It combines probability AND magnitude of being wrong. A test might have 90% probability B wins but low expected loss, making it safe to ship B.

When do Bayesian and frequentist disagree?

They rarely disagree meaningfully for well-powered tests with non-informative priors. Disagreements arise mainly with small samples, informative priors, or borderline results. In practice, most A/B tests produce similar conclusions with either method.

Related Pages