More elegant derivation of the shift in median bin occupancy

115 Views Asked by At

In answering Median of a multinomial variable, I found to my own surprise through a somewhat tedious calculation that the expected value of the median of the ball counts in $3$ bins into which $n$ balls are distributed is

$$ \frac n3-\frac1{2\pi\sqrt3}+O\left(n^{-\frac12}\right)\;. $$

The question originally asked about $2k+1$ bins. The integrations I used to get this result would be daunting for $k=2$ and prohibitive beyond that. Even for $k=1$ they seem out of proportion to the simplicity of the result. So I'm wondering whether there's a more elegant way to obtain this result, one that might also work for higher $k$ and might even allow the limit for $k\to\infty$ to be determined.

Numerical results I produced with this code seem to indicate that the downward shift from the average occupancy $\frac n{2k+1}$ increases with $k$, but rather slowly. The numerical results for $k=2$ and $3$, i.e. $5$ and $7$ bins, are around $0.12$ and $0.13$, respectively (compared to $\frac1{2\pi\sqrt3}\approx0.092$ for $k=1$). These estimates could be improved if it helps.