Solution (source code)

= Solution

For odd sample size, the <sample median> is the central <order statistic>, $M_U=U_{(m+1)}$. Since $n=2m+1$, its index is $r=(n+1)/2$ and $n-r+1=(n+1)/2$. Substitute these into the <expectation> and <variance> formulas from part (i):
$$
\boxed{\mathbb E[M_U]=\frac12,\qquad
\operatorname{Var}(M_U)=\frac1{4(n+2)}.}
$$
In fact $M_U$ has the symmetric <beta distribution> $\operatorname{Beta}(m+1,m+1)$, explaining why its <expectation> is exactly the centre of the interval.