6

Suppose that we choose three points independently and uniformly at random on the surface of a unit sphere as the vertices of a triangle, and consider the area of this triangle. Call this random variable $X$.

The area of such a triangle is the sum of its angles minus $\pi$, so by linearity of expectation the expected value of $X$ is just $3q-\pi$, where $q$ is the expected value of one of the angles. But by symmetry we can fix one point to be at the north pole and the other to lie on the Prime Meridian, from which it is obvious that the angle distribution is uniform on $[0,\pi]$. Thus $\mathbb{E}[X]=\pi/2$, or one-eighth of the sphere's area.

However, because the angles are not independent (they cannot sum to less than $\pi$, for instance), we cannot use this sort of logic to easily infer the values of the second and third moments of this distribution.

After gathering some numerical data, it appears that $\mathbb{E}[X^2]=\frac{\pi^2}2$, but I am not sure how to prove this. (Note that this is equivalent to the statement that the standard deviation of $X$ is $\pi/2$, which may be easier to show?)

I also have $\mathbb{E}[X^3]\approx 20.36$, or that the third moment of $X$ is approximately $4.86$ (either can be inferred from the other, given lower-order moments - they should differ by $\pi^3/2$). I haven't found any particularly nice formulas that match either of these values, though I'm not sure about the last digit in either of these estimates.

In general, what is $\mathbb{E}[X^n]$ or $\mathbb{E}[(X-\frac{\pi}2)^n]$? If any of the values are open, has it been discussed in the literature? Is there a nice geometric argument for $\mathbb{E}[X^2]$?

Edit: Here is a histogram of the area distribution from $1000000$ samples. Interestingly, it seems not to decay to $0$ at the upper bound of $2\pi$.

enter image description here

  • Be sure you're using the correct density when doing your numerical experiments. – A rural reader Jan 20 '21 at 19:23
  • @Aruralreader: I am reasonably confident I have done so. My code correctly gives the $\pi/2$ expected area of a triangle, and the distribution of a single angle between three random points appears uniform on $[0,\pi]$ as expected. I at least haven't picked the latitude uniformly. – RavenclawPrefect Jan 20 '21 at 19:31
  • 1
    Sounds good @RavenclawPrefect. I know folks make the mistake of choosing angles from a uniform distribution on $(0, 2\pi)$, etc., so I figured I'd offer that. – A rural reader Jan 20 '21 at 19:34
  • 1
    One way to make progress on this may be to focus on the angles $\theta_{12},\theta_{13},\theta_{23}$ between the three vertices. The individual PDFs are simple enough to identify (e.g. https://math.stackexchange.com/a/1248835/137524) but it's not clear to me what the joint density would be. – Semiclassical Jan 20 '21 at 20:02
  • @Semiclassical: Yes, my apologies. I had interpreted you as referring to the angles of the triangle at each vertex, rather than the angle from the center of the sphere to adjacent pairs. That does seem like it might be promising; do you know of a simple way to compute the area given these angles? – RavenclawPrefect Jan 20 '21 at 20:09
  • 1
    ...oh, drat. I'm the one who made the error: I forgot that the angular excess applied to the angles at each vertex, rather than the sides. They're related, to be sure---spherical trigonometry and all that---but they're not equal. That also obviates the partial answer I'd posted. – Semiclassical Jan 20 '21 at 20:11
  • Is the original problem asking about triangles or spherical triangles? – A rural reader Jan 21 '21 at 15:19
  • 1
    (Reposting due to typo in density.) This paper lists a formula for the PDF of spherical triangle areas: people.kth.se/~johanph/spherical.pdf. Specifically, their density is given by $$-\frac{(x^2−4\pi x+3\pi^2−6)\cos(x)−6(x−2\pi)\sin(x)−2(x^2−4\pi x+3\pi^2+3)}{16\pi \cos(x/2)^4}\tag{37}$$ for area $x\in[0,2π]$. Said paper also computes the mean and variance, and agrees with your judgment for the latter. (Another paper, arxiv.org/pdf/1009.5329.pdf, indicates that this formula goes back to 1867(!), which is rather remarkable if true.) – Semiclassical Jan 21 '21 at 15:29
  • @Aruralreader: Spherical triangles; apologies if this was ambiguous. – RavenclawPrefect Jan 21 '21 at 15:39
  • @Semiclassical: Fantastic, thank you! If you want to post that as an answer, I'd be happy to accept it. – RavenclawPrefect Jan 21 '21 at 15:40
  • 1
    All good @RavenclawPrefect. For what it's worth when dealing with the area of the inscribed triangle it appears the first few (noncentral) moments are $M_1 = \pi/5$, $M_2 = 1/2$, $M_3 = \pi/7$, $M_4 = 13/30$. – A rural reader Jan 21 '21 at 16:04
  • @RavenclawPrefect I've replaced my old broken answer with the above density and references for such. – Semiclassical Jan 21 '21 at 23:29

2 Answers2

4

I found a cute geometric argument that $\mathbb{E}[X^2]=\frac{\pi^2}2$, and it seemed worth presenting here. (Many statements like "almost surely" and "if points are in general position" and "except for a set of measure $0$" have been omitted for ease of reading.)

Claim: If five points are randomly chosen on the sphere, their convex hull will be a triangle with probability $\frac5{16}$.

Proof: We start with a lemma.

Lemma: Given any three random points on the sphere, adding a random fourth point has a $50\%$ chance of producing a triangular convex hull.

Proof of lemma: Draw the three great circles connecting each pair of the three points, which subdivides the sphere into eight regions. Four of these regions have the property that a fourth point inside them will yield a triangular convex hull, and each such region is opposite a congruent region inside which a fourth point would not yield a triangular convex hull. So for any location $P$ of the fourth point, exactly one of $P$ and $-P$ would work. This completes the proof.

Now, back to the main theorem.

Given five points, consider ways of labeling one point $A$ and another $B$. Obviously, every five points have $20$ such labelings. Say that a collection of labeled points is good if, starting with the three unnamed points, we can add $A$ to get a triangular convex hull, and add $B$ onto the previous four to again produce a triangular convex hull.

For instance, in the following diagram, the left arrangement is good, but the right two are not (the second one has a quadrilateral convex hull when we add $A$, the third when we add $B$).

Things could also fail by having the convex hull be the entire sphere.

Now, fixing a labeling, what are the odds that starting with the unnamed points, adding $A$ gives a triangular hull and adding $B$ to those four points does as well? By our lemma, $\frac12\cdot\frac12=\frac14$. So every choice of five points produces an expected $\frac{20}4=5$ good labelings.

Conversely, given $5$ points whose convex hull is a triangle, how many good labelings does it have? Well, any choice of three points gives a valid starting triangle, and by the time we add the fifth point, we'll have a triangle once again, so the only way it could fail is if the first four points form a quadrilateral. How many ways can that happen?

It shouldn't be too hard to convince yourself that every $5$-point arrangement with a triangular convex hull looks like this, in terms of incidences and intersections (I've drawn lines as straight for convenience):

