# Reminder on Conditional Expectation

I've refreshed myself on the properties of conditional expectation but keep hitting a brick wall! If $X$ and $Y$ are independent both Binomial$(n,\theta)$, how do I work out the conditional expectation of $X$ given that $X+Y=m$ ?

I've tried integrating and rearranging but I may be over complicating it...

• I think it can be done with minimal calculation, by making use of symmetry. – André Nicolas Nov 12 '15 at 23:12
• By symmetry, E(X|X+Y)=E(Y|X+Y). Since E(X+Y|X+Y)=X+Y, one gets E(X|X+Y)=(X+Y)/2, that is, E(X|X+Y=m)=m/2 for every m. – Did Nov 12 '15 at 23:12

\begin{align} \mathsf P(X+Y=m) & = \sum_{k=\max\{0, m-n\}}^{\min\{n, m\}}\mathsf P(Y=m-k)\cdot \mathsf P(X=k) \\[1ex] & = \sum_{k=\max\{0, m-n\}}^{\min\{n, m\}} \binom{n}{m-k} p^{m-k}(1-p)^{n-m+k}\cdot\binom{n}{k}p^k(1-p)^{n-k} \end{align}
But the expectation can be found even easier from Linearity of Expectation: $m = \mathsf E(X+Y\mid X+Y) = \mathsf E(X\mid X+Y)+\mathsf E(Y\mid X+Y)$ , and symmetry, $\mathsf E(X\mid X+Y)=\mathsf E(Y\mid X+Y)$.