Bonferroni Correction in A/B Testing, Explained

Bonferroni correction AB testing illustration comparing unadjusted, Bonferroni and 5 percent FDR thresholds for three variant comparisons.

A single A/B test at a 5% significance level will produce a false winner about one time in twenty when there is no real effect. That cost is usually acceptable. It is not acceptable when you run a multiple variants ab test, or when you read eight metrics as if each were the primary, and then treat every p-value below 0.05 as a finding. That is the multiple comparisons ab testing problem, and the Bonferroni correction AB testing teams use is one way to put a cap on it.

This post explains what is bonferroni correction, when to use it, how it compares with a false discovery rate ab testing approach, and how the numbers look in a four-variant example.

What Is Bonferroni Correction?

Bonferroni correction divides your planned significance level by the number of tests you will treat as decisions. If you pre-registered three comparisons against a control, and you wanted a 5% chance of any false winner in that family, each comparison is judged at 0.05 / 3, or about 0.0167. The family-wise error rate, the chance of at least one false winner, stays at most 5% if the adjustment is applied as planned.

The idea is older than online testing. A clear statement is in the Wikipedia entry on Bonferroni correction. You can also use a slightly more powerful sibling, such as Holm, which tests the smallest p-value at 0.05 / 3, the next at 0.05 / 2, and so on. The spirit is the same: you pay for the extra looks in a harder threshold.

Bonferroni is conservative. It reduces false winners, and it also makes it harder to detect real, modest lifts. That is a good trade when a false ship is expensive. It is a poor trade when you are screening many rough ideas and can tolerate a few false leads, which is where false discovery rate methods fit.

A Worked A/B/C/D Example

A store ran a multiple variants ab test on a product page headline: control (A) plus three rewrites (B, C and D), a 25% split each, for 14 days. The primary metric was purchase conversion. The team pre-registered three comparisons: B vs A, C vs A and D vs A. They did not plan to compare B with D as a decision.

The p-values came back as:

  • D vs A: p = 0.008
  • B vs A: p = 0.031
  • C vs A: p = 0.22

With no adjustment, B and D both look like winners at 0.05. With Bonferroni, the threshold is 0.0167, so only D ships. B is interesting, not a result.

A Benjamini-Hochberg false discovery rate rule, at 5% FDR, ranks the p-values and compares them with 0.05 times rank / 3. That gives thresholds of 0.0167, 0.0333 and 0.05. Both D (0.008) and B (0.031) pass, and C does not. So FDR would keep two candidates, and Bonferroni would keep one. Neither method is “the” truth. They answer different questions: Bonferroni caps the chance of any false ship in the family; FDR caps the expected share of false ships among the ones you keep. For a short statement of FDR, see the Wikipedia entry on the false discovery rate.

If the team had also peeked at add-to-cart, revenue per visitor, bounce and four segment slices, they would have been making a dozen comparisons, not three. Bonferroni would have set a threshold near 0.004, and even D might have failed. The honest fix is not a harsher correction after the fact. It is fewer pre-registered decisions.

The same example, in one view:

  • Unadjusted 0.05: ship D (p = 0.008) and B (p = 0.031). C is out.
  • Bonferroni 0.0167: ship only D. B becomes a follow-up idea.
  • 5% FDR (Benjamini-Hochberg): ship D and B, still drop C.

That table is the whole argument for writing the rule down first. After you have the p-values, each rule is just a way to get the answer you already prefer.

Four variants is already a lot for a mid-size store, because each arm has to reach the sample you would have given a simple A/B. If you only have enough traffic for two strong groups, a four-way split will make every comparison noisy, and Bonferroni will then make the threshold stricter on top of that. In that case, run A versus B now, and save C for the next test, instead of splitting the audience four ways and hoping the correction will save the design.

When Multiple Comparisons A/B Testing Actually Starts

The problem starts when more than one number can trigger a ship. Typical cases:

  • Several variants against one control, as in the example.
  • Several primary-like metrics. “Conversion or revenue or add-to-cart, whichever looks better” is three tests.
  • Unplanned segments. Cutting the result by device, new versus returning, and country, then shipping the one slice that is green, is another family of tests. If the mix also shifts, you may have a separate issue, described in Simpson’s paradox in A/B testing.
  • Daily peeks. Looking every day and stopping at the first p-value below 0.05 is a sequence of tests. Bonferroni is a blunt tool for that problem. Sequential testing is the better one, as in the peeking problem in A/B testing.

A single pre-registered primary metric, on a single comparison, does not need Bonferroni. A p-value is already the tool for that job. See p-value in A/B testing.

