Given an even number of sample points in a plane, I want to compute the sum of squared distances from the sample center as part of estimating the Rayleigh parameter.  One way of doing it is to compute the sample center ($\bar{x}, \bar{y}$), then $r_i = \sqrt{(x_i - \bar{x})^2 + (y_i - \bar{y})^2}$ and then I compute $\sum{r^2}$.

It would be very convenient if I could instead just draw the sample points 2 at a time (without replacement), measure their distance $d_{ij} = \sqrt{(x_i - x_j)^2 + (y_i - y_j)^2}$, and find a function *f* that gives $\sum{r^2} = f({d})$.

I've tested a few sets and it appears that $\sum{r^2} = \sum_{i=1,j=n/2+1}^{i=n/2,j=n}\sqrt{\frac{(x_i-x_j)^2+(y_i-y_j)^2}{2}}$ works, but I have not been able to prove this.  Is that equation correct?