PDF of $Y = WX$

177 Views Asked by At

There are two independent random variables, $X \sim \mathcal{N}(0, 1)$ and $W$ whose PMF is given by $$ P(W = w) = \begin{cases} \frac{1}{2} \hspace{3mm} \text{if} \hspace{3mm} w = \pm1 \\ 0 \hspace{3mm} \text{otherwise}. \end{cases} $$ A third random variable is defined as $Y = WX$. I want to find the density of $Y$.

\begin{align} P(Y \leq y) &= P(WX \leq y)\\ &= P(X \leq \frac{y}{W}) \\&= \sum_{w \in \{1, -1\}}P(X \leq \frac{y}{w})P(W = w)\\ &= \frac{1}{2}\int_{-\infty}^{-y}\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}dx + \frac{1}{2}\int_{-\infty}^{y}\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}dx \end{align} When I differentiate the CDF to get PDF of $Y$, both the terms cancel out due to sign of $y$ in one of the integrals. I know that $Y \sim \mathcal{N}(0, 1)$. What am I doing wrong? Thanks.

4

There are 4 best solutions below

0
On BEST ANSWER

You are on the right track. The mistake is $X\leq \frac{y}{W}$. Since, W can take both values +1, -1 you cannot take it directly to the denominator without changing inequality.

0
On

$P(WX \le y) \ne P(X \le y/W)$ because dividing by $W$ when $W$ is negative will change the direction of the inequality.

3
On

[EDIT] $$\eqalign{P(Y \le y) = P(WX \le y) &= P(W = 1, \; X \le y) + P(W = -1,\; -X \le y)\cr &= P(W = 1, \; X \le y) + P(W = -1, \; X \ge -y)\cr &= \frac{1}{2 \sqrt{2\pi}} \int_{-\infty}^y e^{-x^2/2}\; dx + \frac{1}{2 \sqrt{2\pi}} \int_{-y}^\infty e^{-x^2/2}\; dx}$$

Applying the change of variables $x \to -x$, you should get $$ \int_{-y}^{\infty} e^{-x^2/2}\; dx = \int_{-\infty}^y e^{-x^2/2}\; dx $$ so the CDF of $Y$ is exactly the CDF of the standard normal distribution.

2
On

In this cases I think it is better to solve the exercise using the Total Probability Theorem. Just for another example find the density of

$Y=X+W$

And note that

$(X+W|W=-1)\sim N(-1;1)$

and $(X+W|W=1)\sim N(1;1)$

Thus

$f_Y(y)=\frac{1}{2}f_1+\frac{1}{2}f_2$

Where $f_1$ and $f_2$ are the densities of the two conditional gaussian rv's