# MGF of random variable

Suppose $X$ has the standard normal distribution and $Y$ has an exponential distribution. How would you find the mgf of $\frac{X}{\sqrt{Y}}$? Would it be $$\frac{M_{X}(t)}{\sqrt{M_{Y}(t)}}$$

-
The moment generating function would be $\mathbb{E}[e^{tX/\sqrt{Y}}]$, which is not the same as $\mathbb{E}[e^{tX}]/\sqrt{\mathbb{E}[e^{tY}]}$. – Raskolnikov May 17 '12 at 5:53

Let $Z = X Y^{-1/2}$. The characteristic function of $Z$: $$\phi_Z(t) = \mathbb{E}(\exp(i t Z)) = \mathbb{E}(\exp(i t X Y^{-1/2})) = \mathbb{E}(\mathbb{E}(\exp(i t X Y^{-1/2}))|Y)) = \mathbb{E}( \phi_X(t Y^{-1/2}))$$ But $\phi_X(t) = \exp(-t^2/2)$, thus $$\phi_Z(t) = \mathbb{E}\left( \exp\left(-\frac{t^2}{2 Y}\right) \right) = \int_0^\infty \lambda \mathrm{e}^{-\lambda y} \exp\left(-\frac{t^2}{2 y}\right) \mathrm{d} y = \sqrt{2 \lambda t^2} K_1\left( \sqrt{2 \lambda t^2} \right)$$
It is easy to see that $Z$ does not have finite moments, because the characteristic function is not infinitely differentiable at $t=0$, and thus the moment generating function does not exist: $$\phi_Z(t) = 1 + \lambda \left(2\gamma - 1 + \log\left( \frac{\lambda t^2}{2} \right) \right) \frac{t^2}{2} + \mathcal{o}(t^2)$$ where $\gamma$ is the Euler-Mascheroni constant.
Another way to see that the moment generating function is not defined is to retrace the evaluation of its expectation definition: $$M_Z(t) = \int_0^\infty \mathrm{e}^{-\lambda y} \exp\left(\frac{t^2}{2 y}\right) \mathrm{d} y$$ the above integral diverges at the lower integration point for $t^2 > 0$.