Why Bounded Averages Concentrate
When observations are independent and restricted to a known finite interval, their average cannot stray far from its expectation very often. Hoeffding’s inequality quantifies this statement using only the interval width and the sample size. It does not require a variance calculation or a specific distributional shape.
The bound is useful precisely because it needs little information about the distribution. Its limitation is the same: it uses the full range, even when most of the probability is concentrated in a much smaller part of that range. The derivation begins with a bound on exponential moments, then applies the Chernoff method to the sum.
If \(a\leq X_i\leq b\) almost surely, then the range width is \(c=b-a\). When \(a<b\), the key tail exponent is proportional to \(n t^2/c^2\), where \(t\) is the deviation of the average from its mean. Thus, increasing the sample size strengthens the bound, while increasing the permitted range weakens it.
The Exponential-Moment Bound
The central step is a bound on the moment generating function of a centered bounded variable. A variable is centered by subtracting its expectation, so its expectation becomes zero. The following result shows that its exponential moment is controlled by the width of its interval.
Proof. If \(a=b\), then \(Z=0\) almost surely and the inequality holds with equality. Suppose \(a<b\), and put \(c=b-a\). Convexity of the exponential function gives, for every \(x\in[a,b]\),
Taking expectations and using \(E[Z]=0\), set \(p=-a/c\). Since \(a\leq E[Z]=0\leq b\), we have \(0\leq p\leq1\), and the preceding inequality yields
It remains to bound the logarithm of the right-hand side. Define
This is the log moment generating function of a variable taking the values \(-p\) and \(1-p\), with probabilities \(1-p\) and \(p\). Direct differentiation gives \(g(0)=0\) and \(g'(0)=0\). For any \(u\), the second derivative is the variance of these two values under probabilities proportional to their original probabilities times their exponential factors. If the tilted probability of \(1-p\) is \(q\), that variance is \(q(1-q)\leq1/4\). Therefore \(g''(u)\leq1/4\). Taylor’s formula with integral remainder, valid for positive or negative \(u\), now gives
Combining this with \(u=\lambda c\) proves the claimed bound. \(\square\)
The lemma applies to \(X_i-\mu\): this centered variable has expectation zero and lies in \([a-\mu,b-\mu]\), whose width remains \(b-a\). This invariance under centering is why the result depends on interval width, not on the interval’s location.
Worked Example: Applying the Lemma to a Bernoulli Variable
Let \(X\) be Bernoulli with \(P(X=1)=0.3\) and \(P(X=0)=0.7\). Its mean is \(\mu=0.3\), and its range is \([0,1]\), of width \(1\). Hoeffding’s lemma gives, for every real \(\lambda\),
The exact expression can also be checked directly:
For example, at \(\lambda=1\), this is approximately \(0.7(0.7408)+0.3(2.0138)=1.1227\), while \(e^{1/8}\approx1.1331\). Thus the stated upper bound holds in this case, though the lemma guarantees it for every \(\lambda\), not just this value.
Hoeffding’s Two-Sided Inequality
Proof. Let \(S_n=\sum_{i=1}^n(X_i-\mu)\), so that \(\bar X_n-\mu=S_n/n\). Independence and Hoeffding’s lemma imply, for every \(\lambda>0\),
For any \(s>0\), Markov’s inequality applied to the nonnegative random variable \(e^{\lambda S_n}\) gives
The exponent is minimized over \(\lambda>0\) at \(\lambda=4s/[n(b-a)^2]\). Substitution yields
Apply the same argument to \(-S_n\), whose summands are also centered and have range width \(b-a\), to obtain the same bound for \(P(S_n\leq-s)\). The event \(\{|S_n|\geq s\}\) is the union of these two tail events. Adding their bounds and setting \(s=nt\) proves
This proves the theorem. \(\square\)
The factor \(2\) comes from bounding both tails, not from the exponential-moment lemma. If the interval has zero width, every observation equals the same constant almost surely, and the deviation probability is zero for every \(t>0\); this degenerate case can be handled separately.
Worked Example: A Bernoulli Sample Average
Suppose \(X_1,\ldots,X_{10}\) are independent Bernoulli observations with success probability \(0.3\). Then \(\mu=0.3\), the range is \([0,1]\), and
The event includes averages at or below \(0.1\) and at or above \(0.5\). For this discrete sample those are \(K\leq1\) and \(K\geq5\), where \(K=\sum_iX_i\). Direct calculation gives
and
The exact deviation probability is therefore approximately \(0.2996\), below the Hoeffding bound \(0.8987\). This illustrates that the inequality guarantees an upper bound, not a close approximation.
Worked Example: How the Range Width Changes the Bound
Let \(X_1,\ldots,X_{40}\) be independent and identically distributed Uniform\([2,6]\) observations. Their mean is \(\mu=(2+6)/2=4\), and their range width is \(6-2=4\). For a deviation \(t=0.8\), Hoeffding’s inequality gives
The width must be squared in the denominator: replacing \(4\) by \(4^2=16\) gives the exponent \(-3.2\). Translating the interval would not change this bound, because the width remains \(4\). Rescaling the observations would change the width and the deviation by the same factor, leaving the ratio \(t^2/(b-a)^2\) unchanged when both are expressed in the rescaled units.
Worked Example: Converting a Sum Deviation to an Average Deviation
Suppose \(X_1,\ldots,X_{25}\) are independent and identically distributed, each taking values in \([-2,3]\), with common mean \(\mu\). Consider the event that the sum differs from its expectation by at least \(10\):
Dividing by \(25\), this is exactly the event \(|\bar X_{25}-\mu|\geq10/25=0.4\). The interval width is \(3-(-2)=5\). Therefore,
A probability cannot exceed \(1\), so this numerical upper bound gives no useful restriction beyond that basic fact. It is nevertheless a valid inequality. The calculation also shows why the sum threshold must be divided by \(n\) before using a theorem stated for an average.
Interpreting the Bound and Avoiding Common Errors
For a fixed range \([a,b]\) and fixed \(t>0\), the exponent \(-2nt^2/(b-a)^2\) becomes more negative as \(n\) grows. For fixed \(n\) and range, larger deviations are less probable according to the bound. A wider interval weakens the guarantee quadratically. When the right-hand side exceeds \(1\), it remains mathematically correct but is uninformative; one may always replace it by the smaller of \(1\) and the displayed upper bound.
Common mistake: using the sum formula for an average. The sum-tail exponent is \(-2s^2/[n(b-a)^2]\), where \(s\) is a deviation of the sum. For the average, the corresponding sum deviation is \(s=nt\), so the exponent becomes \(-2nt^2/(b-a)^2\). Substituting \(t\) directly for \(s\) would miss a factor of \(n^2\) before simplification and give the wrong rate.
Common mistake: treating every bounded variable as if its range were \([0,1]\). The width, not the endpoints themselves, determines the inequality. A variable in \([-2,3]\) has width \(5\), not width \(1\); its denominator is \(25\). Standardizing the variable by shifting or scaling is possible, but the deviation and range must be transformed consistently.
Finally, a two-sided event requires accounting for both its upper and lower tails. The factor \(2\) is obtained by adding the two one-sided bounds. Omitting it does not establish the stated two-sided inequality, even though a one-sided bound has no such factor.
Check Your Understanding
Use the range width and distinguish carefully between deviations of a sum and deviations of an average.
- If observations lie in \([1,5]\), what range width appears in the denominator of Hoeffding’s inequality?
- For \(n=20\), range \([0,1]\), and \(t=0.1\), write the resulting two-sided upper bound.
- Why does the exponential-moment proof require independence when bounding the moment generating function of the sum?
- If a sum of \(n\) observations deviates from its expectation by at least \(s\), what deviation \(t\) of the average does this correspond to?
- What does it mean if the calculated Hoeffding upper bound is greater than \(1\)?