# Average dis btwn two points in unit circle

1. Sep 16, 2006

### phoenixthoth

So I tried actually calculating it and came up with a mess. So then I did the unit interval and got 1/3. So, by analogy, it's 1/3 for the unit circle?

Any cute proofs for whatever the correct answer is?

2. Sep 16, 2006

### matt grime

How are you parametrizing the points in the disc? Is it uniform on [0,1] and [0,2pi]? That seems the easiest way to think of the distribution, since you're not going to have an easy time working out what that is in terms of x and y (though a simple substitution from the r, theta case would be do-able).

But it ain't gonna be 1/3 at all, is it? I mean, the unit circle's diameter is 2, not 1.

Anyway, a reasonbly cute idea that might be of assitance is that the sums of the variances of the x and y coords is the expectation of the square of the distance from a point to the centre of the disc. Note the expected distance is 1/2, and you can work out the variance quite easily if you don't know it off the top of your head for a uniform random variable. Indeed, it seems it might be quite easy to work out the expectation of the square of the distance between two points.

3. Sep 16, 2006

### StatusX

Are you looking for the average distance between two points lying inside the unit circle (ie, with r<1 in polar coordinates) or on the unit circle (with r=1)?

If it's the latter, the average distance between any two points on the unit circle is the same as the average distance from a fixed point to another point on the circle. Find the distance from the point at (1,0) to the point at (cos($\theta$),sin($\theta$)), then find the average of this as $\theta$, ranges from 0 to 2 $\pi$.

The former would be harder, so I'll wait till you say whether its the former...

Last edited: Sep 16, 2006
4. Sep 16, 2006

### 3trQN

Wouldnt it approach 0?

There are an infinite number of chords that intersect a circle in the plane, the maximum length is 2r and the minimum is 0.

The average will be 1/infinity * (Sum of all chord lengths), and 1/infinity -> 0.

So the average must be 0?

5. Sep 16, 2006

### matt grime

How can the average distance between two points be zero? Since it is almost always strictly greater than zero this is obviously wrong. You appear to be usign the wrong notion of probability and average for continuous random variables anyway.

6. Sep 16, 2006

### 3trQN

Well I was thinking along these lines:

$$\frac{1}{n}\sum^{n}_{i=1}i=\frac{1}{n}\frac{n(n+1)}{2}=\frac{n+1}{2}$$

I guess while the length of the chord (i think thats what its called isnt it?) approaches 0, the number of them approaches infinity?

for $$n=\infty$$
$$\frac{1}{\infty}\frac{\infty + 1}{2}$$

If only Archimedes was on MSN, life would be sweet.

Last edited: Sep 16, 2006
7. Sep 16, 2006

### StatusX

What you have there would be the average of the integers between 1 and n, and this diverges as n goes to infinity. What does this have to do with the average distance between points on a circle?

8. Sep 16, 2006

### phoenixthoth

Hi Matt

long time no see, huh?

well, i liked all the feedback. it's not so easy, is it?

i guess one might do it for a sector only, a quarter of the unit circle...

find the centroid of a sector and average distances to that point. that should be it. i just forgot the formulas for the centroid... oh well... at least that wouldn't be some nasty multiple integral "too tough" for mathematica...

if anyone wants to pop out the answer, let us know!

9. Feb 24, 2009

### crawfordman

I know this is an old thread, but I'd thought I'd post still. (A friend found it when he was searching for a similar question.

I agree w/ StatusX.
Case 1: Average chord length.

http://ferrismath.com/calc/images/avechordlength.gif

Case 2: Average segment length for two points in the interior of the unit circle.

http://ferrismath.com/calc/images/avesegmentlength.gif

This second case is really a double integral. :)

Well, I think that's correct. Double check and lemme know.

Last edited by a moderator: Apr 24, 2017
10. Feb 25, 2009

### csprof2000

Wow... somebody tell me where I go wrong.

Let a be randomly chosen in the interval [0, 1] and represent r^2. Then let b be chosen in the interval [0, 2PI] (or [0, PI] for that matter, equivalently) be the angle. Then (sqrt(a),b) is a uniform distribution for points on the unit disk.

You have to such pairs (a, b). Call them (a, b) and (a', b'). These are two points selected at random. Rotate both vectors until b = 0 (no problem, right? frame of reference...) So now you have (a, 0) and (a', b'').

The distance between these points can be calculated using the law of cosines.

D^2 = a + a' - 2sqrt(a*a')cos(b'').

Note that a = r^2, a' = r'^2, and b is theta, so this should be true.

Now, try to find the expectation value of D^2.

<D^2> = <a + a' - 2sqrt(a*a')cos(b'')>
<D^2> = <a> + <a'> - 2<sqrt(a*a')cos(b'')>
<D^2> = 1/2 + 1/2 - 2<sqrt(a*a')cos(b'')>
<D^2> = 1 - 2<sqrt(a*a')cos(b'')>

Since for any a and a', b'' can be anything between -PI and PI, cos(b'') has an equal chance of being positive or negative... so

<D^2> = 1 - 2<sqrt(a*a')cos(b'')> = 1 - 0 = 1.

So <D^2> = 1.

Is the average squared distance 1? I know that doesn't really relate to the problem directly, but I thought it was interesting.

11. Feb 28, 2009

### bpet

The second case only counted pairs of points that are on the same circle. For the average distance between all pairs of points you get an integral like
$$\frac{1}{\pi^2}\int_0^{2\pi}\int_0^{2\pi}\int_0^1\int_0^1r_1r_2\sqrt{r_1^2+r_2^2-2r_1r_2\cos(\theta_1-\theta_2)}dr_1dr_2d\theta_1d\theta_2$$
which is approximately 0.96.

Seems to be correct. How do you show that r^2 is uniformly distributed in [0,1] ?

12. Feb 28, 2009

### csprof2000

I define a = r^2 to be distributed uniformly in [0,1]. I choose r^2, and not r, to be uniformly distributed for the usual reason.

13. Feb 28, 2009

### bpet

On second thought perhaps it could be derived via the cdf:

$$P(r\le x)=\frac{\pi x^2}{\pi}=x^2,\quad0\le x\le 1$$
$$P(r^2\le x)=P(r\le\sqrt{x})=x$$