# MX2 Marathon (1 Viewer)

#### sharky564

##### Member
This is a good question that utilizes Ext 1 mathematics (and a bit of thinking outside the box):

What is the average chord length in a unit circle? I.e. if you randomly drew an infinite amount of chords within the unit circle, what would be the average length of those chords?

A few years back, I was offered a job as a financial trader. In the initial stages of the selection process, we had to pass a math test consisting of 5 questions. I don't remember the others, but this one stuck with me since it was super interesting.
I believe its $\bg_white \frac{4}{\pi}$?

#### DrEuler

##### Member
I believe its $\bg_white \frac{4}{\pi}$?
You sure it's constant for circles of any radius?

#### sharky564

##### Member
You sure it's constant for circles of any radius?
He says its a unit circle. Of course, for a circle of radius $\bg_white R$, the answer is just $\bg_white \frac{4R}{\pi}$.

#### DrEuler

##### Member
He says its a unit circle. Of course, for a circle of radius $\bg_white R$, the answer is just $\bg_white \frac{4R}{\pi}$.
That's me not reading questions properly again lol.

#### TheOnePheeph

##### Active Member
I believe its $\bg_white \frac{4}{\pi}$?
You get 4/pi if you use the angle as the parameter, but if you use the perpendicular distance from the center to the chord you get pi/2, which I find kind of weird. Two different definitions of average or something I guess?

#### blyatman

##### Well-Known Member
4/pi sounds about right. Been a while so I can't remember.

But the average definition used is:
$\bg_white \bar{L}=\frac{1}{2\pi}\int_0^{2\pi}L(\theta)\,d\theta$

#### TheOnePheeph

##### Active Member
4/pi sounds about right. Been a while so I can't remember.

But the average definition used is:
$\bg_white \bar{L}=\frac{1}{2\pi}\int_0^{2\pi}L(\theta)\,d\theta$
Yeah thats the way I did it with the angle as the parameter, which gives 4/pi. I still find it weird though that it yields a different answer with distances, using:
$\bg_white \bar{L}=\frac{1}{2}\int_{-1}^{1}2\sqrt{1-h^2}dh$
Oh well, the angle way is more intuitive anyway lol.

#### blyatman

##### Well-Known Member
You get 4/pi if you use the angle as the parameter, but if you use the perpendicular distance from the center to the chord you get pi/2, which I find kind of weird. Two different definitions of average or something I guess?
I found this which offers some explanation: https://www.physicsforums.com/threads/average-chord-length-of-a-circle.929479/

They claim the answer is 4/pi. The article goes into a bit of detail, but I don't think it's necessary.

In the calculation, they use "u" as the perpendicular distance to the chord. Now, this part doesn't sit right with me: imagine the question was phrased as: calculate the average length of all horizontal chords on the circle. The calculation, and hence the answer, would be remain unchanged. I.e. the average length of all horizontal chords is the same as the average length of all chords. So, do we expect this to be the case? Intuitively I would expect it to be the same, but at the same time I'm not entirely convinced. If we were to reduce the problem to a semi-circle, the average chord length would not be the same as the average horizontal chord length since you can't have angled chords that have a length equal to the diameter. As a result, I think there's an inherent flaw in this method. But, maybe it might work with a full circle? I'm not 100% sure, but either way, it's pretty interesting to think about.

Either way, I remember verifying the 4/pi answer by writing a simple Matlab script to compute the average of a million random chords lengths.

Last edited:

#### TheOnePheeph

##### Active Member
I found this which offers some explanation: https://www.physicsforums.com/threads/average-chord-length-of-a-circle.929479/

They claim the answer is 4/pi. The article goes into a bit of detail, but I don't think it's necessary.

