Skip to content
Part IA Easter Term

The Union Bound

Statement

Boole’s inequality (Union Bound): For any events E1,E2,,EnE_1, E_2, \ldots, E_n:

P(i=1nEi)i=1nP(Ei)P\left(\bigcup_{i=1}^{n} E_i\right) \leq \sum_{i=1}^{n} P(E_i)

The probability of at least one event occurring is at most the sum of their individual probabilities.

For infinitely many events:

P(i=1Ei)i=1P(Ei)P\left(\bigcup_{i=1}^{\infty} E_i\right) \leq \sum_{i=1}^{\infty} P(E_i)

Proof

By inclusion-exclusion:

P(E1E2)=P(E1)+P(E2)P(E1E2)P(E1)+P(E2)P(E_1 \cup E_2) = P(E_1) + P(E_2) - P(E_1 \cap E_2) \leq P(E_1) + P(E_2)

since P(E1E2)0P(E_1 \cap E_2) \geq 0.

By induction: assume true for n1n-1 events. Then:

P(i=1nEi)=P(i=1n1Ei)+P(En)P(i=1n1EiEn)i=1n1P(Ei)+P(En)=i=1nP(Ei)P\left(\bigcup_{i=1}^{n} E_i\right) = P\left(\bigcup_{i=1}^{n-1} E_i\right) + P(E_n) - P\left(\bigcup_{i=1}^{n-1} E_i \cap E_n\right) \leq \sum_{i=1}^{n-1} P(E_i) + P(E_n) = \sum_{i=1}^{n} P(E_i)

When is Equality Achieved?

Equality holds when all EiE_i are mutually exclusive: when EiEj=E_i \cap E_j = \emptyset for all iji \neq j, the intersection terms vanish and the bound becomes exact.

Why the Union Bound Matters

The union bound provides a simple upper bound when:

  1. Exact probabilities are hard to compute
  2. We need to prove something is “small enough”
  3. Events may be dependent (union bound doesn’t require independence)

It is often used in algorithm analysis and error bounds.

Example: Hash Collisions

A hash table has mm buckets. We insert nn keys. Let EiE_i be the event that key ii collides with some earlier key.

The probability of at least one collision satisfies:

P(some collision)i=1nP(Ei)P(\text{some collision}) \leq \sum_{i=1}^{n} P(E_i)

If each key lands uniformly: P(Ei)i1mP(E_i) \leq \frac{i-1}{m}. Then:

P(some collision)i=1ni1m=n(n1)2mP(\text{some collision}) \leq \sum_{i=1}^{n} \frac{i-1}{m} = \frac{n(n-1)}{2m}

This is the birthday problem bound.

Example: Error Bounds

A system makes nn independent trials, each with error probability ϵ\epsilon. Let EiE_i = “error on trial ii”.

P(at least one error)nϵP(\text{at least one error}) \leq n \epsilon

If ϵ=1n2\epsilon = \frac{1}{n^2}, then P(error)1nP(\text{error}) \leq \frac{1}{n}.

This is useful in probabilistic analysis: if each step has small error, the total error is bounded.

Frechet Inequalities

Related bounds for intersections:

max{0,iP(Ei)(n1)}P(i=1nEi)miniP(Ei)\max\{0, \sum_i P(E_i) - (n-1)\} \leq P\left(\bigcap_{i=1}^{n} E_i\right) \leq \min_i P(E_i)

The upper bound follows from monotonicity: EiEj\bigcap E_i \subseteq E_j for each jj, so P(Ei)P(Ej)P(\bigcap E_i) \leq P(E_j).

Bonferroni Correction

The union bound motivates multiple testing corrections. If we run nn hypothesis tests, each at significance level α\alpha, the probability of at least one false positive is at most nαn\alpha.

To ensure overall error rate α\alpha, use threshold α/n\alpha/n for each test.

Comparing with Exact Calculation

ScenarioExactUnion Bound
Mutually exclusiveP(Ei)\sum P(E_i)P(Ei)\sum P(E_i) (tight)
Independent1(1P(Ei))1 - \prod(1-P(E_i))P(Ei)\sum P(E_i) (loose when P(Ei)P(E_i) not tiny)
General caseInclusion-exclusionP(Ei)\sum P(E_i)

The union bound is loosest when probabilities are large and events overlap significantly.

Summary

  • Union bound: P(Ei)P(Ei)P(\bigcup E_i) \leq \sum P(E_i)
  • Equality when: events are mutually exclusive
  • Useful for: simpler analysis, error bounds, algorithm correctness proofs
  • Limitation: can be very loose for large probabilities and dependent events