Toss $n$ coins. What is the conditional expectation of the number of heads given the number of heads among the first x tosses?
I let $X \sim Bin (x, 0.5)$ and $Y \sim Bin (n-x , 0.5)$
where $X$ is the number of heads in the first $x$ tosses and $Y$ is the number of heads in the remaining tosses
I let $Z=X+Y$ so Z $ \sim Bin (n, p) $
I need to find $ \mathbb{E} (Z \mid $ X=x)
I have tried to apply the formula $ \mathbb{E}(Z \mid X=x) = \sum_{i}z_i p (z_i \mid x_j)$
But I'm not sure where to proceed.