In the calculation, they use "u" as the perpendicular distance to the chord. Now, this part doesn't sit right with me: imagine the question was phrased as: calculate the average length of all horizontal chords on the circle. The calculation, and hence the answer, would be remain unchanged. I.e. the average length of all horizontal chords is the same as the average length of all chords. So, do we expect this to be the case? Intuitively I would expect it to be the same, but at the same time I'm not entirely convinced. If we were to reduce the problem to a semi-circle, the average chord length would not be the same as the average horizontal chord length since you can't have angled chords that have a length equal to the diameter. As a result, I think there's an inherent flaw in this method. Pretty interesting to think about nonetheless.

Either way, I remember verifying the 4/pi answer by writing a simple Matlab script to compute the average of a million random chords lengths.
Oh right, so it has to do with the different probability distributions of the chords. But yeah I would imagine (not 100% sure) the average of any chord would be the same as the average of all horizontal chords, because you can do the exact same infinite set of chords at any inclanation from the horizontal on a circle, which is why just doing it with the angles gives the right answer of 4pi/3. It goes quite deep lol.

#### stupid_girl

##### Active Member
Yeah thats the way I did it with the angle as the parameter, which gives 4/pi. I still find it weird though that it yields a different answer with distances, using:
$\bg_white \bar{L}=\frac{1}{2}\int_{-1}^{1}2\sqrt{1-h^2}dh$
Oh well, the angle way is more intuitive anyway lol.
h is not uniformally distributed. You need to take into account the probability density function of h.

Last edited:

#### blyatman

##### Well-Known Member
h is not uniformally distributed. You need to take into account the probability density function if h.
Lol completely forgot about that. Yes, this sums it up perfectly.

#### TheOnePheeph

##### Active Member
h is not uniformally distributed. You need to take into account the probability density function if h.
Lol I don't know anything about uni probability but I'll take your word for it

#### blyatman

##### Well-Known Member
Lol I don't know anything about uni probability but I'll take your word for it
It's essentially just saying that $\bg_white \theta$ is uniformly distributed, resulting in in a uniform distribution of lengths.

Consider this example: Suppose you wanted to plot an equal number of points around a unit circle. If you calculated the (x,y) coordinates from equal increments of theta, you'll end up with a uniform distribution of points. Now, try doing it by generating the y coordinates from equal increments of x coordinates. You'll find that the points aren't uniformly distributed - if you were to imagine plotting a huge number of points around the circle, most of the points will be skewed away from the left and right ends, because a small change in x there will lead to a large change in y (since the circle is very steep at x = +-1). In this case, the points are not uniformly distributed because the probability of picking a point with a small y value (near zero) will be much smaller than picking a point with a large y value (near 1) since most of the points have y-values skewed towards 1.

In our case, parameterisation by theta is correct since theta results in a uniform distribution. If you try to parameterise by h, you're more likely to get a longer chord length than a shorter chord length due to the steepness of the circle when h is small (this is analogous to the example above if you try to parameterise using x). When h is small, small changes to h result in small changes in L. When h is large, small changes in h result in large changes in L. Thus, the chord lengths are more skewed towards the larger values since there's a lot more closely spaced L values when h is small. This is also evident from the calculation: parameterisation by theta results in a value of 4/pi = 1.27, whereas parameterisation by h results in a value of pi/2 = 1.57. The value is significantly larger due to this skewed distribution.

Last edited:

#### TheOnePheeph

##### Active Member
It's essentially just saying that $\bg_white \theta$ is uniformly distributed, resulting in in a uniform distribution of lengths.

Consider this example: Suppose you wanted to plot an equal number of points around a unit circle. If you calculated the (x,y) coordinates from equal increments of theta, you'll end up with a uniform distribution of points. Now, try doing it by generating the y coordinates from equal increments of x coordinates. You'll find that the points aren't uniformly distributed - if you were to imagine plotting a huge number of points around the circle, most of the points will be skewed away from the left and right ends, because a small change in x there will lead to a large change in y (since the circle is very steep at x = +-1). In this case, the points are not uniformly distributed because the probability of picking a point with a small y value (near zero) will be much smaller than picking a point with a large y value (near 1) since most of the points have y-values skewed towards 1.

