I am given that $X,Y$ are independent Bernoulli RVs with parameter $p\in (0,1)$. I am also told $Z=1_{(X+Y=0)}$. I am asked to find $E[X\mid Z]$ and $E[Y\mid Z]$.
I can see that the expected values are going to be equivalent, but I'm not quite sure how to compute these expectations. Could someone give me a hint? Thanks. Harry
So we are calculating $$ E[X \mid Z] = \sum_x xP(X=x \mid Z=z) $$ For the Bernoulli variable this will be just $$ \begin{align} E[X \mid Z] &= 1 \cdot P(X=1 \mid Z=z) + 0 \cdot P(X=0 \mid Z=z)\\ &=P(X=1 \mid Z=z) \end{align} $$ If $Z=1$ then clearly both $X$ and $Z$ are zero, so $P(X=1 \mid Z=1)=0$. In the other case we have $$ \begin{align} P(X=1 \mid Z=0) &= \frac{ P(X=1, Z=0)}{P(Z=0)}\\ &=\frac{P(X=1 \cap (X=1 \cup Y=1))}{P(X=1 \cup Y=1)} \\ &=\frac{P(X=1)}{1-P(X=0 \cap Y=0)}\\ &=\frac{p}{1-(1-p)^2}\\ &=\frac{1}{2-p} \end{align} $$ So final answer is
$$ E[Y \mid Z]=E[X \mid Z] = \left\{ \begin{array}{ll} 0 & \mbox{for } Z=1 \\ \frac{1}{2-p} & \mbox{for } Z=0 \end{array} \right. $$