Tutorials › Statistical Theory I - Probability and Distribution Theory › Hoeffding’s Inequality for Bounded Independent Sums

Concentration and Exponential Bounds · Tutorial 922 of 994

Hoeffding's Inequality for Bounded Independent Sums

Learn to bound both tails of a sum of independent bounded variables using the sum of their squared range lengths.

Advanced 10 min read

What You'll Learn

  • State the boundedness and independence assumptions for Hoeffding’s inequality.
  • Derive the exponential upper-tail bound from Hoeffding’s lemma and Markov’s inequality.
  • Obtain the lower-tail and two-sided bounds.
  • Compute the sum of squared range lengths for variables with different ranges.
  • Recognize why replacing range lengths by endpoints or variances gives an invalid calculation.

Why Bounded Ranges Control Concentration

Suppose a sum \(S\) is built from independent random variables, each of which is known to stay within a fixed interval. Even when the summands have different distributions and different interval widths, those widths give a common way to control how far the sum can stray from its mean. Hoeffding’s inequality makes this dependence explicit: a variable with a wider allowed range contributes more to the tail bound.

The result applies to sums, not only to identically distributed observations. Its proof combines the exponential-moment bound for one bounded variable with independence, then optimizes an exponential Markov bound. The sum of the squared range lengths is the quantity that determines the rate of decay.

Definition: Let \(X_1,\ldots,X_n\) be independent random variables. Suppose that for each \(i\), there are finite constants \(a_i\le b_i\) such that \(P(a_i\le X_i\le b_i)=1\). The range length bound for \(X_i\) is \(c_i=b_i-a_i\). Define \(S=\sum_{i=1}^n X_i\), \(m=E[S]=\sum_{i=1}^n E[X_i]\), and \(V=\sum_{i=1}^n c_i^2\).

The intervals need not be the smallest possible intervals, but using unnecessarily wide intervals weakens the bound. The expectations exist because each variable is bounded. We use Hoeffding’s lemma, from the earlier material on Hoeffding’s Lemma for Bounded Variables: if \(X\) is bounded almost surely in \([a,b]\), then for every real \(\lambda\),

$$ E\!\left[\exp\{\lambda(X-E[X])\}\right] \le \exp\!\left(\frac{\lambda^2(b-a)^2}{8}\right). $$

The lemma is applied to each centered summand. Independence is what allows their exponential moments to multiply; without it, the following argument does not establish the same bound.

Hoeffding’s Inequality for a Sum

Theorem (Hoeffding’s inequality): Under the boundedness and independence assumptions above, if \(V>0\), then for every \(t>0\),
$$ P(S-m\ge t)\le \exp\!\left(-\frac{2t^2}{V}\right), \qquad P(S-m\le -t)\le \exp\!\left(-\frac{2t^2}{V}\right), $$
$$ P(|S-m|\ge t)\le 2\exp\!\left(-\frac{2t^2}{V}\right). $$

Here \(V=\sum_{i=1}^n(b_i-a_i)^2\); in particular, each summand contributes its own squared range length. The two-sided inequality follows by bounding the upper and lower tail separately and adding the bounds. Since probabilities cannot exceed one, the two-sided conclusion can also be written with the right-hand side replaced by its minimum with one.

Proof of the Upper-Tail Bound

Write \(Y_i=X_i-E[X_i]\), so \(S-m=\sum_{i=1}^nY_i\). Fix \(\lambda>0\). On the event \(S-m\ge t\), the nonnegative random variable \(\exp\{\lambda(S-m)\}\) is at least \(\exp(\lambda t)\). Markov’s inequality therefore gives

$$ P(S-m\ge t) \le e^{-\lambda t}E\!\left[e^{\lambda(S-m)}\right]. $$

Independence implies that the expectation of the product of the exponential factors is the product of their expectations. Applying Hoeffding’s lemma to each \(X_i\), with its interval \([a_i,b_i]\), yields

$$ E\!\left[e^{\lambda(S-m)}\right] =\prod_{i=1}^n E[e^{\lambda Y_i}] \le \prod_{i=1}^n \exp\!\left(\frac{\lambda^2c_i^2}{8}\right) =\exp\!\left(\frac{\lambda^2V}{8}\right). $$

Thus, for every \(\lambda>0\),

$$ P(S-m\ge t) \le \exp\!\left(-\lambda t+\frac{\lambda^2V}{8}\right). $$

When \(V>0\), the exponent is a quadratic function of \(\lambda\). Its derivative is \(-t+\lambda V/4\), so its minimum over positive \(\lambda\) occurs at \(\lambda=4t/V\). Substitution gives

$$ -\frac{4t^2}{V} +\frac{(4t/V)^2V}{8} =-\frac{4t^2}{V}+\frac{2t^2}{V} =-\frac{2t^2}{V}. $$

This proves the upper-tail bound. For the lower tail, apply the same argument to the independent variables \(-X_i\), whose interval lengths are still \(c_i\). Their sum has mean \(-m\), so the event \(\sum_i(-X_i)-(-m)\ge t\) is exactly \(S-m\le -t\). Finally, \(\{|S-m|\ge t\}\) is the union of \(\{S-m\ge t\}\) and \(\{S-m\le-t\}\); the union bound gives the two-sided inequality.

If \(V=0\), every \(c_i=0\), so \(X_i=a_i=b_i\) almost surely for every \(i\). Hence \(S=m\) almost surely and both tail probabilities are zero for \(t>0\). This handles the degenerate case separately.

