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.
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.