# linear combination of independent normal random variables

Let $X$ and $Y$ be normal random variables and $Z$ be s.t. $Z=aX+bY$. Then, find $M_Y(t)=E(e^{tY})$ and $M_Z(t)=E(e^{tZ})$.

Attempt: So I know that for normal random variable $Y$, $E(Y)=\frac{1}{\sqrt{2\pi}\sigma}\int_{-\infty}^{\infty}xe^{-(x-\mu)^2/2\sigma^2}dx$. So for the marginal distribution of $Y$, it should be something like $E(e^{tY})=\frac{1}{\sqrt{2\pi}\sigma}\int_{-\infty}^{\infty}e^{tY}e^{-(e^{tY}-\mu)^2/2\sigma^2}dx$... kind of stuck at thi s point.

Edit: I just had an idea -- shouldn't the marginal distribution of $Y$ just be the probability distribution of $Y$? -- $E(Y)=\frac{1}{\sqrt{2\pi}\sigma_{Y}}xe^{-(x-\mu)^2/2\sigma_Y^2}$?

-

Let $X$ be normal, mean $\mu$, variance $\sigma^2$, and let $Y$ be normal, mean $\nu$, variance $\tau^2$.
Since $X$ and $Y$ are independent, $aX+bY$ is normal, mean $a\mu+b\nu$, and variance $a^2\mu+b^2\nu$. This fact is quite useful, and will help you ompute the moment-generating function $M_Z(t)$ of $Z$.
Now we find a formula for the moment generating function of $X$. We want to find the expectation of $e^{tX}$ (we are computing this one, instead of doing the essentially identical calculation of $E(e^{tY})$, because of a preference for the letter $X$.) We have $$E(e^{tX})= \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}\sigma}e^{tx}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx.$$ It remains to evaluate this integral. We do the calculation in two steps, though it could be done in one. Make the substitution $w=\dfrac{x-\mu}{\sigma}$. Routine use of the substitution process shows that our integral is $$\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{t(\mu+\sigma w)}e^{-\frac{w^2}{2}}dw.$$ We can simplify this to $$e^{t\mu}\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{w^2}{2} +t\sigma w}dw.$$ Look at the exponent in the above integral. It is $-\frac{w^2}{2}+t\sigma w$, which is $-\frac{1}{2}(w^2-2t\sigma w)$. Completing the square, we find that the exponent is $$-\frac{1}{2}(w-t\sigma)^2+\frac{t^2\sigma^2}{2}.$$ We can bring the
$e^{\frac{t^2\sigma^2}{2}}$ part "out" of the integral, and find that our integral is $$e^{t\mu+\frac{t^2\sigma^2}{2}}\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{(w-t\sigma)^2}{2}}dw.$$ It's almost over! Make the substitution $z=w-t\sigma$. We get that our integral is $$e^{t\mu+\frac{t^2\sigma^2}{2}}\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-\frac{z^2}{2}}dz.$$ The remaining integral has value $1$, since it is the area under the (standard) normal curve. We conclude that $$E(e^{tX})=e^{t\mu+\frac{t^2\sigma^2}{2}}.$$
You will not have to sweat like this to find $E(e^{tZ})$. You can probably just borrow the result we have just proved, and replace $\mu$ by $a\mu+b\nu$, and replace $\sigma^2$ by $a^2\sigma^2+b^2\tau^2$.