Library · Geometric Probability · Chapter 44
Expected area of a triangle in the unit square
Problem 44.1
Let be three points chosen independently and uniformly in the unit square. What is the expected area of the triangle they form?
Solution. Write . The signed area of is , where Expanding, .
Let , , , . Then . The pairs and are independent (the ’s are independent of the ’s), and both are distributed as the difference of two uniforms centred at , giving a triangular density on .
Step 1: . Since the ’s are independent of the ’s, the pair is independent of , so Here and are not independent: they share the term . With the i.i.d. uniform on , and identically , . The mixed term does not vanish. Hence so the second moment of the signed area is .
Step 2: directly. The expected value of is the genuinely hard step, and we give only the answer: classical computation (Woolhouse 1867, Alikoski 1939) yields The calculation uses the six-fold expansion of , Fubini, and a patient evaluation of the resulting polynomial integrals. The final answer is
The value is small compared with the unit-square area , reflecting that most random triangles are “thin.” The similar value for a triangle (Chapter 43) is , which on a unit-area triangle is also . For the unit disc (area ), the analogous constant is times the area — see Chapter 46.
import numpy as np
u, v = np.random.rand(2, 3, 10**7)
area = 0.5 * np.abs((u[1]-u[0])*(v[2]-v[0]) - (u[2]-u[0])*(v[1]-v[0]))
print(f"sim: {area.mean():.5f} exact: {11/144:.5f}")
# sim: 0.07636 exact: 0.07639