Given two independent random variables X and Y, how can I find the PDF of random variable $Z=XY$?

*If their joint distribution is required, assume that we also have it.


Solution 1:

If $X$ and $Y$ are two random variables, you may find the product distribution as follows: $$ f_Z(z)=\int_{-\infty}^{\infty} \frac{1}{|t|} f_X\left(t\right)f_Y\left(\frac{z}{t}\right)dt $$ To see this, suppose that the distribution of $X$ is continuous at 0: $$ P(Z\leq z)=P(XY\leq z)= P(Y\leq \frac{z}{X}\big|X>0)P(X>0)+P(Y\geq \frac{z}{X}\big|X<0)P(X<0)= $$ $$ =\int_{0}^{\infty} P(Y\leq \frac{z}{t}\big)f_X\left(t\right)dt+ \int_{-\infty}^{0} P(Y\geq \frac{z}{t}\big) f_X\left(t\right)dt $$ We can find the derivation of both sides w.r.t. $z$ and we get:

$$ f_Z(z)=\int_{0}^{\infty} \frac{1}{t} f_Y(\frac{z}{t}\big)f_X\left(t\right)dt+ \int_{-\infty}^{0} \frac{-1}{t} f_Y(\frac{z}{t}\big) f_X\left(t\right)dt $$ $$ =\int_{-\infty}^{\infty} \frac{1}{|t|} f_X\left(t\right)f_Y\left(\frac{z}{t}\right)dt $$ The moral: it is not always possible to use this formula.

Solution 2:

\begin{align} {\cal P}\left(Z\right) &= {{\rm d} \over {\rm d}Z}\int_{-\infty}^{Z}{\cal P}\left(Z'\right)\,{\rm d}Z' = {{\rm d} \over {\rm d}Z}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} {\rm P_{X}}\left(X\right)\,{\rm P_{Y}}\left(Y\right)\, \Theta\left(Z - XY\right)\,{\rm d}X\,{\rm d}Y\, \\[3mm]&= \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} {\rm P_{X}}\left(X\right)\,{\rm P_{Y}}\left(Y\right)\, \delta\left(Z - XY\right)\,{\rm d}X\,{\rm d}Y\, = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} {\rm P_{X}}\left(X\right)\,{\rm P_{Y}}\left(Y\right)\, {\delta\left(Y - Z/X\right) \over \left\vert X\right\vert}\,{\rm d}X\,{\rm d}Y\, \end{align}

$$ \begin{array}{|c|}\hline\\ \color{#ff0000}{\large\quad% {\cal P}\left(Z\right) = \int_{-\infty}^{\infty} {\rm P_{X}}\left(X\right)\,{\rm P_{Y}}\left(Z \over X\right)\, \,{{\rm d}X \over \left\vert X\right\vert} \quad} \\ \\ \hline \end{array} $$