In Chapter 4 we developed a tail bound for the sum of $\{0,1\}$ random variables. We can use martingales to generalize this result for the sum of any random variables whose range lies in $[0,1] .$ Let $X_{1}, X_{2}, \ldots, X_{n}$ be independent random variables such that $\operatorname{Pr}\left(0 \leq X_{i} \leq 1\right)=1$. If $S_{n}=\sum_{i=1}^{n} X_{i+}$ show that
$$
\operatorname{Pr}\left(\left|S_{n}-\mathbf{E}\left[S_{n}\right]\right| \geq \lambda\right) \leq 2 \mathrm{e}^{-2 \lambda^{2}}
$$