Solution (source code)

= Solution

In the <infinite sites mutation model>, mutations occur as independent <Poisson processes> at rate $\theta/2$ per lineage per unit of the coalescent time used in part (a). Conditional on the genealogy, superposition over branches gives a <Poisson distribution> with mean $\theta L/2$. Since this depends only on $L$, conditioning on total length alone gives
$$
\boxed{S\mid L,\theta\sim\operatorname{Poisson}(\theta L/2).}
$$
Each mutation occurs at a new site and below the common ancestor, so it contributes exactly one <segregating site>. The <law of iterated expectation> therefore gives, with $a_{n-1}=\sum_{i=1}^{n-1}1/i$,
$$
\boxed{E[S\mid\theta]=\frac\theta2 EL=\theta a_{n-1}.}
$$
Here $\theta$ is fixed when taking the <expectation>. If it is also random under a proper prior with finite mean, the unconditional <expectation> is $a_{n-1}E\theta$.