I´m trying to prove that if I have $X$ and $Y$ be two discrete random variables i.i.d, then $$ E[X |X+Y]=[Y |X+Y] = \frac{X+Y}{2}$$
I know that if $X$ and $Y$ are two discrete r.v. then $$E[Y |X]= E[Y |X=x] = \sum_{y \in Range( Y)} y \times p_{Y|X=x}(y)$$ where $$p_{Y|X=x}(y) = \frac{p_{X,Y}(x,y)}{p_X(x)} = \frac{P(X=x,Y=y)}{P(X=x)} $$
but How can I applied this with $E[X |X+Y]$ to prove $ E[X |X+Y]=[Y |X+Y] = \frac{X+Y}{2}$
Could someone help me, pls.
Thanks for your time and help.
First way: By linearity of conditional expectation $$E(X+Y|X+Y)=E(X|X+Y)+E(Y|X+Y)$$ Since $X$ and $Y$ are i.i.d, $E(Y|X+Y) = E(X|X+Y)$, thus $E(X+Y|X+Y)=2E(X|X+Y)$.
But $E(X+Y|X+Y)= X+Y$. Hence $E(X|X+Y)=\frac {X+Y}2$.
Second way: let us first compute $\begin{aligned}[t]P_{X|X+Y=z}(x)&=\frac{P((X=x)\cap (X+Y=z))}{P(X+Y=z)}\\ &=\frac{P((X=x)\cap (Y=z-x))}{P(X+Y=z)}\\ &=\frac{P(X=x)P(Y=z-x)}{P(X+Y=z)} \end{aligned}$
Thus $E(X|X+Y=z)=\sum_{x\in X(\Omega)}xP_{X|X+Y=z}(x)=\frac{1}{P(X+Y=z)}\sum_{x\in X(\Omega)}\frac{P(X=x)P(Y=z-x)}{P(X+Y=z)}$
To be continued...