Solution (source code)

= Solution

Given $X=k$, the score $Y$ has a <binomial distribution> with success <probability> $1/2$. Its conditional <expected value> and <variance> are $k/2$ and $k/4$. Thus
$$
\boxed{\mathbb E[Y\mid X=k]=\frac k2,\qquad
\mathbb E[Y^2\mid X=k]=\frac k4+\frac{k^2}{4}.}
$$
This is <binomial thinning> of the first-round count; the second formula uses the identity $\mathbb E[Y^2\mid X]=\operatorname{Var}(Y\mid X)+\mathbb E[Y\mid X]^2$.