Wednesday, 14 November 2012

A Slightly More Mathematical Look at the Bertrand (Probability) Paradox



I’ve looked at this a little less rigorously in A Circle, a Triangle and Some Random Lines and The Circle, Triangle and Random Line with an Answer.  If you are unaware of the Bertrand Paradox, please look at the first of these to see a framing of the problem and the latter for a description of the solutions.


I don’t intend to look again at the method of solving the problem that uses a randomly selected radius and results in a probability of p=1/2, since that is not contentious (unless you follow the thinking of Božur).  Instead I am going to focus on the two solutions which, normally result in probabilities of p=1/4 and p=1/3, with a particular focus on the latter.


In The Circle, Triangle and Random Line with an Answer, I showed that the standard solution to the problem that results in p=1/4 makes an assumption as to how one approximates points that are selected at random and then used as midpoints of a chord.


A very rough approximation of points would be like this:




For a circle of radius r, midpoints that lie inside a smaller circle of radius r/2 will define a chord of greater than 3.r (the length of the sides of an equilateral triangle with all three corners lying on the circumference of the larger circle).  Thus:


If the midpoint lies in the light green area, the resultant chord will be longer than 3.r.  With this very rough level of granularity, the apparent probability of selecting a midpoint which results in a longer chord appears to be zero (although we might quibble about the placement of the point).

There are two ways to further divide the area inside the circle in order to more accurately approximate points (one implying polar co-ordinates, the other cartesian co-ordinates):


These intermediate approximations give you p=1/2 (8/16) and p=1/4 (4/16), but neither seems perfect.  The approximation by radial division has much smaller areas within the r/2 circle and the approximation by Cartesian division has variable sizes and some segments which cross zones.  Nevertheless, let us crack on and look at finer approximations (from which the dots are eliminated and I will instead mark with orange those areas which correspond with the midpoint of a chord which is longer than 3.r):


These approximations result, again, in p=1/2 (64/128) and p=1/4 (12/48).  (I eliminated any segment under half the regular size and considered the half-half segments to be on the borderline and eliminated those too.)  These results don’t vary with increasing segmentation.  For example, using a finer granularity:


On the left, there are 256 segments in the inner circle and 256 in the outer area, giving p=1/2.  On the right, there are 52 qualifying segments in the inner circle and 156 in the outer area making 208 segments in all, giving a value of p=1/4.

If you’re really keen, you might want to try counting the segments on the one below.  I personally could not be bothered to count them but I do know that the radially segmented equivalent has 2048 segments, 1024 of which are in the inner circle.


The bottom line here is that your probability varies depending on your granularity scheme.  As mentioned in a previous article, the radial divisions might seem wrong, but I rather suspect that they are the “correct” way to divide up the area of the circles for the purposes of solving this problem.

That all said, no-one seems to agitate for the p=1/4 result to be the correct one.  The same cannot be said for the p=1/3 result, which has a champion in Božur.

My argument against the p=1/3 result is that is relies on a special case, the selection of two points on the circumference of the circle to define a chord.

If this case is generalised such that any two points anywhere may be selected, so long as the resultant line crosses the circle.  I illustrated this thus:


I argued that any line originating from a distant point that lies in the middle two wedge-like segments, on each side of the line which passes through the locus of the circle, will create a chord that is longer than 3.r.  In other words, half the possible chords will be longer, resulting in p=1/2.

I provided a piece of graphical (albeit slightly wonky looking) proof:


I now just want to tighten this up a little by showing that the mathematics works.

Say we have a circle of radius r and select a point at R*r from the locus of the circle.  Further say that the circle’s locus lies on the origin (0,0) and the distant point is on the x-axis at (R*r,0).  Then we take a tangent from the circle that passes through this distant point.  Then draw another line between the tangent and the nominal x-axis.

It’ll look a bit like this (click on it to see a larger version):

To calculate the value of m and c from the red line (y=mx+c), we can use the points at which the line crosses the nominal x and y axes:

m = y(when x=0)/x(when y=0)

c = y(when x=0)

So:

m = r/2/√(1-1/R2)/(R*r) = 1/2R/√(1-1/R2)

c = r/2/√(1-1/R2)

But as R->∞, 1/R->0, so:

m = 0

c = r/2

Which is a line with zero gradient passing through the circle at half the radius, like this:

Therefore, half the possible pairs of points result in a chord (ie intersecting with the circle) that will be longer than r.√3 and hence p=1/2.

To calculate a few results from different values of R, we need to use the following facts (included for completeness - if you are mathematically inclined, you’ll either know these or remember them from those glorious days in mathematics classes/lectures):

A line intersects a circle when the values of x and y satisfy both

y2 + x2 = r2

and

y = mx + c

--------------

Thus

(mx + c)2 + x2 = r2

and so

(m2 + 1).x2 + (2mc)x + (c2 – r2) = 0

--------------

And a quadratic equation in the form

α.x2 + β.x + γ = 0

is given by

x = (-β ± 2 - 4α.γ)/2α

--------------

And the distance between two points is given by

chord = ((y2-y1)2 + (x2 – x1)2)

--------------

From these, the following table was populated:

r
10
R
2
4
8
16
32
64
128
256
m
-0.288675
-0.129099
-0.062994
-0.031311
-0.015633
-0.007813
-0.003906
-0.001953
c
5.7735027
5.1639778
5.0395263
5.0097943
5.0024432
5.0006105
5.0001526
5.0000381
α
1.0833333
1.0166667
1.0039683
1.0009804
1.0002444
1.0000611
1.0000153
1.0000038
β
-3.333333
-1.333333
-0.634921
-0.313725
-0.156403
-0.078144
-0.039065
-0.019532
γ
-66.66667
-73.33333
-74.60317
-74.90196
-74.97556
-74.99389
-74.99847
-74.99962
x1
-6.455619
-7.862545
-8.309818
-8.495063
-8.579956
-8.620656
-8.64059
-8.650455
y1
7.6370794
6.179028
5.5629957
5.2757851
5.1365705
5.0679676
5.0339059
5.0169337
x2
9.5325422
9.1740204
8.9422293
8.808481
8.7363204
8.698795
8.679654
8.6699867
y2
3.0216948
3.9796169
4.4762188
4.7339901
4.8658715
4.9326428
4.9662467
4.9831045
chord
16.641006
17.17795
17.286244
17.312024
17.318392
17.319979
17.320376
17.320475
r.√3
17.32050808
delta
0.67950
0.14256
0.03426
0.00848
0.00212
0.00053
0.00013
0.00003
%
4.0833%
0.8299%
0.1982%
0.0490%
0.0122%
0.0031%
0.0008%
0.0002%

In other words, you don’t have to get that close to infinity before the probability of a chord being longer than r.3 begins to approach p=1/2.

---------------------------------

Just out of interest, I ran a simple spreadsheet simulation and over 20 samples of 50,000 random values of R between ±1x1015 and random multiplications of 2θ between 0 and 1, 49.99062% of the resultant chords were longer than r.3.

It looked like this, with many more rows (click to see a larger version):



My results had an experimental error of 0.0938%.  For a 99.9999% certainty that my hypothesis is true with a population of one million samples, to the best of my knowledge, I am allowed an experimental error of 0.098%.

Therefore, I consider my hypothesis that p=1/2 to be true.

No comments:

Post a Comment

Feel free to comment, but play nicely!

Sadly, the unremitting attention of a spambot means you may have to verify your humanity.