Solution (source code)

= Solution

The upper envelope for $\psi$ implies
$$
e^{\psi(\theta x)}
\leq1+\theta x+\frac{\theta^2x^2}{2}.
$$
Writing $\mu_i=\mathbb E[X_i]$, taking expectations, and using $1+u\leq e^u$ gives
$$
\mathbb E e^{\psi(\theta X_i)-\theta\mu_i}
\leq e^{-\theta\mu_i}
\left(1+\theta\mu_i+\frac{\theta^2}{2}\mathbb E[X_i^2]\right)
\leq\exp\left(\frac{\theta^2}{2}\mathbb E[X_i^2]\right).
$$
<Independent random variables> then yield
$$
\boxed{
\mathbb E\exp\left\{\sum_{i=1}^n
(\psi(\theta X_i)-\theta\mathbb E[X_i])\right\}
\leq
\exp\left\{\frac{\theta^2}{2}\sum_{i=1}^n\mathbb E[X_i^2]\right\}}.
$$
Applying the lower envelope to $-\psi(\theta x)$ similarly gives
$$
\boxed{
\mathbb E\exp\left\{\sum_{i=1}^n
(\theta\mathbb E[X_i]-\psi(\theta X_i))\right\}
\leq
\exp\left\{\frac{\theta^2}{2}\sum_{i=1}^n\mathbb E[X_i^2]\right\}}.
$$