Recently my research needs to calculate the close form of $\mathsf{E}[|X-\frac{n}{2}|]$ where $X$ follows binomial distribution with parameter $(n,p)$. When $p=\frac{1}{2}$, this is just the mean absolute deviation (MAD) and has close form, see this paper for more details. But when $p\neq\frac{1}{2}$ the close form seems to become tricky. I come up with an idea that we can try to calculate $\lim_{t\rightarrow 2}\mathsf{E}[(X-\frac{n}{2})^\frac{2}{t}]$, but I'm also not familiar with the fractional moment. Any references or ideas would be appreciated.
Thanks in advance.