Worked Examples

Worked Example: Independent Variables With Three Different Ranges

Let \(X_1,X_2,X_3\) be independent uniform random variables on \([0,1]\), \([0,4]\), and \([0,2]\), respectively. Bound the probability that their sum is at least five above its mean.

The range lengths are \(1\), \(4\), and \(2\). Their squared sum is

$$ V=1^2+4^2+2^2=1+16+4=21. $$

The means are \(1/2\), \(2\), and \(1\), so \(m=1/2+2+1=3.5\). With \(t=5\), Hoeffding’s upper-tail bound gives

$$ P(S-m\ge 5) \le \exp\!\left(-\frac{2(5)^2}{21}\right) =e^{-50/21} \approx 0.0925. $$

Thus the theorem bounds \(P(S\ge 8.5)\) by about \(0.0925\). The largest interval contributes \(16\) of the total \(V=21\), showing how a wider allowed range can dominate this bound.

Worked Example: A Two-Sided Bound With a Weak Numerical Guarantee

Let \(X_1=B_1\), \(X_2=2B_2\), and \(X_3=3B_3\), where the \(B_i\) are independent Bernoulli variables with success probabilities \(0.2\), \(0.4\), and \(0.3\). Find a Hoeffding bound for \(P(|S-1.9|\ge2.5)\).

The means are \(E[X_1]=0.2\), \(E[X_2]=2(0.4)=0.8\), and \(E[X_3]=3(0.3)=0.9\). Therefore \(m=0.2+0.8+0.9=1.9\). The variables lie in \([0,1]\), \([0,2]\), and \([0,3]\), giving

$$ V=1^2+2^2+3^2=1+4+9=14. $$

Using \(t=2.5\) in the two-sided inequality,

$$ P(|S-1.9|\ge2.5) \le 2\exp\!\left(-\frac{2(2.5)^2}{14}\right) =2e^{-25/28} \approx 0.8190. $$

This is valid but not especially informative: it only guarantees that the probability is at most about \(0.8190\). A concentration inequality is an upper bound, not necessarily a sharp estimate for the particular distributions.

Worked Example: A Bound With a Simple Exponent

Suppose independent variables have the following distributions: \(X_1\) is Bernoulli with success probability \(1/2\); \(X_2=2B_2\), where \(B_2\) is Bernoulli with success probability \(1/4\); and \(X_3\) takes values \(-1\) and \(1\) with equal probabilities. Bound \(P(|S-E[S]|\ge3)\).

Their means are \(1/2\), \(2(1/4)=1/2\), and \(0\), so \(E[S]=1\). Their respective intervals are \([0,1]\), \([0,2]\), and \([-1,1]\). Consequently,

$$ V=1^2+2^2+2^2=9. $$

For \(t=3\), the exponent is \(-2(3)^2/9=-2\). Therefore

$$ P(|S-1|\ge3)\le 2e^{-2}\approx 0.2707. $$

In this example \(S\) can range only from \(-1\) to \(4\). The event requires \(S\le-2\) or \(S\ge4\); the first possibility cannot occur, but the two-sided Hoeffding bound remains valid. This illustrates that a general bound need not use every detail of the possible values of a sum.

Choosing and Interpreting the Range Bounds

Hoeffding’s inequality is useful when independence and almost-sure bounds are available but the exact distributions are complicated or differ across summands. It does not require a common distribution, equal means, or a particular shape such as symmetry. The practical calculation has three parts: find the mean of the sum, add the squared range lengths, and substitute the desired deviation \(t\).

A frequent mistake is to use the interval endpoints themselves in the denominator—for example, to add \(a_i^2+b_i^2\)—or to use the interval width only once. The theorem uses \((b_i-a_i)^2\). Another mistake is to treat \(V\) as the variance of the sum: it is a bound-related quantity formed from range lengths, not generally \(\operatorname{Var}(S)\).

Common pitfall: If \(X_i\in[2,5]\), its range length is \(5-2=3\), and its contribution to \(V\) is \(3^2=9\), not \(2^2+5^2\), \(5^2\), or \(\operatorname{Var}(X_i)\). The interval can be shifted without changing its length: \([2,5]\) and \([-4,-1]\) make the same contribution.

A second pitfall is to omit independence. The multiplication of exponential moments in the proof depends on independence, so bounds on each variable’s range alone do not justify this result for dependent variables. Also, when the calculated two-sided right-hand side exceeds one, the result is still correct but offers no useful probability guarantee beyond the universal bound \(P(A)\le1\).

Key takeaway: For independent \(X_i\in[a_i,b_i]\) almost surely, deviations of \(S=\sum_iX_i\) from \(E[S]\) satisfy a two-sided bound with exponent \(-2t^2/\sum_i(b_i-a_i)^2\). Each variable’s contribution is its squared range length.

Check Your Understanding

Use the assumptions and theorem stated above to answer each question.

  1. For independent variables with interval bounds \([-1,1]\), \([0,2]\), and \([4,5]\), calculate \(V\).
  2. State which part of the proof permits the exponential moment of the sum to be written as a product.
  3. If each \(X_i\) is replaced by \(X_i+d_i\) for a fixed constant \(d_i\), do the range-length contributions change? Explain.
  4. For \(V=10\) and \(t=2\), write the upper-tail and two-sided Hoeffding bounds.
  5. What conclusion applies when every interval has zero length and \(t>0\)?