Why is $E[X|X+Y] = E[Y |X+Y]$ if X,Y are i.i.d random variables In proof of the fact that $E[X|X+Y] = \frac{X+Y}{2}$ when $X,Y$ are independent, identically distributed random variables, one uses the observation that $E[X|X+Y] = E[Y|X+Y]$ but I don't see why this is the case. Is there an easy proof of this statement?
 A: Short answer. This essentially boils down to the fact that
$$ \mathbf{E}[X \mid X+Y = z] = \mathbf{E}[Y \mid X+Y = z], $$
which is true because

*

*both of the conditional expectations depend only on the joint distribution of $X$ and $Y$ (rather than on how the random vector $(X, Y)$ is realized), and


*the role of $X$ and $Y$ in their joint distribution can be swapped without changing the joint distribution itself, i.e., the distribution is exchangeable.

Longer answer. Rigorously establishing the above equality in full generality requires the notion of regular conditional probability. So, let us tackle the original equality directly.
Let $\mu(\cdot) = \mathbf{P}(X \in \cdot)$ be the distribution of $X$. As usual, we will impose the condition that $\mu$ has finite first moment, i.e., $\int |x| \, \mu(\mathrm{d}x) < \infty$.
Now let $\varphi(\cdot)$ be any bounded Borel-measurable function. Then by the change of variables formula (a.k.a. LOTUS), together with the fact that the joint distribution of $X$ and $Y$ is the product measure $\mu \otimes \mu$, we have
\begin{align*}
\mathbf{E}[X \varphi(X+Y)]
&= \iint_{\mathbb{R}^2} x \varphi(x+y) \, \mu(\mathrm{d}x)\mu(\mathrm{d}y), \\
\mathbf{E}[Y \varphi(X+Y)]&= \iint_{\mathbb{R}^2} y \varphi(x+y) \, \mu(\mathrm{d}x)\mu(\mathrm{d}y).
\end{align*}
By the Fubini's Theorem, these two integrals coincide. Since this is true for any $\varphi$, the uniqueness of conditional distribution implies that
$$ \mathbf{E}[X \mid X+Y] = \mathbf{E}[Y \mid X+Y] $$
holds $\mathbf{P}$-a.s. as required.
A: As both $E(X|X + Y)$ and $E(Y|X + Y)$ are $\sigma(X + Y)$-measurable, by the measure-theoretic definition of conditional expectation, it suffices to show that for any $G \in \sigma(X + Y)$, it holds that
\begin{align*}
\int_G X dP = \int_G E(Y|X + Y)dP. \tag{1}
\end{align*}
Using the conditional expectation definition again, the right-hand side of $(1)$ is simply $\int_G Y dP$.  Therefore it suffices to show for any $G \in \sigma(X + Y)$,
\begin{align*}
\int_G X dP = \int_G Y dP. \tag{2}
\end{align*}
Since (see Probability and Measure, Theorem 20.1) the $\sigma$-field $\sigma(X + Y)$ consists exactly of the sets $(X + Y)^{-1}(H) = \{\omega \in \Omega: X(\omega) + Y(\omega) \in H\}$ for $H \in \mathscr{R}^1$, it suffices to show $(2)$ for $G = (X + Y)^{-1}(H), H \in \mathscr{R}^1$.  By assumption, $X$ and $Y$ are independent so that $(X, Y)$ has product measure  $\pi := \mu \times \mu$, where $\mu$ is the common distribution of $X$ and $Y$. It then follows by the change of variable theorem (Probability and Measure, Theorem 16.13) that
\begin{align}
\int_G X dP &= \int_\Omega X(\omega)I_{(X + Y)^{-1}(H)}(\omega)P(d\omega) = \int_{\mathbb{R}^2} X(\omega)I_H((X + Y)(\omega))P(d\omega) \\
&= \int_{\mathbb{R}^2} xI_H(x + y)\pi(d(x, y)), \tag{3} \\  
\int_G Y dP &= \int_\Omega Y(\omega)I_{(X + Y)^{-1}(H)}(\omega)P(d\omega) =
\int_{\mathbb{R}^2} Y(\omega)I_H((X + Y)(\omega))P(d\omega) \\
&= \int_{\mathbb{R}^2} yI_H(x + y)\pi(d(x, y)). \tag{4}
\end{align}
By Fubini's Theorem, the right-hand sides of $(3)$ and $(4)$ are respectively (where $H - x$ stands for the set $\{y \in \mathbb{R}^1: x + y \in H\}$):
\begin{align}
& \int_{\mathbb{R}^1}\left[\int_{\mathbb{R}^1}xI_H(x + y)\mu(dy)\right]\mu(dx) = 
\int_{\mathbb{R}^1}x\mu(H - x)\mu(dx), \tag{5} \\  
& \int_{\mathbb{R}^1}\left[\int_{\mathbb{R}^1}yI_H(x + y)\mu(dx)\right]\mu(dy) = 
\int_{\mathbb{R}^1}y\mu(H - y)\mu(dy). \tag{6}
\end{align}
The right-hand sides of $(5)$ and $(6)$ are evidently identical (in that both "$x$" and "$y$" may be viewed as dummy integrating variables).  Therefore, $(2)$ holds.  This completes the proof.