enter image description here

Inspecting this a bit, we can see that only one of the five points, when removed, leaves a quadrilateral convex hull (the top one, in the above diagram). So that has to be our choice of $B$ for things to fail, and then any of the other four could be $A$. So there are $20-4=16$ good labelings that produce a given configuration.

So, a random five-point arrangement produces $5$ good labelings on average, and a working arrangement produces $16$ good labelings. (Obviously, if a five-point arrangement doesn't have a triangular hull, it won't produce any good labelings.) So the fraction of five-point arrangements that work must be $\frac{5}{16}$.


Okay, proof complete. Now what?

Observe that the probability five points have a triangular convex hull is $10$ times the probability that they have a triangular convex hull and the three points on said triangle were the first three chosen (since any of the ten possible three-subsets could have just as easily been that triangle). So there is a $\frac1{32}$ chance that, if we pick three random points, the next two random points we choose will be inside that triangle.

But given a triangle, the odds that two random points lie inside it is just the square of the fraction of the area of the sphere that it takes up! So what we have shown is that $\mathbb{E}[\left(\frac{X}{4\pi}\right)^2]=\frac1{32}$, and hence $\mathbb{E}[X^2]=\frac{\pi^2}{2}$.

Note that this sort of argument can't extend to $6$ points, because the resulting probability of a triangular convex hull will be ${6\choose 3}\cdot \mathbb{E}[\left(\frac{X}{4\pi}\right)^3] = \frac{15}{32} - \frac{15\log(2)}{4 \pi^2}$, which is almost certainly irrational.

What breaks with $6$ points? I think the fundamental problem is that there is more than one point/line arrangement with positive probability, so the number of good labelings isn't constant. Consider the below two configurations:

[diagram]

In the left case, removing any of the outer triangle's vertices will yield a quadrilateral convex hull, but in the right case, any vertex can be removed while preserving triangularity.

2

I'll confess some frustration with this answer, because I can quote various sources on this but not verify them readily for myself.

The major result to quote is the probability density for the area $x\in [0,2\pi]$ of a spherical triangle:

$$f_X(x)=-\frac{(x^2−4\pi x+3\pi^2−6)\cos(x)−6(x−2\pi)\sin(x)−2(x^2−4\pi x+3\pi^2+3)}{16\pi \cos(x/2)^4}.$$

This formula apparently goes back to at least 1867, appearing as problem 2370 in Mathematical Questions and Solutions from the “Educational Times” : It was proposed by M.W. Crofton and solved the pseudonymous "Exhumatus". This is available via Google Books here (p. 21-23). Finch and Jones 2010 review Exhumatus's approach; see also the discussion of Case 2 random spherical triangles in Philip 2015. Interestingly, there doesn't seem to be a direct derivation of the above formula from the trivariate density for the three angles (which is known.)

With this density in hand, one may use Mathematica to verify that the PDF is properly normalized and that

$$\mathbb E[X]=\frac{\pi}{2},\quad \mathbb E[X^2]=\frac{\pi^2}{2},\quad \mathbb{E}[(X-\pi/2)^2]=\frac{\pi^2}{4}$$ in agreement with the OP. Mathematica seems to struggle with finding closed-forms for the higher moments but does obtain

