To count a union, add the parts, subtract the overlaps, add back the triple overlaps, and so on.
Often confused
The Inclusion-Exclusion Principle vs The Bonferroni Correction
These two are routinely mistaken for each other. Here is what separates them, and what each actually claims, field by field.
To control the family-wise error rate across m hypothesis tests, each individual test is judged significant only if its p-value is below alpha divided by m.
Carlo Emilio Bonferroni1936
Read the full law
| Attribute | The Inclusion-Exclusion Principle | The Bonferroni Correction |
|---|---|---|
| Field | Mathematics & proof | Statistics & probability |
| Reliability | Empirical | Empirical |
| Coined | — | 1936 |
| Named after | — | Carlo Emilio Bonferroni |
| Type | Established | Established |
What they have in common
- They come from different fields: Mathematics & proof and Statistics & probability.
- Both are rated Empirical, so they stand on the same kind of evidence.
Side by side
What it claims
The Inclusion-Exclusion Principle
To count a union, add the parts, subtract the overlaps, add back the triple overlaps, and so on.
The Bonferroni Correction
To control the family-wise error rate across m hypothesis tests, each individual test is judged significant only if its p-value is below alpha divided by m.
In plain English
The Inclusion-Exclusion PrincipleThe inclusion-exclusion principle is a counting formula for the size of a union of sets. For two sets it says the size of their union is the sum of their sizes minus the size of their overlap; for three, one adds the three individual sizes, subtracts the three pairwise overlaps, and adds back the triple overlap. In general one adds the sizes of the single sets, subtracts all pairwise intersections, adds all triple intersections, and continues with strictly alternating signs to the full intersection. The rule corrects the double-counting that arises from naively summing sizes, and it is a fundamental tool of enumerative combinatorics and probability, turning a tangled overlapping count into an exact alternating sum.
The Bonferroni CorrectionWhen many hypotheses are tested at once, using the ordinary threshold on each inflates the chance of at least one false positive across the whole family of tests. The Bonferroni correction counteracts this by shrinking the per-test threshold in proportion to the number of tests, keeping the overall false-positive rate at the desired level.
How it works
The Inclusion-Exclusion PrincipleThe alternation is bookkeeping for over- and under-counting. Adding the sizes of the sets counts each element once for every set it belongs to, so elements in overlaps are counted too many times. Subtracting the pairwise intersections removes that excess, but it over-corrects for elements lying in three sets, which must then be added back; the correction for four-way elements over-shoots again, and so on, each layer of intersections flipping the sign. The upshot is that every element, whatever overlaps it lies in, is counted exactly once overall, which is why the signs must strictly alternate through the full intersection. The same principle holds for probabilities of unions of events, giving an exact expansion whose truncations yield the Bonferroni bounds.
The Bonferroni CorrectionIt rests on Bonferroni’s inequality, which bounds the probability of a union of events by the sum of their individual probabilities; applied to m null hypotheses each tested at level alpha/m, the probability of any false rejection is at most m × (alpha/m) = alpha, so testing each at alpha/m controls the family-wise error rate at alpha.
Why it matters
The Inclusion-Exclusion PrincipleThe inclusion-exclusion principle is a fundamental tool of combinatorics and probability, the standard way to count or measure a union when the parts overlap. It counts derangements and surjections, computes Euler's totient function, underlies the sieve methods of number theory from Eratosthenes to Brun, and in probability gives exact expansions whose truncations, the Bonferroni inequalities, provide practical bounds. Its idea, correcting a sum by alternately removing and restoring overlaps, is so general that it recurs across mathematics wherever overlapping cases must be counted without double-counting, making it one of the most broadly useful identities in enumeration.
The Bonferroni CorrectionIt is one of the most widely used tools for guarding against false discoveries in fields that run many simultaneous tests, such as genomics, neuroimaging, and clinical trials with multiple endpoints.
Where it breaks down
The Inclusion-Exclusion PrincipleThe formula is exact, not an approximation, but its full form has a term for every subset of the sets, so for many sets the number of intersection terms grows explosively and the computation becomes impractical, which is why the truncated Bonferroni bounds are often used instead. It requires knowing the sizes of all the intersections, which may themselves be hard to determine. The signs must strictly alternate, and dropping a term or misplacing a sign is the usual error. It applies to finite sets and to probabilities of events, and its usefulness depends on the intersections being simpler to count than the union directly.
The Bonferroni CorrectionThe correction is conservative, especially as the number of tests grows or when tests are correlated rather than independent, which increases the risk of Type II errors and reduces power. Less conservative alternatives, such as Holm–Bonferroni or the Šidák correction, achieve the same control with more power.
Commonly misread as
The Inclusion-Exclusion PrincipleThe principle is an exact equality, not an estimate; truncating it gives the Bonferroni inequalities, but the full formula is precise. The signs strictly alternate all the way to the full intersection, so it is not merely add-the-parts-subtract-the-overlaps and stop, which would be wrong for three or more sets. And no single person originated it: early uses trace to de Moivre, with independent nineteenth-century formulations by da Silva, Sylvester, and Poincare, so it is a shared discovery rather than one author's theorem.
The Bonferroni CorrectionIt is sometimes wrongly treated as controlling the false discovery rate rather than the family-wise error rate: different criteria with different, often much less conservative, procedures like Benjamini–Hochberg.
A worked example
The Inclusion-Exclusion PrincipleCounting permutations with no element in its original place uses inclusion-exclusion; the probability a random shuffle fixes nothing approaches one over e, about zero point three seven, the hat-check problem.
The Bonferroni CorrectionIf a trial tests 20 hypotheses with a desired overall level of 0.05, the Bonferroni-corrected threshold per test becomes 0.05/20 = 0.0025.
Where it came from
The Inclusion-Exclusion PrincipleUsed early by Abraham de Moivre in 1718 and given explicit general formulations independently in the nineteenth century by Daniel da Silva in 1854, J.J. Sylvester in 1883, and, in probabilistic form, Henri Poincare in 1896.
The Bonferroni CorrectionBased on inequalities published by Italian mathematician Carlo Emilio Bonferroni around 1935–1936; formalised for hypothesis testing and confidence intervals by Olive Jean Dunn in 1961, hence the alternate name Bonferroni–Dunn correction.
Sources
The Inclusion-Exclusion Principle
- Inclusion-exclusion principle, Wikipedia. — the two-set and three-set formulas, the alternating general form, the derangement and totient applications, and the Bonferroni inequalities.
- Inclusion-Exclusion Principle, Wolfram MathWorld. — the union-counting formula, the alternating signs, and the da Silva and Sylvester history.
Questions about this pair
What is the difference between The Inclusion-Exclusion Principle and The Bonferroni Correction?
The Inclusion-Exclusion Principle says “To count a union, add the parts, subtract the overlaps, add back the triple overlaps, and so on.”; The Bonferroni Correction says “To control the family-wise error rate across m hypothesis tests, each individual test is judged significant only if its p-value is below alpha divided by m.”. They are near-twins and easy to confuse; the field-by-field comparison above sets out what each actually claims.
Are The Inclusion-Exclusion Principle and The Bonferroni Correction the same thing?
No, though they are routinely mistaken for each other. They are recorded here as near-twins precisely because the confusion is common.
Which one should I apply?
Whichever one's conditions your case meets. This page will not guess which that is. The Inclusion-Exclusion Principle states where it stops working, and so does The Bonferroni Correction; both passages are above, in the entries' own words. Reading the two limits side by side answers this faster than a recommendation from a site that cannot see your situation.