Skip to main content
KetQat

Appearance

Theorem · introductory

Hoeffding's inequality

A sum of independent bounded random variables deviates from its mean by t with probability at most 2 exp(-2t^2 / sum of squared ranges). It gives the number of measurement shots needed to estimate a bounded expectation value to given accuracy and confidence.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let X1,…,XnX_1, \dots, X_n be independent random variables with ai≤Xi≤bia_i \le X_i \le b_i almost surely, and let S=∑i=1nXiS = \sum_{i=1}^{n} X_i. Then for every t>0t > 0

Pr⁡[S−ES≥t]  ≤  exp⁡ ⁣(−2t2∑i=1n(bi−ai)2),\Pr\big[S - \mathbb{E}S \ge t\big] \;\le\; \exp\!\Big( -\frac{2t^2}{\sum_{i=1}^{n} (b_i - a_i)^2} \Big),

the same bound holds for Pr⁡[S−ES≤−t]\Pr[S - \mathbb{E}S \le -t], and so Pr⁡[∣S−ES∣≥t]\Pr[\abs{S - \mathbb{E}S} \ge t] is at most twice the right-hand side.

For the empirical mean of nn i.i.d. samples in [a,b][a, b] this reads Pr⁡[∣Xˉ−μ∣≥ϵ]≤2exp⁡ ⁣(−2nϵ2/(b−a)2)\Pr[\abs{\bar X - \mu} \ge \epsilon] \le 2\exp\!\big(-2n\epsilon^2/(b - a)^2\big), so

n  ≥  (b−a)2ln⁡(2/η)2ϵ2n \;\ge\; \frac{(b - a)^2 \ln(2/\eta)}{2\epsilon^2}

samples give accuracy ϵ\epsilon with probability at least 1−η1 - \eta. This is Theorem 2 of Hoeffding. The bound charges the worst-case variance (b−a)2/4(b - a)^2/4; when the actual variance is much smaller, as for rare events, the relative-entropy Chernoff bound is much sharper.

Holds when

  • The variables are independent; correlations can invalidate the bound.
  • Each variable takes values in a known bounded interval [a_i, b_i] almost surely.

Proof

Proof of Hoeffding's inequalityMachine-checked

Hoeffding's lemma. If EY=0\mathbb{E}Y = 0 and a≤Y≤ba \le Y \le b, then E esY≤es2(b−a)2/8\mathbb{E}\, e^{sY} \le e^{s^2 (b - a)^2 / 8} for all s∈Rs \in \R.

If a=ba = b then Y=0Y = 0 and there is nothing to prove, so let a<ba < b; then a≤0≤ba \le 0 \le b because EY=0\mathbb{E}Y = 0. By convexity of y↦esyy \mapsto e^{sy}, for y∈[a,b]y \in [a, b],

esy≤b−yb−a esa+y−ab−a esb.e^{sy} \le \frac{b - y}{b - a}\, e^{sa} + \frac{y - a}{b - a}\, e^{sb} .

Taking expectations and using EY=0\mathbb{E}Y = 0, E esY≤bb−aesa−ab−aesb\mathbb{E}\, e^{sY} \le \frac{b}{b - a} e^{sa} - \frac{a}{b - a} e^{sb}. Put θ=−a/(b−a)∈[0,1]\theta = -a/(b - a) \in [0, 1] and h=s(b−a)h = s(b - a); then sa=−θhsa = -\theta h and the right side equals eL(h)e^{L(h)} with

L(h)=−θh+ln⁡(1−θ+θeh).L(h) = -\theta h + \ln\big(1 - \theta + \theta e^{h}\big) .

Now L(0)=0L(0) = 0, L′(h)=−θ+θeh1−θ+θehL'(h) = -\theta + \frac{\theta e^h}{1 - \theta + \theta e^h} so L′(0)=0L'(0) = 0, and L′′(h)=u(1−u)L''(h) = u(1 - u) with u=θeh1−θ+θeh∈[0,1]u = \frac{\theta e^h}{1 - \theta + \theta e^h} \in [0, 1], so L′′(h)≤1/4L''(h) \le 1/4. By Taylor's theorem with remainder, L(h)≤h2/8=s2(b−a)2/8L(h) \le h^2/8 = s^2 (b - a)^2 / 8.

The inequality. Let Yi=Xi−EXiY_i = X_i - \mathbb{E}X_i, which is centred and takes values in an interval of length bi−aib_i - a_i. For s>0s > 0, by Markov's inequality applied to es(S−ES)e^{s(S - \mathbb{E}S)} and independence,

Pr⁡[S−ES≥t]≤e−st E es∑iYi=e−st∏iE esYi≤exp⁡ ⁣(−st+s28∑i(bi−ai)2).\Pr[S - \mathbb{E}S \ge t] \le e^{-st}\, \mathbb{E}\, e^{s \sum_i Y_i} = e^{-st} \prod_{i} \mathbb{E}\, e^{s Y_i} \le \exp\!\Big( -st + \frac{s^2}{8} \sum_i (b_i - a_i)^2 \Big).

The exponent is minimised at s=4t/∑i(bi−ai)2s = 4t / \sum_i (b_i - a_i)^2, where it equals −2t2/∑i(bi−ai)2-2t^2 / \sum_i (b_i - a_i)^2. The lower tail follows by applying this to −Xi-X_i, and the two-sided bound by the union bound. This is the argument of Hoeffding.

Mentions
Part of
Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Wassily Hoeffding (1963). Probability Inequalities for Sums of Bounded Random Variables. Journal of the American Statistical Association 58, 13-30. doi:10.1080/01621459.1963.10500830
  2. Michael Mitzenmacher, Eli Upfal (2005). Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press. doi:10.1017/CBO9780511813603

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Inequality, two-sided form, empirical-mean form and the sample-size bound n >= (b-a)^2 ln(2/eta)/(2 eps^2) re-derived (Hoeffding lemma plus exponential Markov); compared with Watrous (2018) Theorem 1.16 (i.i.d. [0,1] case) and Levin and Peres 2nd ed. Theorem A.10 (|X_i| <= B_i form), both open; numerically checked against exact binomial tails. Hoeffding's 1963 paper is behind JSTOR and was not read; the 'Theorem 2' numbering is corroborated by Bentkus (arXiv math/0410159), which refers to the bounded-variables bound as Hoeffding's Theorem 2. Crossref metadata matches the reference entry.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision e4eedeb65d055487. Source file knowledge/records/theorem/hoeffding-inequality.md in the content repository (readable there once it is public).