Conditional expectation $E[X\mid X=c-Y]$ This came up in a question about sequences of RV and conditioning on terms that were  later in the sequence. In particular, $X,Y\sim N(0,1), c$ is a constant.
Is it true that $$E[X\mid Y+X=c]=E[X\mid X=c-Y]=E[c-Y]=c-E[Y]?$$
 A: No, it's not. You haven't described a dependency relation, which allows me to choose an arbitrary one, e.g. $X=Y$. Then, $$E[X\mid Y+X=c]=c/2\neq c-E[Y]=c$$
The problem arises from omitting the conditional part when you substitute for $X$, i.e.
$$E[X\mid X=c-Y]=E[c-Y\mid X=c-Y]\neq E[c-Y]$$
A: Since you've defined $X$ and $Y$ as standard normals, your conclusion that $E(X\mid X+Y=c) = c-E(Y) = c~$ (because $E(Y) =0$). But how can that be true if $X$ and $Y$ are exchangeable in the analysis? So you know something is amiss. @gunes gives the correct solution of $E(X\mid X+Y=c)=c/2$ and mentions a special case that illustrates the problem with your analysis. I'll expand on @gunes solution in 2 ways:


*

*If $X + Y= c$ and $X, Y \sim f$, then $-$ solely by symmetry $-$ $~E(X\mid X+Y=c) = E(Y\mid X+Y=c) = c/2.$ This is true whether or not $\operatorname{cov}(X,Y)=\rho=0$, so $X$ and $Y$ need not be independent. Naturally, it is true when $f \sim N(0,1)$, which is your condition, but it is more general than that.





*Let's consider the case of $X, Y \sim N(0,1)$ with non-trivial correlation $\rho \ne 0.$ The joint density is


$$
f_{X,Y}(X=x,Y=y)= \frac{1}{2\pi}\exp\left(-\frac{1}{2(1-\rho^2)}(x^2+y^2-2\rho xy)\right)
$$
If we add the constraint $X+Y=c$, or $Y=c-X$, then 
$$
f_{X}(X=x\mid Y=c-x)= \frac{1}{2\pi}\exp\left(-\frac{1}{2(1-\rho^2)}(x^2+(c-x)^2)-2\rho x(c-x)\right)
$$
completing the square, we have
$$
f_X(X=x\mid Y=c-x)= \frac{1}{2\pi}\exp \left[-\frac{1}{2} \cdot \frac{(x-c/2)^2)}{(1-\rho)/2}\right] ~\cdot ~\exp\left(-\frac{c^2}{4(1+\rho)}\right) \\
$$
which clearly gives $X\mid X+Y=c \sim N(c/2, (1-\rho)/2), $ so $E(X\mid X+Y=c) = c/2,$ with no explicit dependence on $\rho$. The problem is well defined for all values of $\rho$, even for $\rho=-1$ which implies that $Y=-X$, in which case $X+Y=c$ means $c=0$. But $E(X\mid X+Y=c)=c/2=0$ even still!
