I'm going through "Probabilistic Machine Learning: An Introduction" by Murphy (2021), and currently trying to do Ex. 3.1 (p. 80), which states:
Let $X \sim N(0, 1)$ and $Y = WX$, where $p(W = 1) = p(W =-1) = .5$. It is clear that X and Y are not independent, since Y is a function of X.
a. Show $Y \sim N(0, 1)$
b. Show $Cov[X, Y] = 0$ Thus X and Y are uncorrelated but dependent, even though they are Gaussian. Hint: use the definition of covariance:
$Cov[X,Y] = \mathbb{E}[XY]−\mathbb{E}[X]\mathbb{E}[Y]$ and $\mathbb{E}[XY ] = \mathbb{E}[\mathbb{E}[XY |W]]$
a) Now, conceptually, I get that $\mathbb{E}[W] = 0$ and that $Y = WX$ should be distributed $N(0, 1)$. But this is just because $W$ is such a simple distribution, and I would definitely be stuck if it were more complicated. So everything in between is done in my head because "it seems like it should be so", and not because I can derive it.
b) I also get that $\mathbb{E}[XY]$ and $\mathbb{E}[X]\mathbb{E}[Y]$ should be 0, therefore $Cov[EX]=0$, but also only on an abstract basis.
Could someone please guide me through this? This is not a homework question or any assignment, just trying to plough through the book by myself.
Thanks.