ArticleslgStudy

science

Hoeffding's inequality

Hoeffding's inequality is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hoeffding's inequality rather than just read about it. In short: In probability theory, Hoeffding's inequality provides an upper bound on the probability that the sum of bounded independent random variables deviates from its expected value by more than a certain amount. Hoeffding's inequality was proven by Wassily Hoeffding in 1963.

Key takeaways

  • Hoeffding's inequality belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hoeffding's inequality to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hoeffding's inequality from memory before moving on to harder problems.

Reference excerpt

In probability theory, Hoeffding's inequality provides an upper bound on the probability that the sum of bounded independent random variables deviates from its expected value by more than a certain amount. Hoeffding's inequality was proven by Wassily Hoeffding in 1963. Hoeffding's inequality is a special case of the Azuma–Hoeffding inequality and McDiarmid's inequality. It is similar to the Chernoff bound, but tends to be less sharp, in particular when the variance of the random variables is small. It is similar to, but incomparable with, one of Bernstein's inequalities.

Statement Let X1, ..., Xn be independent random variables such that ai≤Xi≤bi almost surely. Consider the sum of these random variables,

Sn=X1+⋯+Xn. Then Hoeffding's theorem states that, for all t > 0,

P⁡(Sn−E[Sn]≥t)≤exp⁡(−2t2∑i=1n(bi−ai)2)P⁡(|Sn−E[Sn]|≥t)≤2exp⁡(−2t2∑i=1n(bi−ai)2) Here E[Sn] is the expected value of Sn. Note that the inequalities also hold when the Xi have been obtained using sampling without replacement; in this case the random variables are not independent anymore. A proof of this statement can be found in Hoeffding's paper. For slightly better bounds in the case of sampling without replacement, see for instance the paper by Serfling (1974).

Generalization Let Y1,…,Yn be independent observations such that E⁡(Yi)=0 and ai≤Yi≤bi. Let ϵ>0. Then, for any t>0,P(∑i=1nYi≥ϵ)≤exp⁡(−tϵ+∑i=1nt2(bi−ai)2/8)

Special Case: Bernoulli RVs Suppose ai=0 and bi=1 for all i. This can occur when Xi are independent Bernoulli random variables, though they need not be identically distributed. Then we get the inequality

P⁡(Sn−E[Sn]≥t)≤exp⁡(−2t2/n)P⁡(|Sn−E[Sn]|≥t)≤2exp⁡(−2t2/n) or equivalently, P⁡((Sn−E[Sn])/n≥t)≤exp⁡(−2nt2)P⁡(|(Sn−E[Sn])/n|≥t)≤2exp⁡(−2nt2) for all t≥0. This is a version of the additive Chernoff bound which is more general, since it allows for random variables that take values between zero and one, but also weaker, since the Chernoff bound gives a better tail bound when the random variables have small variance.

General case of bounded from above random variables Hoeffding's inequality can be extended to the case of bounded from above random variables. Let X1, ..., Xn be independent random variables such that EXi=0 and Xi≤bi almost surely. Denote by

