Given $X = \{x_1, x_2, \cdots, x_n\}, n \geq2$ such that $x_1 \lt x_2 \lt \cdots \lt x_n$, could you prove:
$ \frac{1}{n^2}\sum_{1 \leq i \lt j \leq n}(x_i - x_j)^2 \leq \frac{(x_1 - x_n)^2}{4} $
I can easily prove for $n=2, 3, 4, 5$, but I'm failed to do it for an arbitrary $n$.
WLOG, fix $x_1=0,x_n=1.$
$f(x_2,\cdots,x_{n-1}):=\frac{1}{2}\sum_{1\le i<j\le n}(x_i-x_j)^2.$ We only need to prove that $f_{\max}\le \frac{n^2}{8}$ in the area $\{(x_2,\cdots,x_{n-1})|0<x_2<\cdots<x_{n-1}<1\}.$
$$\partial_l f=\sum_{l<j\le n}(x_l-x_j)-\sum_{1\le i<l}(x_i-x_l),\quad\partial_{ls} f=\begin{cases}-1&l\neq s\\ n-1 &l=s\end{cases}.$$
As the Hessian matrix is strictly diagonally dominant, it's positive definite. So the maximum is achieved at the boundary. Inductively, one can show that $f_{\max}=f(0,\cdots,0,1,\cdots,1).$ (The vertex of the convex area $\{(x_2,\cdots,x_{n-1})|0<x_2<\cdots<x_{n-1}<1\}.$)
Back to the inequality, Assume we have $x_1=\cdots=x_m=0,$ $x_{m+1}=\cdots=x_n=1.$
$$ \sum_{1\le i<j\le n}(x_i-x_j)^2=m(n-m)\le \frac{n^2}{4}. $$
This proved the original inequality.