Use spherical polar coordinates, and w.l.o.g. choose the polar axis through one of the points. Now the distance between the two points is

sqrt ( r1^2 + r2^2 - 2 r1 r2 cos(theta))

and cos(theta) is (conveniently) uniformly distributed between -1 and

the total integral into two (equal) parts with r1 < r2 and r1 > r2, and it all comes down to integrating polynomials.

More generally, the expectation of the n'th power of the distance between the two points is

2^n . 72 / ((n+3)(n+4)(n+6))

So the various means are

the (arithmetic) mean distance is 36/35 = 1.028571... the root mean square distance is sqrt(6/5) = 1.095445... the geometric mean distance is 2exp(-3/4) = 0.944733... the harmonic mean distance is 5/6 = 0.833333... the inverse root mean inverse square distance is

2/3 = 0.666666...

lib/config.php:156: Notice: Undefined variable: accept

lib/DbaDatabase.php:134: Warning: dba_replace() [<a href='function.dba-replace'>function.dba-replace</a>]: You cannot perform a modification to a database without proper access