# Calculation of the moments using Hypergeometric distribution

Let vector $a\in 2n$ is such that first $l$ of its coordinates are $1$ and the rest are $0$ ($a=(1,\ldots, 1,0, \ldots, 0)$). Let $\pi$ be $k$-th permutation of set $\{1, \ldots, 2n\}$.
Define
$$g=\left|\sum_{i=1}^n a_{\pi(i)}-\sum_{i=n+1}^{2n}a_{\pi(i)}\right|.$$

Using Hypergeometric distribution calculate /approximate the $q$-th moment $E|g|^q,$ for any $q\ge 2$.

I’ve got that the $q$-th moment is
$$E|g|^q=\sum_{k=0}^l\frac{{l \choose k}{2n-l \choose n-k}(2k-l)^q}{{2n\choose n}}.$$
But now I am stuck…

By comparing the last expression to the probability function of the hypergeometric distribution, you see that $E|g|^q=E(2X−l)^q$, where $X$ is $\rm{Hypergeometric}(2n,l,n).$
Therefore $E(X)=\frac{nl}{2n}=l/2=:\mu$. Thus
$$E|g|^q=E(2X−l)^q={2}^qE(X-l/2)^q=2^qE(X-\mu)^q.$$
Expressed in words, $E|g|^q$ is $2^q$ times the $q$:th central moment of $X$.