# Is my proof showing that $E(X)=\mu$ in this sub-gaussian setting correct?

Consider a random variable $$X$$ such that for all $$\lambda\in R$$, $$E\left(e^{\lambda(X-\mu)}\right)\leq e^{0.5 \lambda^2\sigma^2}$$. How do I show that $$E(X)=\mu$$?

What I have done is that, by $$1+\lambda X\leq e^{\lambda X}$$, we have $$E(1+\lambda X)\leq E(e^{\lambda X})\leq e^{0.5\lambda^2\sigma^2+\lambda\mu}\implies$$

$$\lambda E(X)\leq e^{0.5\lambda^2\sigma^2+\lambda\mu}-1\implies E(X)\leq\frac{e^{0.5\lambda^2\sigma^2+\lambda\mu}-1}{\lambda},\;\forall \lambda>0$$.

Then by L'Hopital's rule, we have $$\lim_{\lambda\to 0}\frac{e^{0.5\lambda^2\sigma^2+\lambda\mu}-1}{\lambda}=\mu$$. Thus, we have $$E(X)\leq \mu$$.

Next, since $$1+\lambda X\leq e^{\lambda X}$$ still holds for $$\lambda<0$$, the previous inequality $$E(X)\leq\frac{e^{0.5\lambda^2\sigma^2+\lambda\mu}-1}{\lambda},\forall \lambda>0$$ becomes $$E(X)\geq\frac{e^{0.5\lambda^2\sigma^2+\lambda\mu}-1}{\lambda},\;\forall \lambda<0$$. Thus, we have $$E(X)\geq\mu$$.

Thus, $$E(X)=\mu$$.

Is my proof correct?

For fixed $$\sigma^2, \mu \in \mathbb R$$:
• the inequality $$\mathop{\mathbb E}\left[e^{\lambda\left(X-\mu\right)}\right]\leq e^{0.5 \lambda^2\sigma^2}$$ for all $$\lambda \in \mathbb R$$ implies existence of the moment-generating function of $$X$$ and hence existence (and finiteness) of $$\mathop{\mathbb E}\left[X\right]$$;
• if $$\mathop{\mathbb E}\left[e^{\lambda\left(X-\mu\right)}\right]\leq e^{0.5 \lambda^2\sigma^2}$$ for all $$\lambda \in \mathbb R_{>0}$$, then $$\mathop{\mathbb E}\left[X\right] \leq \mu$$ for all $$\lambda \in \mathbb R_{>0}$$
• if $$\mathop{\mathbb E}\left[e^{\lambda\left(X-\mu\right)}\right]\leq e^{0.5 \lambda^2\sigma^2}$$ for all $$\lambda \in \mathbb R_{<0}$$, then $$\mathop{\mathbb E}\left[X\right] \geq \mu$$ for all $$\lambda \in \mathbb R_{<0}$$.