If you are running concurrent tests on different pages, that is a different design problem, covered in running multiple A/B tests at the same time. You do not Bonferroni-adjust two unrelated tests just because they were live in the same week, unless you are treating the whole program as one family of claims.

How to Use Bonferroni Correction AB Testing Without Freezing the Roadmap

Write the family down before launch. “Three variants versus control, conversion only” is a family of three. “Conversion plus seven guardrails, each of which can veto a ship” is not eight primary tests. A guardrail that can only stop a ship, and cannot create a winner on its own, does not need the same adjustment as a second primary.

If you must compare many variants, consider a two-stage plan: a short screen with FDR or no adjustment, then a confirmatory test of the one or two survivors against control at a standard 5% level. That costs more time, and it is cleaner than shipping B on an unadjusted p = 0.031.

Do not apply Bonferroni after you see the numbers because someone in the review asked “but what about multiple testing?” If B is 0.031 and you only invent the correction then, you are still choosing the rule to get a preferred answer. Either the plan included the adjustment, or you treat B as a follow-up idea.

An A/A test is a useful check if you are not sure your stack is over-producing winners. If you split two identical experiences and still find “significant” metrics, the problem may be peeking, tracking or a wandering primary, not a lack of Bonferroni. See A/A test vs A/B test.

Read more: What Makes a Good A/B Test? Avoiding Common Mistakes

Test Fewer Things, Then Trust the Result

Run one primary comparison at a time on your store, with a planned sample and a pre-registered rule. Try CustomFit.ai free for 14 days.

Start Free Trial No credit card required

A practical default for most ecommerce teams is this: one primary metric, one or two variants against control, guardrails that can only veto, and no unplanned slices in the decision. Use Bonferroni or Holm when you truly need three or four variants in one test. Use FDR when you are screening a longer list and will confirm the survivors. Use neither as a way to rescue a messy report.

customfit.ai does not have a dedicated Bonferroni guide, which is why this article stays on the correction itself. For the experiment design around it, a step-by-step launch plan still matters more than a smaller p-value. Keep the family small, and you will rarely need the formula.

Test Fewer Things, Then Trust the Result

Launch with one primary metric and a planned comparison set. Try CustomFit.ai free for 14 days, no credit card required.

Try CustomFit.ai Free No credit card required

If a review meeting wants a single sentence, use this one: Bonferroni is a planned, stricter p-value, not a way to argue about a result you already have. In the example, that sentence is the difference between shipping B and parking B for a later confirmatory test. Teams that skip the sentence tend to keep the unadjusted rule when B looks good and reach for Bonferroni when it does not, which is not a correction at all.

Summary

The bonferroni correction ab testing teams apply is a simple cap on false winners: divide 0.05 by the number of planned decision tests. In the A/B/C/D example, unadjusted results would have shipped B and D (p = 0.031 and 0.008). Bonferroni, at 0.0167, ships only D. A false discovery rate ab testing rule at 5% FDR would have kept both B and D. Use Bonferroni when a single false ship in the family is costly, and use FDR when you are screening. Multiple comparisons ab testing starts when more than one number can create a winner, including a multiple variants ab test and a pile of unplanned metrics. What is Bonferroni correction, in one line: a harder threshold you agree to before you look.

FAQs

What is Bonferroni correction in A/B testing?

It is a pre-planned adjustment that divides your significance level by the number of comparisons you will treat as decisions. For three tests at a 5% family-wise level, each test is judged at about 0.0167. It reduces false winners and also makes modest real lifts harder to detect.

When do I need Bonferroni correction A/B testing?

Use it when several comparisons can each trigger a ship, such as three variants against a control, or two pre-registered primary metrics. You do not need it for a single primary comparison, and you should not apply it after the fact to get a preferred answer.

How does this relate to multiple comparisons in A/B testing?

Multiple comparisons is the broader problem: the more tests you treat as decisions, the more false winners you should expect at an unadjusted 0.05 level. Bonferroni is one fix. Fewer pre-registered decisions is a better fix when you can afford it.

What is the difference between Bonferroni and false discovery rate A/B testing?

Bonferroni caps the chance of any false winner in the family. FDR caps the expected share of false winners among the results you keep. FDR is usually less conservative, which is why it can keep a p = 0.031 result that Bonferroni would drop.

How should I handle a multiple variants A/B test?

Pre-register the comparisons (usually each variant versus control), state the adjustment, and do not add post-hoc fights between the winners. If you have many variants, screen first and run a confirmatory test of the survivor.

Do concurrent tests on different pages need Bonferroni?

Not usually, if each test has its own primary metric and you are not packaging them as one claim. Overlap and interaction are a design issue, not an automatic reason to divide 0.05 by the number of tests in the program that week.

Read more:

Leave a Comment

Your email address will not be published. Required fields are marked *