[Math] Product of a Discrete Variable and a Continuous Variable

dirac deltaprobabilityprobability distributionsprobability theoryrandom variables

How would I go about obtaining the probability density function of a random variable that results in a product of a discrete variable and a continuous variable? I know that if $X$ and $Y$ are both continuous, then the probability density function of $Z=XY$ is given by: $$f_Z(z)=\int_{-\infty}^{\infty}f_X(x)f_Y\left(\frac{z}{x}\right)\frac{1}{|x|}dx$$ but what is the method of obtaining $f_Z(z)$ if $X$ is a discrete variable and $Y$ is continuous?

More specific to my case, I have $X$ following a Rademacher distribution, that is $$\begin{align*}
P(X=x) = \begin{cases}
\frac{1}{2} & x = -1\\
\frac{1}{2} & x = 1\\
0 & otherwise
\end{cases}
\end{align*}$$

and $Y$ following a Rayleigh distribution. What would be the product of these two random variables?

Best Answer

We can try from the definition: $$ \begin{split} F_Z(z) &= \mathbb{P}[Z \le z] \\ &= \mathbb{P}[XY \le z] \\ &= \sum_{k=1}^\infty \mathbb{P}[XY \le z, X = k] \\ &= \sum_{k=1}^\infty \mathbb{P}[Y \le z/k] \mathbb{P}[X = k] \\ &= \sum_{k=1}^\infty F_Y(z/k) f_X(k). \end{split} $$

Note I did not handle the case where $k \le 0$...

One can alternatively condtion on $Y$ similarly and end up with an integral instead of a sum: $$ \begin{split} F_Z(z) &= \mathbb{P}[Z \le z] \\ &= \mathbb{P}[XY \le z] \\ &= \int_\mathbb{R} \lim_{\epsilon \to 0} \mathbb{P}[XY \le z, |Y-y| < \epsilon] dy \\ &= \int_\mathbb{R} F_X(z/y) f_Y(y) dy. \end{split} $$