25

Romeo and Juliet are each placed uniformly at random locations on a spherical planet, meaning that each square meter of surface area of the planet is equally likely.

Romeo decides to dig a straight-line tunnel through the planet towards Juliet.

What is the most likely distance Romeo has to dig?

In other words, what is the mode of the probability distribution of straight-line distances?

xnor
  • 26,756
  • 4
  • 85
  • 144
Johannes
  • 4,392
  • 19
  • 43
  • 3
    when they are standing 1 meter apart, I guess that it means a straight-line tunnel of 1 meter even though he doesn't actually have to dig? – Ivo Dec 30 '14 at 11:40
  • 1
    @IvoBeckers Pedant! :-) – Rand al'Thor Dec 30 '14 at 11:43
  • 2
    I wonder if it is even possible to distribute points evenly on a sphere. I don't think there is a universal method to this. Of course you could take a random latitude and a random longitude but that will result in the points near the poles being closer to each other than near the equator – Ivo Dec 30 '14 at 12:13
  • 2
    @IvoBeckers You may be interested in reading this question, there is also an interesting article on MathWorld. – GOTO 0 Dec 30 '14 at 12:20
  • We should probably assume a completely solid planet. It's not possible to dig a tunnel through a liquid. The Earth, for example, has a liquid outer core. – vsz Dec 30 '14 at 15:04
  • 2
    I ran a computer simulation selecting 1 billion pairs of points on the surface of a sphere of diameter=1. The results indicate the mean is 2/3 and the mode is 1. – David Dubois Dec 30 '14 at 16:30
  • 1
    Indeed, the average (mean) distance to dig is smaller: I believe it's $\frac 4 3 r$, on a sphere of radius $r$. On the unit sphere, it's half of $\int_0^2 \sqrt{2x} , dx = \frac 1 3 (2x)^{3/2} \big|_0^2 = \frac 8 3$. – Nick Matteo Dec 31 '14 at 03:10
  • Isn't the probability of any given length 0? Doesn't this fact make the mode undefined? – Quinn Culver Jan 21 '15 at 20:17

4 Answers4

18

Answer: The most likely distance is the diameter of the planet, when Romeo and Juliet are antipodal.


Assume WLOG Romeo is on the North Pole. Juliet's position is uniformly random on the sphere.

Lemma 1: For the uniform distribution over the sphere, the marginal distribution over the $z$ coordinate is also uniform.

This is a surprising and non-obvious fact about spheres. It's not true for circles or for higher dimensions.

In other words, if you make a slice of an apple that's a fixed width, you always get the same amount of peel. Slices closer to the poles will have a smaller radius, but the peel will be tilted inwards letting more of it fit, and these two effects exactly compensate.

enter image description here

(In this picture, the slices are different widths, but I hope it gets the idea across.)

Proof

See the calculation from Mathworld for the surface area of a zone.

enter image description here

