Average squared distance between two points on a disk

413 Views Asked by At

I want to calculate the average distance between two points in D = $\left \{(x,y) \in R^2 / x^2 + y^2 \leq 1\right \}$, I thought that I could use the integral formula: $\frac{1}{m(D)^2} \cdot \int \int_D \int \int_D (x_1 - x_2)^2 + (y_1 - y_2)^2 dx_1 dy_1 dx_2 dy_2$ but I can't find a suitable change of variables to solve this integral. (m(D) is the Lebesgue measure of D)

2

There are 2 best solutions below

1
On

Use the (squared) law of cosines $d^2 = r_1^2 + r_2^2 - r_1 r_2 \cos \theta$, if we integrate over $\theta$, the $\cos \theta$ term vanishes (as pointed out by @J.G):

$$\frac{\int\limits_{r_1 = 0}^1 \int\limits_{r_2 = 0}^1 r_1 r_2 (r_1^2 + r_2^2 )\ dr_1\ dr_2}{\int\limits_{r_1 = 0}^1 \int\limits_{r_2 = 0}^1 r_1 r_2 dr_1\ dr_2} = 1$$

enter image description here

where the denominator is for normalization.

0
On

Since $\cos\theta$ averages to $0$, @DavidG.Stork's approach simplifies to the mean squared distnce being$$\frac{\int_{[0,\,1]^2}r_1r_2(r_1^2+r_2^2)dr_1dr_2}{\int_{[0,\,1]^2}r_1r_2dr_1dr_2}=2\frac{\int_{[0,\,1]^2}r_1^3r_2dr_1dr_2}{\int_{[0,\,1]^2}r_1r_2dr_1dr_2}=2\frac{\int_0^1r_1^3dr_1}{\int_0^1r_1dr_1}=1.$$We can verify this with random points, as long as we remember $r^2,\,\frac{\theta}{2\pi}$ are $U(0,\,1)$ IIDs for a uniform probability density in the circle's interior.