01 / 22
\(\cup\)

Union Bounds &
Concentration

Bounding the probability of unions and understanding how random variables concentrate around their expectations: the foundational tools of modern probability.

Statistics Probability Theory

What Is the Union Bound?

The union bound (also called Boole's inequality) provides a simple upper bound on the probability that at least one of several events occurs. For any countable collection of events \(A_1, A_2, \ldots, A_n\):

This inequality is always valid: no independence or distributional assumptions required. It works because overlapping probabilities are counted multiple times on the right side, so the sum can only overestimate the true union probability.

Visual Intuition: Overlapping Events

Sample Space \(\Omega\) \(A_1\) \(A_2\) Overlap counted twice \(P(A_1) + P(A_2) \geq P(A_1 \cup A_2)\)

Why Union Bounds Matter

Algorithm Analysis
Bound the probability that any subroutine fails when a randomized algorithm has many failure modes.
Multiple Testing
Control the family-wise error rate when performing many simultaneous hypothesis tests (Bonferroni correction).
Machine Learning
Derive generalization bounds by bounding the probability of large estimation error over all hypotheses in a class.

What Is Concentration?

A random variable \(X\) is said to concentrate around its mean \(\mu = E[X]\) if the probability that \(X\) deviates far from \(\mu\) is small. Formally, we seek bounds of the form:

Concentration inequalities make this precise. They tell us how quickly the tail probability decays as the deviation \(t\) grows: polynomially (Markov, Chebyshev), exponentially (Chernoff, Hoeffding), or sub-Gaussian.

Markov's Inequality

The simplest concentration tool. For any non-negative random variable \(X\) and any \(a > 0\):

1
Requires only: \(X \geq 0\) and finite \(E[X]\). No variance needed.
2
Proof idea: \(E[X] = E[X \cdot \mathbf{1}_{X \geq a}] + E[X \cdot \mathbf{1}_{X < a}] \geq a \cdot P(X \geq a)\).
3
Weakness: only a \(1/t\) decay rate: very loose for light-tailed distributions.

Chebyshev's Inequality

By applying Markov's inequality to \((X - \mu)^2\), we get a bound that uses the variance:

This gives a \(1/t^2\) decay: much better than Markov for large deviations. For the sample mean \(\bar{X}_n\) of \(n\) i.i.d. copies with variance \(\sigma^2\):

This shrinks as \(n\) grows: the sample mean concentrates around the population mean.

Markov vs Chebyshev

Markov Chebyshev
Statement \(P(X \geq a) \leq \frac{E[X]}{a}\) \(P(|X-\mu| \geq t) \leq \frac{\sigma^2}{t^2}\)
Requirements \(X \geq 0\), finite mean Finite variance
Tail decay \(O(1/t)\) \(O(1/t^2)\)
Two-sided? One-sided only Two-sided
Tightness Loose in general Tight for heavy-tailed

The Chernoff Method

For exponential tail decay, apply Markov to \(e^{sX}\) for \(s > 0\):

1
Exponentiate: Convert to \(P(e^{sX} \geq e^{st})\) for any \(s > 0\).
2
Apply Markov: Since \(e^{sX} \geq 0\), get \(\leq E[e^{sX}] / e^{st}\).
3
Optimize over \(s\): Minimize \(e^{-st} \cdot M_X(s)\) where \(M_X(s) = E[e^{sX}]\) is the MGF.

The Concentration Hierarchy

Markov \(O(1/t)\) decay Chebyshev \(O(1/t^2)\) decay Chernoff / Hoeffding \(O(e^{-ct^2})\) decay Sub-Gaussian Concentration Weakest (fewest assumptions) Strongest (tightest bounds)

How to Apply the Union Bound

1
Identify the bad events: List all events \(A_1, \ldots, A_n\) that could cause failure.
2
Bound each individually: Use concentration inequalities to bound each \(P(A_i)\).
3
Sum them up: \(P(\text{any bad event}) \leq \sum_i P(A_i)\).
4
Set your budget: If you want \(P(\text{failure}) \leq \delta\), ensure each \(P(A_i) \leq \delta/n\).

Example 1: Coin Flips

Flip a fair coin \(n = 100\) times. Let \(X\) = number of heads. Bound \(P(X \geq 70)\).

1
Markov: \(E[X] = 50\), so \(P(X \geq 70) \leq \frac{50}{70} = \frac{5}{7} \approx\) 0.714. Very loose!
2
Chebyshev: \(\operatorname{Var}(X) = 25\), so \(P(|X - 50| \geq 20) \leq \frac{25}{400} =\) 0.0625. Better!
3
Hoeffding: \(P(X - 50 \geq 20) \leq e^{-2(20)^2/100} = e^{-8} \approx\) 0.000335. Exponentially tight!

Example 2: Union Bound in Action

A server runs \(n = 1000\) independent jobs. Each job fails with probability \(p = 0.001\). What is the probability that at least one job fails?

1
Define events: Let \(A_i\) = "job \(i\) fails." Each has \(P(A_i) = 0.001\).
2
Union bound: \(P\!\left(\bigcup_{i=1}^{1000} A_i\right) \leq \sum_{i=1}^{1000} 0.001 =\) 1.0
3
Exact (independence): \(1 - (1-0.001)^{1000} = 1 - 0.999^{1000} \approx\) 0.632

Example 3: Combining Both Tools

Estimate \(k = 20\) population means simultaneously. Each estimate \(\bar{X}_i\) is the mean of \(n\) i.i.d. samples with variance \(\sigma^2\). We want \(P(\text{any estimate off by } \geq \epsilon) \leq \delta\).

1
Concentrate each: By Chebyshev, \(P(|\bar{X}_i - \mu_i| \geq \epsilon) \leq \frac{\sigma^2}{n\epsilon^2}\).
2
Union bound: \(P(\text{any off by } \geq \epsilon) \leq k \cdot \frac{\sigma^2}{n\epsilon^2}\).
3
Solve for \(n\): Set \(\frac{k\sigma^2}{n\epsilon^2} \leq \delta\), giving \(n \geq \frac{k\sigma^2}{\delta\epsilon^2} = \frac{20\sigma^2}{\delta\epsilon^2}\).

Tail Decay: Visual Comparison

Deviation \(t\) Tail Bound 0 1 2 3 4 0 1 \(1/t\) \(1/t^2\) \(e^{-t^2}\) Markov Chebyshev Hoeffding

Common Mistakes

✕ Forgetting Non-Negativity
Markov's inequality requires \(X \geq 0\). Applying it to a variable that can be negative gives a meaningless bound. Apply it to \(|X|\) or \((X-\mu)^2\) instead.
✕ Union Bound (> 1)
If \(\sum P(A_i) > 1\), the bound is trivially true but useless. This signals you need tighter per-event bounds or fewer events.
✕ Assuming Independence
The union bound works without independence. Don't confuse it with the exact formula \(P(A \cup B) = P(A) + P(B) - P(A \cap B)\), which requires knowing the intersection.

Summary Comparison

Tool Bound Assumptions Tail Rate
Union Bound \(\sum P(A_i)\) None N/A
Markov \(E[X]/a\) \(X \geq 0\) \(1/t\)
Chebyshev \(\sigma^2/t^2\) Finite variance \(1/t^2\)
Chernoff \(\inf_s e^{-st}M_X(s)\) Finite MGF \(e^{-ct^2}\)
Hoeffding \(e^{-2n\epsilon^2/(b-a)^2}\) Bounded \([a,b]\) \(e^{-cn\epsilon^2}\)

Question 1 of 5

Let \(X\) be a non-negative random variable with \(E[X] = 4\). By Markov's inequality, what is the best upper bound on \(P(X \geq 20)\)?

Question 2 of 5

A random variable \(X\) has mean \(\mu = 10\) and variance \(\sigma^2 = 9\). Using Chebyshev's inequality, what is the upper bound on \(P(|X - 10| \geq 6)\)?

Question 3 of 5

You run \(n = 50\) independent experiments, each with failure probability \(0.01\). By the union bound, what is the upper bound on the probability that at least one experiment fails?

Question 4 of 5

Which of the following is not a requirement for applying Markov's inequality?

Question 5 of 5

You want to simultaneously bound the deviations of \(k = 100\) sample means, each from \(n\) i.i.d. samples with variance \(\sigma^2\), to ensure the overall failure probability is at most \(\delta = 0.05\). Using Chebyshev + union bound, what sample size \(n\) do you need per estimate (for deviation \(\leq \epsilon\))?