The surface area is computed to be $2 \pi r h$ (where $r$ is the sphere's radius), which is proportional to the thickness $h$ and independent the position of the slice given by $a$ and $b$.


So, Juliet's position can be randomly generated by picking a uniformly random $z$-coordinate. Therefore, the most likely distance is the one corresponding to the infinitesimal slice $\mathrm{d}z$ that compresses to the smallest range of distances $\left| \mathrm{d}D \right|$, maximizing the probability density. This problem is unchanged if we instead consider points on a two-dimensional circle.

The distance $D$ between Romeo's position $(0, r)$ and Juliet's position $(\sqrt{r^2-z^2},z)$ is given by

$$D^2 = r^2 - z^2 + (z-r)^2 = 2r(r-z)$$

Then, taking the derivative with respect to $z$ gives

$$2 D \thinspace \mathrm{d}D = -2r \thinspace \mathrm{dz}$$

and so the infinitesimal range of distances

$$ \left| \mathrm{d}D \right| = r \thinspace \mathrm{dz} / D $$

This is minimized when $D$ is maximized. So, the most likely distance is the maximum one of the diameter, when Romeo and Juliet are antipodal.

We've also shown that the distribution of distance squared is uniform.

xnor
  • 26,756
  • 4
  • 85
  • 144
  • I don't have time to read your answer in full yet, but lemma 1 appears to be in error. The z coordinate is not equal to latitude. – frodoskywalker Dec 30 '14 at 16:05
  • @frodoskywalker You're right, I mistakenly thought the latitude was uniform in height rather than angle. The lemma is true about heights and not latitudes. – xnor Dec 30 '14 at 16:07
  • Nice to see this conclusion being arrived at this way. Well done! – Johannes Dec 30 '14 at 16:27
  • So at D=0 the probability distribution of the distance is least dense, is that right? – Francis Davey Dec 30 '14 at 17:27
  • @FrancisDavey Indeed, and the density is 0. A tiny decrease in height causes a large increase in distance. – xnor Dec 30 '14 at 17:42
  • North pole and South pole are equally probable, so the situation when they are at the same point is as likely as the antipodal. – Hubert OG Apr 14 '16 at 18:09
11

Wlog, have Romeo at the North pole; consider that latitude zero. Latitudes increase from there to $\frac{\pi}{2}$ at the equator and ${\pi}$ at the South pole. I will assume that the planet has radius $1$, because that's all going to cancel. For a distance $x$, latitude ${\theta}$ is such that ${x}^2 = \sin^2{\theta} + (1 - \cos^2{\theta})$ (apologies for a lack of justifying diagram here).

Population density at distance $x$ will be proportional to $\sin{\theta}$ (which governs the size of the circle at distance $x$), and also proportional to $\frac{d\theta}{dx}$, how much latitude you cover for a given increase in $x$.

Substituting $\sin^2\theta + \cos^2\theta = 1$ into the distance equation, we get $\cos\theta = 1 - \frac{x^2}{2} = p$. So $\theta = \cos^{-1}p$, and $\sin\theta = \sqrt{1 - p^2}$.

Using the chain rule, $\frac{d\theta}{dx} = \frac{d\theta}{dp}.\frac{dp}{dx}$. So population density at distance $x$ is proportional to $\sin\theta.\frac{d\theta}{dp}.\frac{dp}{dx}$

From the definition of $p$, $\frac{dp}{dx} = -x$

Also, $\frac{d}{dx}(\cos^{-1}x) = \frac{-1}{\sqrt{1 - x^2}}$

So population density is proportional to $ \sqrt{1 - p^2}.\frac{-1}{\sqrt{1 - p^2}}.(-x) = x$

So the further away you get, the higher the population. The mode, therefore, must be $2$ - the maximum distance.

Intuitively, this must be because at the South pole, you can move a long way without changing your distance to the North pole much. I am very surprised to see a linear relationship drop out of that, though.

(Although I can't say I'm surprised to see someone has beaten me to it).

ABcDexter
  • 7,262
  • 4
  • 42
  • 84
Callidus
  • 3,064
  • 1
  • 16
  • 16
  • +1 Well done. Unfortunately, I can accept only one answer. Decided to accept the first correct answer. – Johannes Dec 30 '14 at 16:28
10

Edit: as noted by others, this answer is incorrect. It assumes (incorrectly) that the distance to the modal latitude is the modal distance.

$\frac{d}{\sqrt{2}}$

Assume, wlog, that Romeo is at the north pole. Form latitudinal rings, composed of the land equidistant from Romeo. The equatorial one is largest. Therefore, we just need the straight line distance to the equator, which is $\frac{d}{\sqrt{2}}$

frodoskywalker
  • 7,369
  • 1
  • 30
  • 49
  • This is incorrect. – Johannes Dec 30 '14 at 12:00
  • @Johannes can you elaborate? Are you perhaps viewing the pre-edit answer? – frodoskywalker Dec 30 '14 at 12:12
  • I think your answer would only be correct in a 2D world with a circle shaped planet asking the same question – Ivo Dec 30 '14 at 12:37
  • Oh wait, I was thinking about the mean. But the OP asks for the mode and in that case I think you are correct – Ivo Dec 30 '14 at 12:41
  • @frodoskywalker - hint: think in terms of areas (ribbons), rather than lengths (rings). – Johannes Dec 30 '14 at 12:43
  • @Johannes are you implying that each latitudinal ribbon will have equal area (1m, with the ones nearer the equator being thinner) and thus equal probability of being occupied? – frodoskywalker Dec 30 '14 at 13:09
  • 1
    @Johannes I think this is the correct answer. Start with a ring of squares around the equator, each being one square metre. Then make a ring of trapezoids above this ring, still with one square metre each of area. These need to be trapezoids because as you move towards the poles, they need to get narrower. Since they are still each one square metre, there must be less of them in each row as you get closer to the poles. Thus, the ring at the equator is the largest. – Trenin Dec 30 '14 at 13:44
  • 1
    @Trenin That shows that the most probable latitude (the mode of the random variable "latitude") is the equator. However, this does not directly mean that the most probable distance (the mode of the random variable "distance to north pole") would be the distance to the equator. – JiK Dec 30 '14 at 13:48
  • 1
    For example, let $X$ be drawn from the uniform distribution over $[0,1]$. The mode of the random variable $Y=\sqrt{X}$ is $1$, but the mode of the random variable $Y^4$ is $0$. – JiK Dec 30 '14 at 13:52
  • 1
    @FrancisDavey There are zero Juliets on the equator. The equator is a single line, so there is zero probability that Juliet lives there. This is not just nitpicking. To find the probability distribution function at distance $d$, you have to compute the amount of Juliets whose distance from you lies in a small interval of length $\epsilon$ surrounding $d$, divide that by $\epsilon$, and then take the limit as $\epsilon \to 0$. This is why Johannes said to think in ribbons, not rings. I can confirm that the equator answer is incorrect. – Lopsy Dec 30 '14 at 14:22
  • @JIK I understand what you are saying, but in this case, the the most probable latitude (the equator) also gives the most probable distance because the distance is a function of the latitude, and this function is a bijection. – Trenin Dec 30 '14 at 14:34
  • 1
    @Lopsy Then put in an answer. – Trenin Dec 30 '14 at 14:35
  • 2
    @Lopsy but there are many Jullietts in the ring of 1 square metre squares that run around the sphere at the equator. In fact, there are the more Jullietts in this ring than in any other ring. – Trenin Dec 30 '14 at 14:38
  • @Trenin did you not just see JiK's example of a bijection between two sets where the bijection does not take one mode to the other? And no, you are wrong, but this time you're wrong for the right reasons. Draw all the ribbons the way they're supposed to be drawn and think geometrically. – Lopsy Dec 30 '14 at 14:40
  • 1
    @Lopsy Ah! OK. I see why JiKs example fails now. I did read his example, but I obviously didn't get it before I added my comment. Still struggling with why the equator wouldn't give the mode for the distance though. – Trenin Dec 30 '14 at 14:49
  • 1
    @Trenin Awesome! Yeah, this problem is tricky. You've passed the hardest part, which is to understand how the equator can possibly not be the answer :) – Lopsy Dec 30 '14 at 14:57
  • Could someone explain JiK's example to me? I don't get it. Why is the mode of Y 1? I don't understand – Ivo Dec 30 '14 at 15:04
  • @Lopsy, I've started by using spherical coordinates, but that will not give the right answer I think because it doesn't take into account surface area probability. Random distributions using spherical coordinates will not be uniform - there will be concentrations at the poles. – Trenin Dec 30 '14 at 15:04
  • @Trenin Protip: suppose you take a bread slicer, with equally spaced blades, and use it to cut a spherical cantaloupe. Then every slice of the cantaloupe will have the same amount of rind(!!) – Lopsy Dec 30 '14 at 15:10
  • @Lopsy this is true, but a portion closer to the poles contains a greater range of latitudes (ie a greater range of tunnel lengths) than a portion closer to the equator. – frodoskywalker Dec 30 '14 at 16:01
4

A short argument based on a beautiful equation giving the area of a spherical cap, runs as follows:

For a spherical planet, regardless its diameter, the surface area reachable by a tunnel with length not exceeding $x$ is $\pi x^2$. So the area reachable by tunnels ranging in length from $x$ to $x+dx$ is $2 \pi x dx$. The mode (most likely $x$ value) is reached at maximum $x$ equal to the diameter of the planet.

So although only one unique position is antipodal to Romeo's position, it does correspond to the most likely tunnel length.

Johannes
  • 4,392
  • 19
  • 43
  • 1
    There's something tantalizing in that the area reachable by straight-line distance $x$ on a sphere is the same as than on a plane. I wonder if there's a neat reason for this that doesn't require calculation. – xnor Dec 30 '14 at 23:58
  • @xnor - seems a kind of a mathematical "coincidence" as this holds true for the area of a cap on a 2-sphere in 3D space but not for higher dimensions. – Johannes Dec 31 '14 at 05:03
  • The 2-sphere also has the coincidence that a uniform distribution has uniform marginal in one coordinate. Are these two coincidences perhaps one and the same? – xnor Dec 31 '14 at 14:02
  • @xnor - yes, it's one and the same relationship: having a uniform marginal is equivalent to stating that the area of a spherical cap is proportional to the radius times the thickness of the cap, and twice the radius times thickness is nothing else than the "tunnel length". – Johannes Jan 03 '15 at 12:05
  • @xnor - I mean "the square of the tunnel length". – Johannes Jan 03 '15 at 12:50