Random variable $X$, we have the variance

$$
\begin{align}
Var[X] &= \mathbb{E}[(X - \mu)^2] \\
&= \frac{1}{n} \sum_{i=1}^n (x_i - \mu)^2
\end{align}
$$

Pairwise (squared Euclidean) distance will be
Andrew Gerrand
$$
\begin{align}
\sum_{i \ne j} d(x_i, x_j) &= \sum_{i=1}^n \sum_{j=i+1}^n (x_i - x_j)^2 \\
&= \sum_{i=1}^n \sum_{j=i+1}^n ((x_i - \mu) - (x_j - \mu))^2 \\
&= n \sum_{i=1}^n (x_i - \mu)^2 \\
&= n^2 \mathbb{E}[(X - \mu)^2] \\
&= n^2 Var[X]
\end{align}
$$