I was given the following problem: let $X,N\sim \mathcal{N}(0,1)$ and let $A$ equal $1$ w.p $p$ and $0$ w.p $1-p$. Also, let $X,N,A$ be independent. Define $Y=AX+N$. Find $\mathbb{E}(X\mid Y)$.
My idea was to use the 'nested conditioning' property $\mathbb{E}(X\mid Y)\overset{\text{a.s}}{=}\mathbb{E}[\mathbb{E}(X\mid Y,A)\mid Y]$. I defined $Z=Y\mid A$ (which is likely at the very least a horrible abuse of notation). $(X,Z)$ is undoubtedly a Gaussian vector (i.e jointly Gaussian) as a linear transformation of $(X,Y)$. Noting $Z\sim\mathcal{N}(0,A^2+1)$ we have $\mathbb{E}(X\mid Z)=\frac{\text{cov}(X,Z)}{\text{var}(Z)}Z=\frac{A}{A^2+1}Z$ , where I found $\text{cov}(X,Z)$ via the covariance matrix of $(X,Z)$.
I figure $\mathbb{E}(X\mid Y,A)=\mathbb{E}(X\mid Z)$, so substituting into the nesting property yields $$\mathbb{E}(X\mid Y)=\mathbb{E}[\mathbb{E}(X\mid Z)\mid Y]=\mathbb{E}\left( \frac{A}{A^2+1}Y\mid Y\right) =Y\mathbb{E}\left( \frac{A}{A^2+1}\mid Y\right)$$ And now I'm lost.
I'd like to know whether I've made any forbidden manipulations, and of course, I'd like a hint to help me out!
PS written some months later: This answer has some issues, which I will soon address in some edits. See the comments below. End of PS.
$\newcommand{\E}{\mathbb E}$ $$ \E(X\mid Y)=\E(\E(X\mid Y,A)) = \E\left.\begin{cases} \E(X\mid X+N) & \text{if }A=1 \\ 0 & \text{if }A=0 \end{cases}\right\} = p\E(X\mid X+N). $$ Whether all of these equalities are correct I leave for the moment as an exercise, which I haven't yet completely done myself. The last conditional expected value can be found with formulas found in all the books, which it appears you probably know.