Let the joint pdf of $(X, Y)$ be given by
$$f(x, y) = \frac{1}{\sqrt{2\pi}} \text{exp}\left(-y-\frac{(x –
y)^{2}}{2}\right) \hspace{1cm} \text{ for } y > 0, -\infty < x <
\infty$$Find the joint mgf of $X$ and $Y$.
My attempt:
Recall that every joint probability distribution function can be decomposed into the product of a marginal density and a conditional density. That is, we can write
$$f(x, y) = f_{X\mid Y}(x \mid y) \cdot f_{Y}(y).$$
Defining $f_{X \mid Y}(x\mid y) = \frac{1}{\sqrt{2\pi}} \text{exp}(-(-x-y)^{2}/2)$ and $f_{Y}(y) = \text{exp}(-y)$ works.
Now, note that $X | Y$ follows a normal distribution with parameters $y$ and $1$. Also, $Y$ follows an exponential distribution with parameter $1$. Therefore,
$$M_{X, Y}(s, t) = M_{X \mid Y}(s) \cdot M_{Y}(t) $$
$$= \frac{\text{exp}(ys + s^{2}/2)}{1 – t} $$
for $t < 1$.
Is my solution right? If not, what is the correct way to solve this problem?
Best Answer
You have correctly deduced that $$X\mid Y\sim\mathcal N(Y,1)\quad,\text{ where }Y\sim\text{Exp}(1)$$
So the MGF of $(X,Y)$ should be
\begin{align} M(s,t)&=E\,(e^{sX+tY}) \\&=E\left[E\,(e^{sX+tY}\mid Y)\right] \\&=E\left[e^{tY}E\,(e^{sX}\mid Y)\right] \\&=E\left[e^{tY}e^{sY+s^2/2}\right] \\&=e^{s^2/2}\,E\left[e^{(t+s)Y}\right] \\&=\frac{e^{s^2/2}}{1-(s+t)}\quad,\,s+t<1 \end{align}
The formula that you used, namely $M_{X, Y}(s, t) = M_{X \mid Y}(s) \cdot M_{Y}(t)$, doesn't make much sense.