Two Averages, Two Different Triangles: A Semicircle Probability Puzzle

Choose a random point on a semicircle. The resulting right triangle has an area and a perimeter. What are their averages—and can one triangle attain both?

A note on origin: this puzzle is my own. The question simply came into my head one day, and I worked out the solution myself.

Draw a semicircle of radius 1, with diameter AB=2. Choose a point P uniformly along its arc and join it to A and B. By Thales’ theorem, \angle APB=90^\circ. We will calculate two expected values and then compare the triangles that attain them.

What does “uniformly” mean? Equal lengths of arc have equal probability. Equivalently, the central angle \theta is uniform on [0,\pi]. We do not choose the horizontal coordinate uniformly.

1. The average area

Let the center of the semicircle be the origin and put P=(\cos\theta,\sin\theta). The base AB has length 2, and the altitude from P is \sin\theta. Therefore the area is

S(\theta)=\frac12\cdot2\sin\theta=\sin\theta.

Since \theta is uniform on [0,\pi],

\mathbb E[S]=\frac1\pi\int_0^\pi\sin\theta\,d\theta=\frac2\pi\approx0.636620.

Explore the area

ABOP

55°
Area
—
Perimeter
—
Expected area
0.636620

There are two symmetric positions with the same area. The button selects the position on the right half of the arc.

The maximum possible area is 1, attained at the top of the semicircle. The expected area, 2/\pi, is smaller than this maximum.

2. The average perimeter

Our right triangle has hypotenuse AB=2. Its legs have lengths

AP=2\cos\frac\theta2,\qquad BP=2\sin\frac\theta2.

Thus its perimeter is

L(\theta)=2+2\cos\frac\theta2+2\sin\frac\theta2.

Average this expression over the semicircular arc:

\begin{aligned}\mathbb E[L]&=\frac1\pi\int_0^\pi L(\theta)\,d\theta\\&=2+\frac8\pi\approx4.546479.\end{aligned}

Explore the perimeter

ABOP

60°
Perimeter
—
Area
—
Expected perimeter
4.546479

There are two symmetric positions with the same perimeter. The button selects the position on the right half of the arc.

The perimeter ranges from 4 (in the limiting, degenerate cases at the endpoints) to 2+2\sqrt2\approx4.828427 (at the top of the arc).

3. Can one triangle have both averages?

This is where the two problems come together. From the formulas above,

(AP+BP)^2=AP^2+BP^2+2(AP)(BP)=4+4S.

Here AP\cdot BP=2S, because the legs of the right triangle are perpendicular. Therefore

L=2+2\sqrt{1+S}.

So area and perimeter are not independent: once we know the area, we know the perimeter.

Suppose the triangle has the expected area, S=2/\pi. Its perimeter must be

L=2+2\sqrt{1+\frac2\pi}\approx4.558609,

which is greater than the expected perimeter, 4.546479.

Conversely, a triangle with perimeter 2+8/\pi must have area

S=\left(\frac{L-2}{2}\right)^2-1=\frac{16}{\pi^2}-1\approx0.621139,

which is less than the expected area, 0.636620.

Triangle Area Perimeter
With expected area 0.636620 4.558609
With expected perimeter 0.621139 4.546479

Why must they differ? The function L(S)=2+2\sqrt{1+S} is strictly concave. Jensen’s inequality tells us that

\mathbb E[L]<2+2\sqrt{1+\mathbb E[S]}.

In words: the perimeter of a triangle with the average area is strictly greater than the average perimeter.

Conclusion. There is a triangle with the expected area, and there is a triangle with the expected perimeter. But there is no triangle with both. The “average triangle” depends on what we choose to average.

A question to explore

What if we choose P by selecting its horizontal coordinate uniformly from -1 to 1 instead of choosing P uniformly along the arc? Would either expected value remain the same?

Mathematical note: all expected values here use uniform arc-length probability on the unit semicircle. Endpoint positions have probability zero. Both triangles attaining a given nonextreme area or perimeter occur in symmetric pairs.

Continue exploring: The triangles here are always right triangles, by Thales’ theorem. For more on their sides, area and perimeter, see The Hidden Mathematics of Right Triangles. For expected values in a game where they decide who wins, see Why Casinos Don’t Like Card Counters: The Mathematics of Beating Blackjack.


Leave a Reply

Your email address will not be published. Required fields are marked *