Joint mgf and Independence of $X$ and $Y-X$ The question is to find a joint mgf of $X$ and $Z=Y-X$, then determine if $X$ and $Z$ are independent, where $f(x,y)=6e^{-x-2y}I_{(0<x<y<\infty)}$.
I found mgf of $X$ and $Z$ by
$$mgf_{X,Z}(s,t)=E(e^{sX+tZ})=E(e^{(s-t)X+tY})=\int_{0}^{\infty}{\int_{x}^{\infty}f(x,y)\,dy}\,dx=\frac{6}{(3-s)(2-t)}$$
My question is, does this have something to do with the independence of $X$ and $Z$? It seems $mgf_{X,Z}(s,t)=mgf_{X}(s)\cdot mgf_{Z}(t)$, but does that guarantee that $f(x,z)=f_{X}(x)f_{Z}(z)$ for all $x$ and $z$ ? I see a few answers that say "yes", but I can't find the proof or reason.
 A: Okay, so I've never worked with joint MGFs but here's an alternative solution (which I try to relate to MGFs).
If $A$ and $B$ are independent, then we have
\begin{align}
M_{A,B} (s,t) &= \mathbb{E} (e^{sA+tB}) \\
&= \mathbb{E} (e^{sA} e^{tB}) \\&
= \mathbb{E} (e^{sA}) \mathbb{E} (e^{tB})
\end{align}
Does the reverse hold? I don't know. My bet is "not necessarily", although if it does hold you can prove independence using this property.
The alternative solution is simply using the PDF. We have that $f_{X,Y} (x,y) = 6e^{-x-2y} I_{0<x<y<\infty}$. Note that $Z=Y-X \iff Y = Z+X$. Then:
\begin{align}
f_{X,Z}(x,z) &= f_{X,Y}(x,z+x) \\
&= 6e^{-3x-2z} I_{0<x<x+z<\infty} \\
&= 6e^{-3x-2z} I_{0<x<\infty} I_{0<z<\infty}
\end{align}
We get the marginals:
\begin{align}
f_{X} (x) &= \int_{0}^{\infty} f_{X,Z} (x,z) dz \\
&= 3e^{-3x}, \ 0<x<\infty
\end{align}
Similarly for $Z$, $f_Z (z) = 2e^{-2z}$ for $0<z<\infty$. Therefore we can express the joint distribution as a product of the marginal distributions:
\begin{align}
f_{X,Z}(x,z) &= 6e^{-3x-2z} I_{0<x<\infty} I_{0<z<\infty} \\
&= \left(3e^{-3x} I_{0<x<\infty} \right) \left(2e^{-2z} I_{0<z<\infty} \right) \\
&= f_X (x) f_Z (z)
\end{align}
Which is the definition of independence. $X$ and $Z$ are independent.
