Concentration Inequalities
The Chernoff Bound: Exponential Tail Estimates
Flip a fair coin 10,000 times. The number of heads will be within ±200 of 5,000 with overwhelming probability — but how overwhelming? Chebyshev's inequality promises a paltry 1/16 chance of straying that far; the Chernoff bound sharpens this to roughly 3×10⁻⁴. The trick is that instead of controlling the second moment, you control the moment generating function E[eλX], and the exponential eats the tail.
Precisely: for a random variable X and any λ > 0, ℙ(X ≥ a) ≤ e−λa E[eλX]. Optimizing over λ gives an exponentially decaying bound on the tail. For a sum of independent bounded variables the moment generating function factorizes, yielding tail probabilities that shrink like e−ct²/n — the quantitative backbone of concentration of measure.
- FieldProbability theory, concentration of measure
- Named afterHerman Chernoff (1952); technique due to Sergei Bernstein (1920s)
- Key hypothesisExistence of the MGF E[e^{λX}] near 0; independence for the sum version
- Core statementℙ(X ≥ a) ≤ min_{λ>0} e^{−λa} E[e^{λX}]
- Proof techniqueMarkov's inequality applied to e^{λX}, then optimize over λ
- Generalizes toHoeffding, Bernstein, Azuma, matrix Chernoff, and Bennett inequalities
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
The precise statement
The Chernoff bound in its most general form is a one-line consequence of Markov's inequality. Let X be a real random variable whose moment generating function M(λ) = E[eλX] is finite for λ in some interval containing 0. Then for every a ∈ ℝ and every λ > 0,
- ℙ(X ≥ a) ≤ e−λa E[eλX].
Since this holds for all λ > 0, we optimize: ℙ(X ≥ a) ≤ infλ>0 e−λa M(λ). Writing ψ(λ) = log M(λ) for the cumulant generating function, the exponent is the Legendre–Fenchel transform ψ*(a) = supλ>0 (λa − ψ(λ)), so ℙ(X ≥ a) ≤ e−ψ*(a).
The power appears when X = ∑ᵢ Xᵢ is a sum of independent variables: then M(λ) = ∏ᵢ Mᵢ(λ), the MGF factorizes, and the exponent grows linearly in the number of summands. This is what converts a per-variable bound into an exponentially small tail for the whole sum.
The intuition: why exponentials beat moments
Chebyshev's inequality uses one number — the variance — to control the tail, and a single moment can only give polynomial decay 1/t². The moment generating function E[eλX] instead packages all the moments at once, since eλX = ∑k λkXk/k!. Bounding the tail with this function therefore uses infinitely much information about the distribution.
Geometrically, the map x ↦ eλx is convex and grows explosively. When you push the tail event {X ≥ a} through it, the region beyond a gets weighted by an enormous factor eλa, so even a tiny probability there makes a visible contribution to E[eλX]. Turning this around, if E[eλX] is finite, the tail probability must be exponentially small — otherwise the expectation would blow up.
- The free parameter λ is a zoom knob: small λ probes the bulk, large λ probes the far tail. Optimizing over λ tunes the exponential weighting to exactly the deviation a you care about.
The key idea of the proof
The entire mechanism is: exponentiate, then apply Markov. For λ > 0 the event {X ≥ a} is identical to {eλX ≥ eλa}, because x ↦ eλx is strictly increasing. Now eλX is a nonnegative random variable, so Markov's inequality ℙ(Y ≥ c) ≤ E[Y]/c applies:
- ℙ(X ≥ a) = ℙ(eλX ≥ eλa) ≤ E[eλX] / eλa = e−λa M(λ).
That is the whole bound for a fixed λ. Two refinements complete it. First, optimize over λ: because the inequality holds for every λ > 0, take the infimum. Second, for a sum of independent X₁,…,Xₙ, independence gives E[eλ∑Xᵢ] = ∏ᵢ E[eλXᵢ], so the log-bound is additive. The cleverness is not any single step but the choice of the exponential test function eλx, whose multiplicativity mates perfectly with independence — the same idea underlies large-deviations theory and Cramér's theorem.
Worked example: fair coin flips
Let X = ∑i=1n Xᵢ where the Xᵢ ∈ {0,1} are independent fair coin flips, so μ = E[X] = n/2. Each flip has MGF E[eλXᵢ] = ½(1 + eλ). We bound the upper tail ℙ(X ≥ (1+δ)μ). A standard specialization gives the clean multiplicative Chernoff bound:
- ℙ(X ≥ (1+δ)μ) ≤ [ eδ / (1+δ)(1+δ) ]μ ≤ e−μδ²/3 for 0 < δ ≤ 1.
Take n = 10,000, so μ = 5,000, and ask for ℙ(X ≥ 5,200), i.e. δ = 0.04. Chebyshev with σ² = n/4 = 2,500 gives only ℙ(X ≥ 5,200) ≤ 2,500/200² = 1/16 ≈ 0.0625. Chernoff gives e−5000·(0.04)²/3 = e−8/3 ≈ 0.069 from the crude bound, and the exact optimized exponent uses n·D(0.52‖0.5) with the binary relative entropy D, giving ℙ(X ≥ 5,200) ≤ e−n·D(0.52‖0.5) = e−10000·0.00080 ≈ e−8.00 ≈ 3.3×10−4. The exponential form is what turns a hopeless polynomial estimate into a decisive one.
Why the hypotheses matter
The MGF must exist near 0. The bound is only useful where E[eλX] < ∞ for some λ > 0. For a heavy-tailed distribution — say a Cauchy variable, or a Pareto with ℙ(X > x) ∼ x−α — E[eλX] = ∞ for every λ > 0, and the Chernoff method gives the vacuous bound ℙ(X ≥ a) ≤ ∞. Such tails genuinely decay only polynomially; no exponential estimate is possible, and Chebyshev is the best moment tool available.
- Independence is essential for the sum version: without it the MGF need not factorize. For dependent sequences you replace it with a martingale hypothesis, yielding Azuma–Hoeffding via the same exponential trick.
- Boundedness or a variance proxy is what pins down the rate: Hoeffding assumes aᵢ ≤ Xᵢ ≤ bᵢ (sub-Gaussian, e−ct²); Bernstein and Bennett use the variance to get a sharper sub-exponential regime.
These relatives — Hoeffding (1963), Bernstein (1920s), Azuma (1967) — are all Chernoff's method with a distribution-specific MGF estimate plugged in.
Applications and significance
The Chernoff bound is the workhorse of the probabilistic method and of algorithm analysis. Because failure probabilities decay exponentially, a handful of extra repetitions crushes error to negligible levels — this is the engine behind:
- Randomized algorithms: amplifying a Monte Carlo algorithm's success probability, and load-balancing arguments (balls into bins, hashing) where you show no bin is overloaded except with probability n−c.
- Learning theory: generalization and sample-complexity bounds, where you need the empirical average over m samples to concentrate around the true risk — the exponential rate yields the O((1/ε²)log(1/δ)) sample sizes in PAC learning.
- Random matrices and statistics: the matrix Chernoff bound (Ahlswede–Winter, Tropp) controls the spectrum of sums of independent random matrices; the union bound plus Chernoff underlies compressed sensing and dimension reduction (Johnson–Lindenstrauss).
Conceptually it is the finite-sample, quantitative counterpart of the law of large numbers and the entryway to Cramér's large-deviations principle, where the optimized exponent ψ*(a) becomes the exact rate function.
| Inequality | Hypothesis needed | Tail bound (order) | Decay in t |
|---|---|---|---|
| Markov | X ≥ 0, finite mean | μ / a for ℙ(X ≥ a) | 1/t (polynomial) |
| Chebyshev | Finite variance σ² | σ² / t² | 1/t² (polynomial) |
| Chernoff (generic) | MGF E[e^{λX}] finite near 0 | min_{λ>0} e^{−λa}E[e^{λX}] | exponential (rate set by MGF) |
| Hoeffding | Independent, aᵢ ≤ Xᵢ ≤ bᵢ | exp(−2t² / ∑(bᵢ−aᵢ)²) | e^{−ct²} (sub-Gaussian) |
| Bernstein | Independent, |Xᵢ| ≤ M, variance v | exp(−t² / (2v + 2Mt/3)) | e^{−ct²} then e^{−ct} (sub-exponential) |
Frequently asked questions
Why is the moment generating function needed, and what happens if it doesn't exist?
The whole method rests on E[e^{λX}] being finite for some λ > 0; that finiteness is precisely what forces the tail to decay exponentially. For heavy-tailed variables (Cauchy, or Pareto with polynomial tails) the MGF is +∞ for every λ > 0, so the Chernoff bound is vacuous. Those distributions really do have only polynomial tail decay, and Chebyshev's inequality is the best moment-based tool available.
Is Chernoff's bound actually a single inequality or a family?
The generic Chernoff bound is the single line ℙ(X ≥ a) ≤ inf_{λ>0} e^{−λa}E[e^{λX}], the 'Chernoff method.' What people usually call 'the Chernoff bound' is the specialization to sums of independent Bernoulli variables, giving the multiplicative form ℙ(X ≥ (1+δ)μ) ≤ [e^δ/(1+δ)^{1+δ}]^μ. Hoeffding, Bernstein, and Bennett are further specializations obtained by plugging distribution-specific MGF estimates into the same generic bound.
How is it stronger than Chebyshev, and when should I still use Chebyshev?
Chebyshev uses only the variance and gives polynomial decay σ²/t², while Chernoff uses the full MGF and gives exponential decay e^{−ct²/n} for sums of bounded independent variables — vastly tighter in the tail. Use Chebyshev when you only have a second moment, when variables are heavy-tailed so no MGF exists, or when you want a bound that needs no independence or boundedness assumptions.
Why do we optimize over λ, and how do we choose it?
Each fixed λ > 0 gives a valid bound e^{−λa}E[e^{λX}], but different λ are tight for different deviation levels a: small λ is good near the mean, large λ probes the far tail. Optimizing means minimizing the exponent, equivalently computing the Legendre transform ψ*(a) = sup_{λ>0}(λa − ψ(λ)) of the cumulant generating function ψ = log M. The optimal λ solves ψ'(λ) = a, matching the tilt to the target deviation.
Does independence really matter, or can it be relaxed?
Independence is what makes the MGF of a sum factorize, E[e^{λ∑Xᵢ}] = ∏E[e^{λXᵢ}], which is the crux of the sum version. It can be relaxed to a martingale-difference structure: if the partial sums form a martingale with bounded increments, the same exponentiate-then-Markov argument gives the Azuma–Hoeffding inequality. Fully arbitrary dependence, however, can destroy concentration entirely.
What is the connection to large-deviations theory and Cramér's theorem?
The optimized Chernoff exponent ψ*(a) = sup_{λ>0}(λa − ψ(λ)) is exactly the rate function in Cramér's theorem. For i.i.d. sums, Cramér's theorem states that (1/n)log ℙ(Sₙ/n ≥ a) → −ψ*(a), so the Chernoff bound is not just an upper bound — it captures the true exponential rate of decay. Chernoff's inequality is thus the non-asymptotic upper half of the large-deviations principle.