To appreciate that both of the independence assumption and the identical distribution condition are essential for $(2)$ to hold (thus to ensure $E[X | X + Y] = E[Y | X + Y]$ to hold), it may be helpful to give an example showing that $(2)$ needs not to hold when $X, Y$ are identically distributed but not independent (the other case, that $(2)$ needs not to hold when $X$ and $Y$ are independent but not identically distributed is trivial).  Consider the discrete joint distribution of $(X, Y)$ as follows:
\begin{align}
\begin{array}{c | c c c}
       & Y = -1      & Y = 0        & Y = 1        \\ \hline
X = -1 & \frac{1}{9} & \frac{2}{9}  & 0            \\
X =  0 & 0           & \frac{1}{18} & \frac{5}{18} \\
X =  1 & \frac{2}{9} & \frac{1}{18} & \frac{1}{18} 
\end{array}
\end{align}
It is straightforward to verify that $P[X = i] = P[Y = i] = 1/3, i = -1, 0, 1$, i.e., $X$ and $Y$ are identically distributed.  On the other hand, $X$ and $Y$ are not independent, as $P[X = 0, Y = 0] = \frac{1}{18} \neq P[X = 0]P[Y = 0] = \frac{1}{9}$.  Take $G = (X + Y)^{-1}(\{-1\})$, then
\begin{align}
\int_G X dP = -P[X = -1, Y = 0] = -\frac{2}{9} \neq 
\int_G Y dP = -P[X = 0, Y = -1] = 0.
\end{align}
Therefore, the independence assumption is crucial here.
A: The answer really is, "by symmetry", but the key is to note that the symmetry leaves the condition unchanged. It works because $X+Y=Y+X$. We cannot make the same "argument" to prove that $E[X\mid X]=E[Y\mid Y]$, because in this case, the condition has changed.
More rigorously, let $f,g:\mathbb{R}^2\to\mathbb{R}$ be measurable and assume $g(X,Y) = g(Y,X)$. Let $A\subseteq\mathbb{R}$ be measurable. Then
\begin{align*}
  E[E[f(Y,X) \mid g(X,Y)]\,1_{\{g(X,Y)\in A\}}]
    &= E[E[f(Y,X)\,1_{\{g(X,Y)\in A\}} \mid g(X,Y)]]\\
    &= E[f(Y,X)\,1_{\{g(X,Y)\in A\}}]\\
    &= E[f(X,Y)\,1_{\{g(X,Y)\in A\}}],
\end{align*}
where in the last equality we use the fact that $(X,Y)\overset{d}{=}(Y,X)$ and $g(Y,X)=g(X,Y)$. Since $E[f(Y,X) \mid g(X,Y)]$ is $\sigma(g(X,Y))$-measurable, this shows that
$$
  E[f(Y,X) \mid g(X,Y)] = E[f(X,Y) \mid g(X,Y)].
$$
A: Suppose $X$ and $Y$ are defined over domain $\mathcal A$. Start with the definition of expectation with either expression. For example:
$$\mathbb E(X|X+Y=t) = \frac{\sum_{z \in\mathcal A} zP(X=z)P(Y = t-z)}{P(X+Y=t)}$$
If $X$ takes on value $z$, then $Y$ must take on value $t-z$ so that their sum is a constant, i.e., $X+Y = t$
Because $X$ and $Y$ are iid, $P(X=a) = P(Y=a), \forall a \in \mathcal A$. So we can replace the expression in the numerator above:
$$\sum_{z \in\mathcal A} zP(X=z)P(Y = t-z)= \sum_{z \in\mathcal A} zP(Y=z)P(X = t-z)$$
The expression on the right hand side is the definition of the expectation:
$$\mathbb E(Y|X+Y=t) = \frac{\sum_{z \in\mathcal A} zP(Y=z)P(X = t-z)}{P(X+Y=t)}$$
