Solution (source code)

= Solution

For $t>0$, monotonicity gives $\{X\geq k\}=\{e^{tX}\geq e^{tk}\}$. Apply <Markov inequality> to the nonnegative variable $e^{tX}$:
$$
\boxed{\mathbb P(X\geq k)\leq e^{-tk}\mathbb E[e^{tX}]}.
$$
If the <expectation> is infinite, the bound remains true but uninformative. At $t=0$ the right side is one, so that endpoint follows directly. Minimizing over $t\geq0$ gives the <Chernoff bound>.