In probability theory, Hoeffding's inequality provides an upper bound on the probability that the sum of random variables deviates from its expected value. Hoeffding's inequality was proved by Wassily Hoeffding in 1963.
Hoeffding's inequality is a special case of the Azuma–Hoeffding inequality, and it is more general than the Bernstein inequality, proved by Sergei Bernstein in 1923. They are also special cases of McDiarmid's inequality.
Special case of Bernoulli random variables
Hoeffding's inequality can be applied to the important special case of identically distributed Bernoulli random variables, and this is how the inequality is often used in combinatorics and computer science. We consider a coin that shows heads with probability p and tails with probability 1 − p. We toss the coin n times. The expected number of times the coin comes up heads is pn. Furthermore, the probability that the coin comes up heads at most k times can be exactly quantified by the following expression:
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:
Similarly, when k = (p + ε)n for some ε > 0, Hoeffding's inequality bounds the probability that we see at least εn more tosses that show heads than we would expect:
Hence Hoeffding's inequality implies that the number of heads that we see is concentrated around its mean, with exponentially small tail.
We define the empirical mean of these variables
One of the inequalities in Theorem 1 of Hoeffding (1963):
Theorem 2 of Hoeffding (1963) is a generalization of the above inequality when it is known that Xi are strictly bounded by the intervals [ai,bi]:
which are valid for positive values of t. Here E[X] is the expected value of X. The inequalities can be also stated in terms of the sum
of the random variables:
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).
In this section, we give a proof of Hoeffding's inequality. For the proof, we require the following:
- Hoeffding's Lemma. Suppose X is a real random variable with mean zero such that . Then
Proof of Hoeffding's Lemma
First note that if one of a or b is zero, then and the inequality follows. If both are nonzero, then a must be negative and b must be positive.
Next, recall that esx is a convex function on the real line:
Applying E[ ⋅ ] to both sides of the above inequality gives us:
Let u = s(b − a) and define:
φ is well defined on R, to see this we calculate:
The definition of φ implies
By Taylor's theorem, for every real u there exists a v between 0 and u such that
Proof of Inequality
Using this lemma, we can prove Hoeffding's inequality. Suppose X1, ..., Xn are n independent random variables such that
Then for s, t ≥ 0, Markov's inequality and the independence of Xi implies:
To get the best possible upper bound, we find the minimum of the right hand side of the last inequality as a function of s. Define
Note that g is a quadratic function and achieves its minimum at
Thus we get
Hoeffding's inequality is useful to analyse the number of required samples needed to obtain a confidence interval by solving the inequality in Theorem 1:
The inequality states that the probability that the estimated and true values differ by more than t is bounded by e−2nt2. Symmetrically, the inequality is also valid for another side of the difference:
By adding them both up, we can obtain two-sided variant of this inequality:
This probability can be interpreted as the level of significance (probability of making an error) for a confidence interval around of size 2t:
Solving the above for n gives us the following:
Therefore, we require at least samples to acquire -confidence interval .
Hence, the cost of acquiring the confidence interval is sublinear in terms of confidence level and quadratic in terms of precision.
Note that this inequality is the most conservative of the three in Theorem 1, and there are more efficient methods of estimating a confidence interval.
- Bennett's inequality
- Chebyshev's inequality
- Dvoretzky–Kiefer–Wolfowitz inequality
- Markov's inequality
- Chernoff bounds
- Hoeffding's lemma
- Concentration inequality
- Serfling, Robert J. (1974). "Probability Inequalities for the Sum in Sampling without Replacement". The Annals of Statistics 2 (1): 39–48. doi:10.1214/aos/1176342611.
- Hoeffding, Wassily (March 1963). "Probability inequalities for sums of bounded random variables". Journal of the American Statistical Association 58 (301): 13–30. JSTOR 2282952.
- Robert Nowak (2009). "Lecture 7: Chernoff's Bound and Hoeffding's Inequality" (PDF). ECE 901 (Summer '09) : Statistical Learning Theory Lecture Notes. University of Wisconsin-Madison. Retrieved May 16, 2014.