\documentclass[a4paper,12pt]{article}
\begin{document}

QUESTION The mgf of a random variable Y is $e^{3t+8t^2}$. Prove
that
  E(Y)=3 and find Var(Y).


ANSWER $M(t)=e^{3t+8t^2}=1+(3t+8t^2)+\frac{(3t+8t^2)^2}{2!}+\ldots
 \textrm{ therefore }\mu=\textrm{the coefficient of t}=3\\
 \frac{E(X^2)}{2!}=\textrm{the coefficient of t}^2=8 +\frac{9}{2}\textrm{ therefore
 }E(X^2)=25.$\\
 Alternatively $M^{(1)}=(3+16t)e^{3t+8t^2},\ \ 
 \mu=M^{(1)}(0)=3\\
 M^{(2)}(t)=e^{3t+8t^2}+(3+16t)^2e^{3t+8t^2},\
 E(X^2)=M^{(2)}(0)=16+9=25$\\
 Alternatively having found $\mu=3\ \ M^*(t)=e^{8t^2}$ we can find
 $\sigma^2$ directly by expansion of differentiation.Note that
 $M(t)=e^{3t+\frac{1}{2} \times 16t^2} \approx
 e^{\mu+\frac{1}{2}\sigma^2 t^2}$ for $N(\mu, \sigma^2)$ Hence by
 uniqueness $\mu=3$ and $\sigma^2=16$

\end{document}
