This is the problem I had encountered
Statistic $G_k$, defined for $k=1,2$ as $$G_k= \frac 1{n(n-1)}\sum^n_{i=1}\sum^n_{j=1}|X_i - X_j|^k$$
was proposed as a measure of variation by Jordan (1869).
Show that $G_2=2S^2$, where $S^2 = \frac 1{n-1}\sum^n_{i=1}(X_i-\bar X)$.
I had tried few ways to obtain desired result.
1) Adding and subtracting $ \bar X$ That did not lead me anywhere. Or, to be honest, I did not know what to do after I multiply that between themselves.
2) So. I think, that we do not need absolute value, as we are squaring the $X_i - X_j$.
I added sums to each variable.
$$G_2=\frac 1{n(n-1)} \left( n\sum_{i=1}^nX_i^2-2\sum_{i=1}^nX_i\sum_{j=1}^nX_j + n\sum_{j=1}^nX_j \right)$$
and then it seemed to me that I am moving in circles.
I had tried to do $\bar X$ from $X_j$ by dividing it with $n$, and got to
$$\frac 1{n-1} \left[\left(\sum^n_{i=1}X_i - n\bar X \right)^2 + 2(n-1) \bar X \right]$$
...what MIGHT be right, but I guess it is useless anyway.
Could you please explain me, what is the right way to proove this?
We have $$G_2 = \frac{1}{n(n-1)}\sum^n_{i=1}\sum^n_{j=1}|X_i - X_j|^2$$
We are squaring the brackets, so there is no need for absolute value. We can multiply that.
$$\frac{1}{n(n-1)}\sum^n_{i=1}\sum^n_{j=1}(X_i^2 - X_iX_j+X_j^2)$$
We also can assign the sums to each variable. It should be noted, that $\sum_{i=1}^n\sum_{j=1}^nX_i=n\sum_{i=1}^nX_i$.
$$\frac{1}{n(n-1)} \left( n\sum^n_{i=1}X_i^2 -2\sum^n_{i=1}X_i\sum^n_{j=1}X_j + n\sum^n_{j=1}X_j^2 \right) $$
And this is the place where magic happens. We can divide it by n.
$$\frac{1}{n-1} \left( \sum^n_{i=1}X_i^2 -2\sum^n_{i=1}X_i \bar {X} + \sum^n_{i=1}\frac{X_1^2}{n} +... +\sum^n_{i=1}\frac{X_n^2}{n} \right) $$
We can see that we have $2\sum X_i^2$, so now we can factor out 2. We can also add and subtract $\sum X_i \bar X$
$$\frac{2}{n-1} \left( \sum^n_{i=1}X_i^2 -\sum^n_{i=1}X_i \bar {X} \right)$$ We can also add and subtract $\sum X_i \bar X$ $$ \frac{2}{n-1} \left( \sum^n_{i=1}X_i^2 -2\sum^n_{i=1}X_i \bar {X} +\sum^n_{i=1}X_i \bar {X} \right) $$ We plug following equation into the previous result $$\sum^n_{i=1}X_i\bar {X} = n \frac{X_1+...+X_n}{n}*\frac{X_1+...+X_n}{n}=n\bar X^2=\sum_{i=1}^n \bar X^2 $$
And this already gives us desired result
$$2* \frac{1}{n-1}\sum_{i=1}^n(X_i-\bar X)^2=2S^2$$