Ci2={EXi2,if EXi2≥bi2,14(bi+EXi2bi)2,otherwise. Hoeffding's inequality for bounded from above random variables states that for all t≥0,

P(|∑i=1nXi|≥t)≤2exp⁡(−t22∑i=1nCi2). In particular, if EXi2≥bi2 for all i, then for all t≥0,

P(|∑i=1nXi|≥t)≤2exp⁡(−t22∑i=1nEXi2).

General case of sub-Gaussian random variables The proof of Hoeffding's inequality can be generalized to any sub-Gaussian distribution. Recall that a random variable X is called sub-Gaussian, if

P(|X|≥t)≤2e−ct2, for some c>0. For any bounded variable X, P(|X|≥t)=0≤2e−ct2 for t>T for some sufficiently large T. Then 2e−cT2≤2e−ct2 for all t≤T so taking c=log⁡(2)/T2 yields

P(|X|≥t)≤1≤2e−cT2≤2e−ct2, for t≤T. So every bounded variable is sub-Gaussian. For a random variable X, the following norm is finite if and only if X is sub-Gaussian:

‖X‖ψ2:=inf⁡{c≥0:E(eX2/c2)≤2}. Then let X1, ..., Xn be independent sub-Gaussian random variables, the general version of the Hoeffding's inequality states that:

P(|∑i=1n(Xi−E[Xi])|≥t)≤2exp⁡(−ct2∑i=1n‖Xi‖ψ22), where c > 0 is an absolute constant. Equivalently, we can define sub-Gaussian distributions by variance proxy, defined as follows. If there exists some s2 such that E⁡[e(X−E⁡[X])t]≤es2t22 for all t, then s2 is called a variance proxy, and the smallest such s2 is called the optimal variance proxy, and denoted by ‖X‖vp2. In this form, Hoeffding's inequality statesP(|∑i=1n(Xi−E[Xi])|≥t)≤2exp⁡(−t22∑i=1n‖Xi‖vp2),

Proof We quote:

The proof of Hoeffding's inequality then follows similarly to concentration inequalities like Chernoff bounds. This proof easily generalizes to the case for sub-Gaussian distributions with variance proxy.

Usage

Confidence intervals Hoeffding's inequality can be used to derive confidence intervals. We consider a coin that shows heads with probability p and tails with probability 1 − p. We toss the coin n times, generating n samples X1,…,Xn (which are i.i.d Bernoulli random variables). The expected number of times the coin comes up heads is pn. Furthermore, the probability that the coin comes up heads at least k times can be exactly quantified by the following expression:

P⁡(H(n)≥k)=∑i=kn(ni)pi(1−p)n−i, where H(n) is the number of heads in n coin tosses. When k = (p + ε)n for some ε > 0, Hoeffding's inequality bounds this probability by a term that is exponentially small in ε2n:

P⁡(H(n)−pn>εn)≤exp⁡(−2ε2n). Since this bound holds on both sides of the mean, Hoeffding's inequality implies that the number of heads that we see is concentrated around its mean, with exponentially small tail.

P⁡(|H(n)−pn|>εn)≤2exp⁡(−2ε2n). Thinking of X‾=1nH(n) as the "observed" mean, this probability can be interpreted as the level of significance α (probability of making an error) for a confidence interval around p of size 2ɛ:

α=P⁡( X‾∉[p−ε,p+ε])≤2e−2ε2n Finding n for opposite inequality sign in the above, i.e. n that violates inequality but not equality above, gives us:

n≥log⁡(2/α)2ε2 Therefore, we require at least log⁡(2/α)2ε2 samples to acquire a (1−α)-confidence interval p±ε. Hence, the cost of acquiring the confidence interval is sublinear in terms of confidence level and quadratic in terms of precision. Note that there are more efficient methods of estimating a confidence interval.

See also Concentration inequality – a summary of tail-bounds on random variables. Hoeffding's lemma Bernstein inequalities (probability theory)

Notes

References

Worked examples

Example 1 — a first encounter with Hoeffding's inequality

Start with the simplest possible case. Write down what Hoeffding's inequality claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hoeffding's inequality before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hoeffding's inequality ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hoeffding's inequality

In research
Hoeffding's inequality appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hoeffding's inequality in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hoeffding's inequality is common in secondary-school and first-year university syllabi. It links to neighbouring topics Probabilistic inequalities, so understanding it makes those chapters shorter.
In everyday life
Look for Hoeffding's inequality outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Hoeffding's inequality” →

How to study Hoeffding's inequality in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hoeffding's inequality means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hoeffding's inequality out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hoeffding's inequality in simple terms?

In probability theory, Hoeffding's inequality provides an upper bound on the probability that the sum of bounded independent random variables deviates from its expected value by more than a certain amount. Hoeffding's inequality was proven by Wassily Hoeffding in 1963.

Why does Hoeffding's inequality matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hoeffding's inequality?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hoeffding's inequality.

Tags

  • Probabilistic inequalities

Keep exploring