Hoeffding's lemma

In probability theory, Hoeffding's lemma is an inequality that bounds the moment-generating function of any bounded random variable. It is named after the Finnish–American mathematical statistician Wassily Hoeffding.

The proof of Hoeffding's lemma uses Taylor's theorem and Jensen's inequality. Hoeffding's lemma is itself used in the proof of McDiarmid's inequality.

Statement of the lemma
Let X be any real-valued random variable such that $$a \leq X \leq b$$ almost surely, i.e. with probability one. Then, for all $$ \lambda \in \mathbb{R}$$,


 * $$\mathbb{E} \left[ e^{\lambda X} \right] \leq \exp \Big(\lambda\mathbb{E}[X]+ \frac{\lambda^2 (b - a)^2}{8} \Big),$$

or equivalently,


 * $$\mathbb{E} \left[ e^{\lambda (X - \mathbb{E}[X])} \right] \leq \exp \Big(\frac{\lambda^2 (b - a)^2}{8} \Big).$$

Proof
Without loss of generality, by replacing $$X$$ by $$X - \mathbb{E}[X]$$, we can assume $$\mathbb{E}[X] = 0$$, so that $$a \leq 0 \leq b$$.

Since $$ e^{\lambda x}$$ is a convex function of $$x$$, we have that for all $$x \in [a,b]$$,


 * $$e^{\lambda x}\leq \frac{b-x}{b-a}e^{\lambda a}+\frac{x-a}{b-a}e^{\lambda b}$$

So,
 * $$\begin{align}

\mathbb{E}\left[e^{\lambda X}\right] &\leq \frac{b-\mathbb{E}[X]}{b-a}e^{\lambda a}+\frac{\mathbb{E}[X]-a}{b-a}e^{\lambda b}\\ &= \frac{b}{b-a}e^{\lambda a} + \frac{-a}{b-a}e^{\lambda b} \\ &= e^{L(\lambda(b-a))}, \end{align} $$

where $$ L(h)= \frac{ha}{b-a}+\ln(1 + \frac{a - e^ha}{b-a})$$. By computing derivatives, we find


 * $$ L(0)=L'(0)=0$$ and $$L''(h)= -\frac{ab e^h}{(b-a e^h)^2}$$.

From the AMGM inequality we thus see that $$L''(h)\le\frac14$$ for all $$h$$, and thus, from Taylor's theorem, there is some $$0 \le \theta \le 1$$ such that


 * $$ L(h) = L(0) + h L'(0) + \frac{1}{2} h^2 L''(h\theta) \leq \frac{1}{8}h^2.$$

Thus, $$ \mathbb{E}\left[e^{\lambda X}\right] \leq e^{\frac{1}{8}\lambda^2(b-a)^2}$$.