Library · Geometric Probability · Chapter 50
Expected perimeter of a triangle inscribed in a circle
Problem 50.1
Three points are chosen independently and uniformly on the unit circle. What is the expected perimeter of the triangle they form?
Solution. The perimeter is the sum of three chord lengths: By linearity of expectation, each term has the same expected value (each side joins two independent uniform points on the circle; the three sides are dependent), so From Chapter 13, the expected length of a chord between two uniform random points on the unit circle is . Therefore
Compare Chapter 47 (random triangle inside a disc, expected perimeter ). Inscribing the triangle on the boundary, where the three points are spread around the whole circle rather than clustered in the interior, increases the expected perimeter by roughly . As a sanity check, the maximum possible perimeter of an inscribed triangle is (the equilateral case), and the expected value sits comfortably below it, as well as below the cruder bound coming from three chords each at most the diameter .
import numpy as np
theta = np.random.rand(3, 10**7) * 2*np.pi
x, y = np.cos(theta), np.sin(theta)
d = lambda i,j: np.sqrt((x[i]-x[j])**2 + (y[i]-y[j])**2)
perim = d(0,1) + d(1,2) + d(2,0)
print(f"sim: {perim.mean():.5f} exact: {12/np.pi:.5f}")
# sim: 3.82020 exact: 3.81972