How to compute the PDF of $Z=XY$

124 Views Asked by At

After the answer I got, I'm interested in the case for computing the PDF of a random variable $Z=XY$, and $X, Y$ are independent. The convolution of PDF describe the PDF of the sum of two random variables, if we go for the previous step before that result and substitute $y=z/x$ for this case ...

$$f_Z(z)=\int_{-\infty}^{\infty}f_{X,Y}(x,z/x)\ dx=\int_{-\infty}^{\infty}f_X(x)f_Y(z/x)\ dx$$

but I don't think is right because this operation should be commutative, meaning:

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

but if I applied the standard approach to demostrate that convolution is commutative, I get something like:

Let $\tau=z/x,\quad x=z/\tau,\quad dx=(-z/\tau^2)d\tau$

$$\int_{-\infty}^{\infty}f_{X,Y}(x,z/x)\ dx=\lim_{b\to\infty}\int_{x=-b}^{x=b}f_{X,Y}(x,z/x)\ dx$$

$$\lim_{b\to\infty}\int_{\tau=z/-b}^{\tau=z/b}f_{X,Y}(z/\tau,\tau)\left(-{z\over\tau^2}\right) d\tau=-z\lim_{b\to\infty}\int_{\tau=z/-b}^{\tau=z/b}f_{X,Y}(z/\tau,\tau){d\tau\over\tau^2}$$

$$=-z\int_{0^-}^{0^+}f_{X,Y}(z/\tau,\tau){d\tau\over\tau^2}=0 $$

2

There are 2 best solutions below

6
On BEST ANSWER

Unfortunately, your computation of the PDF of the product is wrong. Let's suppose, as you have tacitly done, that $X,Y$ have densities $f_X, f_Y$. We have that $$\begin{align*}P(Z \leq z) &= P(XY \leq z) \\ &= P(XY \leq z, Y \leq 0) + P(XY \leq z, Y > 0) \\ &= P(X \geq z/Y, Y \leq 0) + P(X \leq z/Y, Y > 0) \\ &= \int_{-\infty}^0\int_{z/y}^\infty f_X(x)f_Y(y)dxdy + \int_{0}^\infty\int_{-\infty}^{z/y} f_X(x)f_Y(y)dxdy\end{align*}$$ so we may differentiate (exchanging the derivative and the first integral) to get that $$f_Z(z) = -\int_{-\infty}^0 f_X(z/y)f_Y(y)\frac{dy}{y} + \int_0^\infty f_X(z/y)f_Y(y)\frac{dy}{y} = \int_{-\infty}^\infty f_X(z/y)f_Y(y)\frac{dy}{|y|},$$ If you used $P(XY \leq z, X \leq 0) + P(XY \leq z, X > 0)$ instead you would get the symmetric $$f_Z(z) = \int_{-\infty}^\infty f_X(x)f_Y(z/x)\frac{dx}{|x|}.$$

More directly in response to your posting, you make a mistake in the substiution. Since $y \mapsto z/x$ isn't well defined (let alone differentiable) on $(-\infty, \infty)$ so you can't just make this substiution. Instead (and I'm still handwaving to some extent, since really we should be taking limits to $0$ and $\infty$ everywhere, but this is implicit in the notation) you have to split the integral over $(-\infty, 0)$ and $(0, \infty)$, as in the following (where I will take the correct expression for the PDF). Taking $y = \frac{z}{x}$ and $dy = -\frac{z}{x^2}dx$, we have that $\frac{dx}{x} = -\frac{dy}{y}$ and therefore $$\begin{align*} f_Z(z) &= \int_{-\infty}^\infty f_X(x)f_Y(z/x)\frac{dx}{|x|} \\ &= -\int_{-\infty}^0 f_X(x)f_Y(z/x)\frac{dx}{x} + \int_{0}^\infty f_X(x)f_Y(z/x)\frac{dx}{x} \\ &= \int_{0}^{-\infty} f_X(z/y)f_Y(y)\frac{dy}{y} - \int_{\infty}^0 f_X(z/y)f_Y(y)\frac{dy}{y}\\ &= - \int_{-\infty}^{0} f_X(z/y)f_Y(y)\frac{dy}{y} + \int_{0}^\infty f_X(z/y)f_Y(y)\frac{dy}{y} \\ &= \int_{-\infty}^\infty f_X(z/y)f_Y(y)\frac{dy}{|y|} \end{align*}$$ as expected.

0
On

A simple approach is to look at it geometrically (assuming X and Y independent). Then the distribution can be looked as the area of a subset on the unit square. The easiest approach is to first get the cdf $P(XY\le z)=1-P(XY\gt z)$. $P(XY\gt z)= \int\limits_z^1(\int\limits_\frac{z}{x}^1 dydx=\int\limits_z^1 (1-\frac{z}{x})dx=1-z+zlog(z)$, which is the area of the unit square between XY=z and XY=1. The cdf is then $z-zlog(z)$ and the pdf is $-log(z)$ All this for $0\le z \le 1$.