# Probability distribution of the product of two dependent random variables

It is well known that being $$X$$ and $$Y$$ two independent random variables with distributions $$f_X(x)$$ and $$f_Y(y)$$, respectively, then the probability distribution of the multiplicative function $$z = xy$$ is given by $$f_Z(z)=\int_{-\infty}^{\infty}f_X(x)f_Y(z/x)\frac{1}{|x|}dx,$$ where $$\frac{1}{|x|}$$ is the Jacobian of the transformation.

What if $$X$$ and $$Y$$ are not independent, in such a way we cannot write the probability distributions by separate functions? We need to use the joint distribution probability $$f_{X,Y}(x,y)$$. So, will the probability distribution of $$z=xy$$ be $$f_Z(z)=\int_{-\infty}^{\infty}f_{X,Y}(x,z/x)\frac{1}{|x|}dx,$$ that is, the only difference is that we cannot separate the pdfs of $$x$$ and $$y$$ in the integral?

Yes, this is the only difference - though sometimes you can simplify the calculation if you can phrase the dependency as $$f_{X,Y}=f_X(x)\cdot f_Y(y|x)$$, using the conditional probability density function, yielding: $$f_Z(z)=\int_{-\infty}^{\infty}f_X(x)f_Y(z/x | x)\frac{1}{|x|}dx,$$ (In the case of independence, $$f_Y(z/x | x) = f_Y(z/x)$$, returning to your first equation).