In our case, parameterisation by theta is correct since theta results in a uniform distribution. If you try to parameterise by h, you're more likely to get a longer chord length than a shorter chord length due to the steepness of the circle when h is small (this is analogous to the example above if you try to parameterise using x). When h is small, small changes to h result in small changes in L. When h is large, small changes in h result in large changes in L. Thus, the chord lengths are more skewed towards the larger values since there's a lot more closely spaced L values when h is small. This is also evident from the calculation: parameterisation by theta results in a value of 4/pi = 1.27, whereas parameterisation by h results in a value of pi/2 = 1.57. The value is significantly larger due to this skewed distribution.
Ahhhhhhh that makes so much more sense. I was thinking it may have something to do with that uneven distribution of chord lengths with perp distance, but didn't know how to put it into words or even if that was a thing. Thanks for clearing up that misconception

#### HeroWise

##### Active Member
@blyatman i did that circle question for a programming competition lmao

#### blyatman

##### Well-Known Member
@blyatman i did that circle question for a programming competition lmao
Haha noice, was it for a job as well? Or a school thing?

Last edited:

#### stupid_girl

##### Active Member
Let's have another geometry problem. This should be simpler than the one yesterday.

O is a point inside equilateral triangle ABC such that 6∠OAB=3∠OBC=2∠OCA. Find OA:OB.

#### TheOnePheeph

##### Active Member
Let's have another geometry problem. This should be simpler than the one yesterday.

O is a point inside equilateral triangle ABC such that 6∠OAB=3∠OBC=2∠OCA. Find OA:OB.
Is the answer $\bg_white \frac{\sqrt{6} + \sqrt{2}}{2}$?

#### stupid_girl

##### Active Member
Is the answer $\bg_white \frac{\sqrt{6} + \sqrt{2}}{2}$?
Yes.

#### TheOnePheeph

##### Active Member
Sweet. I basically solved it using sine rule on the different triangles:
$\bg_white \text{Let} \angle{OAB} = \theta$
$\bg_white \angle{OBC} = 2\theta$
$\bg_white \angle{OCA} = 3\theta$
$\bg_white \text{Now} \angle{ABC}=\angle{BAC}=\angle{BCA}=60 \text{ , since triangle is equilateral}$
$\bg_white \angle{OBA} = 60 - 2\theta$
$\bg_white \text{By using sine rule on triangle OBA:}$
$\bg_white \frac{OA}{OB}=\frac{\sin\left(60-2\theta\right)}{\sin\theta}$
$\bg_white \text{By using similar results on Triangle OBC and Triangle OAC, we get:}$
$\bg_white \frac{OA}{OC} = \frac{\sin3\theta}{\sin\left(60-\theta\right)}$
$\bg_white \frac{OC}{OB} = \frac{\sin2\theta}{\sin\left(60-3\theta\right)}$
$\bg_white \text {Multiplying these two results together:}$
$\bg_white \frac{OA}{OB} = \frac{\sin2\theta\sin3\theta}{\sin\left(60-3\theta\right)\sin\left(60-\theta\right)}$
$\bg_white \therefore \sin\theta\sin2\theta\sin3\theta = \sin\left(60-3\theta\right)\sin\left(60-2\theta\right)\sin\left(60-\theta\right)$
$\bg_white \therefore \theta = 15$
$\bg_white \therefore \frac{OA}{OB} = \frac{\sin30}{\sin15}$
$\bg_white \sin15 = \frac{\sqrt{6}-\sqrt{2}}{4}$
$\bg_white \therefore \frac{OA}{OB} = \frac{2}{\sqrt{6}-\sqrt{2}}$
$\bg_white = \frac{\sqrt{6}+\sqrt{2}}{2}$

I feel like there may be a cleaner way of doing it lol, but this is the way I saw.