\begin{array}{ll} \mathbb{E}[X^3]=\frac32 \pi^3-12\pi \ln 2\approx 20.3784, &\mathbb{E}[(X-\pi/2)^3]=\pi^3-12\pi \ln 2,\\ \mathbb{E}[X^4]=4 \pi^4-24 \pi^2 \ln 2-\zeta(3) \approx 95.6281, &\mathbb{E}[(X-\pi/2)^4]=\frac{25}{16}\pi^4-108\zeta(3)\\ \mathbb{E}[X^5]=10 \pi^5-120 \pi^3 \ln 2 \approx 481.167, &\mathbb{E}[(X-\pi/2)^5]=\frac{13}{4}\pi^5 -90\pi^3 \ln 2+270\zeta(3)\\ \end{array} and so forth. At this point computing the central moments becomes too laborious for my sessions of Wolfram Cloud, but the next few non-central moments are

\begin{align} \mathbb{E}[X^6]&=24 \pi ^6-480 \pi^4 \ln 2-180 \pi^2 \zeta(3)+13500 \zeta(5)\\&\approx 2527.33 ,\\ \mathbb{E}[X^7]&=56 \pi^7-1680 \pi^5 \ln 2+1260 \pi^3\zeta(3)+47250 \pi \zeta(5)\\&\approx 13664.1 ,\\ \mathbb{E}[X^8]&=128 \pi^8-5376 \pi^6 \ln 2+12096 \pi^4 \zeta(3)+264600 \pi^2 \zeta(5)-1666980 \zeta(7)\\&\approx 75422.4,\\ \mathbb{E}[X^9]&=288 \pi^9-16128 \pi^7 \ln 2+66528 \pi^5 \zeta(3)+1020600 \pi^3 \zeta(5)-10001880 \pi \zeta(7)\\&\approx 422860.,\\ \mathbb{E}[X^{10}]&=640 \pi^{10}-46080 \pi^8 \ln 2+293760 \pi^6\zeta(3)+3175200 \pi^4 \zeta(5)-67869900 \pi^2 \zeta(7)+260253000 \zeta(9) \\&\approx 2399821.43. \end{align} I'm not sure how much farther this can be pushed using Wolfram Cloud. The best route would be to determine some generating function like $\mathbb{E}[e^{tX}]$ or some other convenient $\mathbb{E}[f(tX)]$, but I haven't succeeded in obtaining such.

As a last point of agreement with the OP, the density does not vanish at $x=2\pi$: $$f_X(2\pi)=-\frac{(-\pi^2-6)-2(-\pi^2+3)}{16\pi}=\frac{3}{4\pi}-\frac{\pi}{16}\approx 0.0424. $$ This seems in good agreement with the histogram obtained by the OP. My own intuitive explanation for this is that the area is nearly maximized occurs when the vertices lie near some common great circle, and there are "many" ways to form such triangles. Thus there's no reason for the probability density to vanish as $x\to 2\pi$.

Semiclassical
  • 15,842
  • Thanks! Do you have numerical results for the higher moments or expectations of powers? A few more terms might be enough to extract some plausible closed-forms, and from there seek out a general pattern. In particular, the $\pi^n$ coefficients for $\mathbb{E}[X^n]$ so far are pretty nice, and a few more might indicate or disprove regularities. – RavenclawPrefect Jan 23 '21 at 00:44
  • 1
    @RavenclawPrefect I've posted more exact moments. If you want more numerical results I'll stress that Wolfram Alpha is sufficient (see for instance here for the sixth moment.) My own curiosity at this point is the origin of $f_X(x)$: the fact that there's seemingly no known derivation of it from the trivariate angle distribution is interesting. – Semiclassical Jan 23 '21 at 02:16
  • Also, it seems numerically that the the moments grow like $\mathbb{E}[X^n]\sim r^n$ for $r\approx 2\pi$. This could presumably be determined by some kind of saddle-point calculation but I find this too tedious to check. – Semiclassical Jan 23 '21 at 02:25
  • I think we can actually prove that the moments grow with an exponential increase of $2\pi$ - this should just follow from the fact that the distribution is capped at $2\pi$ and has a positive probability of being within $\epsilon$ of $2\pi$ for all positive $\epsilon$, so the triangles with very-close-to-maximal area will dominate the EV in the long run. – RavenclawPrefect Jan 24 '21 at 20:36
  • Also, it appears that when $n>1$, the coefficients of $\pi^n$ in $\mathbb{E}[X^n]$ are given by $n\cdot2^{n-4}$. I can't find the other coefficients in OEIS. – RavenclawPrefect Jan 24 '21 at 20:56
  • Aha, some progress! It appears that the coefficient of $\pi^{n-2}\ln(2)$ in $\mathbb{E}[X^n]$ for $n\neq 3$ is given by $-n\cdot(n-1)\cdot(n-2)\cdot2^{n-4}$. The odd zeta coefficients I still can't figure out, though - the coefficient at $n$ seems to be nicely divisible, which suggests some regularity, but if it's a polynomial times $2^n$ it's a high-order one, and some medium-sized primes crop up in the factorizations. – RavenclawPrefect Jan 24 '21 at 21:39