Say we have two distributions $X$ and $Y$. I know that the pdf of the distribution $Z = X + Y$ is given by:

$f_Z(z) = \int_{-\infty}^{\infty}f_X(x)f_Y(z-x)dx$

The intuition is that you sum up the probabilities of all possible $x$, $z-x$ pairs. However, now I want to find the pdf of $Z = XY$. Using the same intuition as above, I expect it to be:

$f_Z(z) = \int_{-\infty}^{\infty}f_X(x)f_Y(\frac{z}{x})dx$

However, wikipedia says that the correct pdf is:

$f_Z(z) = \int_{-\infty}^{\infty}\frac{1}{|x|}f_X(x)f_Y(\frac{z}{x})dx$

Where is the extra $\frac{1}{|x|}$ term coming from? What is the intuition? Thanks.

  • 2
    $\begingroup$ You have assumed, without explicitly saying so, that $X$ and $Y$ are independent random variables. The intuition is that when we do a change of variables, there is something called a Jacobian that is involved and that $\frac{1}{|x|}$ is in essence the Jacobian. $\endgroup$ – Dilip Sarwate Mar 23 at 22:21
  • $\begingroup$ Dilips comment pretty much sums it up imo. I'll add that a Jacobian is also required for the $Z=X+Y$ case, it's just that the Jacobian happens to be constant (i.e. $1$) for linear transformations. $\endgroup$ – knrumsey Mar 24 at 0:11
  • $\begingroup$ A deeper, and therefore perhaps more satisfying reason, than any calculation of a Jacobian is an appeal to symmetry as described at stats.stackexchange.com/a/185709/919. $\endgroup$ – whuber Mar 24 at 14:26

Assuming independence of $X$ and $Y$, we start with deriving the cdf for $Z$: $$F_Z(z)=P(XY \leq z).$$ Notice that $(XY \leq z)$ can occur in two ways: 1) $(Y \leq z/X, X >0)$ or 2) $(Y \geq z/X, X <0).$ Since these two possibilities are mutually exclusive events, we can write $$F_Z(z) = P(Y \leq z/X, X >0)+ P(Y \geq z/X, X <0).$$ It follows $$F_Z(z)=\int_{0}^{\infty} \int_{-\infty}^{z/x} f_X(x)f_Y(y)dy dx+\int_{-\infty}^{0} \int_{z/x}^{\infty} f_X(x)f_Y(y)dy dx $$ $$= \int_{0}^{\infty} f_X(x) \int_{-\infty}^{z/x} f_Y(y)dy dx+\int_{-\infty}^{0} f_X(x) \int_{z/x}^{\infty} f_Y(y)dy dx$$ $$= \int_{0}^{\infty} f_X(x) F_Y(z/x) dx+\int_{-\infty}^{0} f_X(x)(1-F_Y(z/x))dx.$$

Using the fact that $f_Z(z)=F_Z'(z)$, we get $$f_Z(z)=\frac{d}{dz}\int_{0}^{\infty} f_X(x) F_Y(z/x) dx+ \frac{d}{dz}\int_{-\infty}^{0} f_X(x)(1-F_Y(z/x))dx$$ $$ =\int_{0}^{\infty} f_X(x) f_Y(z/x)\frac{1}{x} dx+\int_{-\infty}^{0} f_X(x)f_Y(z/x)\frac{-1}{x}dx.$$ In the first term above, $x>0$, so $\frac{1}{x}=\frac{1}{|x|}$. In the second term above, $x<0$, so $\frac{-1}{x}=\frac{1}{|x|}$. Using this, we get $$ f_Z(z)=\int_{0}^{\infty} f_X(x) f_Y(z/x)\frac{1}{|x|} dx+\int_{-\infty}^{0} f_X(x)f_Y(z/x)\frac{1}{|x|}dx.$$ Combining the two integrals, we get $$f_Z(z) = \int_{-\infty}^{\infty} f_X(x) f_Y(z/x)\frac{1}{|x|} dx.$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.