random distribution of distances between points on a circle

608 Views Asked by At

Using a uniform distribution generate a set of numbers over $\left(0,2\pi\right)$. Convert it to coordinates on a circle with a center in the origin and $r = 1$. Now measure the distribution of distances between two different points. Sort the results. What is the shape of the resulting curve ? Distribution looks like this:

enter image description here

Both picture and calculation for a pair of points yield this distribution: $\,\sqrt{\, 1 - \cos\left(x\right)\,}\,$. Is this correct or am I missing something ?.

1

There are 1 best solutions below

1
On BEST ANSWER

Some of your pairs of points should be on opposite sides of the circle, shouldn't they? The distance between those points should be about 2, so that makes you distribution a little suspicious.

Here's one way to look at it: Pick a point on the circle. That is, pick an angle. Now pick a second point/angle. The difference in the two (uniformly distributed) angles is just another (uniformly distributed) angle, so we don't really need two points (two angles). We can just pick the angle between the two points from our random distribution.

The randomly selected angle between the two points is, actually, the arc length between the two points. But, we want the chord length. The length of the chord subtended by the angle is $2\sin\frac{\theta}{2}$, which is easily verified from a sketch. Thus the distribution of distances should look like a sine curve from zero to $\pi$ with height 2.

If we apply the half-angle formula, we can also get the distribution in terms of $\sqrt{1-\cos\theta}$.