Library · Geometric Probability · Chapter 44

Expected area of a triangle in the unit square

Revised Report an error

Problem 44.1

Let P1,P2,P3P_1, P_2, P_3 be three points chosen independently and uniformly in the unit square. What is the expected area of the triangle they form?

Solution. Write Pi=(Xi,Yi)P_i = (X_i, Y_i). The signed area of △P1P2P3\triangle P_1 P_2 P_3 is 12D\tfrac12 D, where D=(X2−X1)(Y3−Y1)−(X3−X1)(Y2−Y1).D = (X_2 - X_1)(Y_3 - Y_1) - (X_3 - X_1)(Y_2 - Y_1). Expanding, D=X2Y3−X3Y2+X3Y1−X1Y3+X1Y2−X2Y1D = X_2 Y_3 - X_3 Y_2 + X_3 Y_1 - X_1 Y_3 + X_1 Y_2 - X_2 Y_1.

Let A=X2−X1A = X_2 - X_1, B=X3−X1B = X_3 - X_1, C=Y2−Y1C = Y_2 - Y_1, E=Y3−Y1E = Y_3 - Y_1. Then D=AE−BCD = A E - B C. The pairs (A,B)(A, B) and (C,E)(C, E) are independent (the XX’s are independent of the YY’s), and both are distributed as the difference of two uniforms centred at 00, giving a triangular density on [−1,1][-1, 1].

Step 1: E[D2]\mathbb{E}[D^2]. Since the XX’s are independent of the YY’s, the pair (A,B)(A, B) is independent of (C,E)(C, E), so E[D2]=E[A2E2]+E[B2C2]−2E[ABCE]=E[A2]E[E2]+E[B2]E[C2]−2 E[AB] E[CE].\mathbb{E}[D^2] = \mathbb{E}[A^2 E^2] + \mathbb{E}[B^2 C^2] - 2 \mathbb{E}[A B C E] = \mathbb{E}[A^2]\mathbb{E}[E^2] + \mathbb{E}[B^2]\mathbb{E}[C^2] - 2\, \mathbb{E}[A B]\, \mathbb{E}[C E]. Here A=X2−X1A = X_2 - X_1 and B=X3−X1B = X_3 - X_1 are not independent: they share the term X1X_1. With the XiX_i i.i.d. uniform on [0,1][0,1], E[A2]=Var⁡(X2−X1)=16,E[AB]=E[(X2−X1)(X3−X1)]=14−14−14+13=112,\mathbb{E}[A^2] = \operatorname{Var}(X_2 - X_1) = \tfrac16, \qquad \mathbb{E}[A B] = \mathbb{E}[(X_2 - X_1)(X_3 - X_1)] = \tfrac14 - \tfrac14 - \tfrac14 + \tfrac13 = \tfrac1{12}, and identically E[E2]=E[C2]=16\mathbb{E}[E^2] = \mathbb{E}[C^2] = \tfrac16, E[CE]=112\mathbb{E}[C E] = \tfrac1{12}. The mixed term does not vanish. Hence E[D2]=16⋅16+16⋅16−2⋅112⋅112=118−172=124,\mathbb{E}[D^2] = \tfrac16 \cdot \tfrac16 + \tfrac16 \cdot \tfrac16 - 2 \cdot \tfrac1{12} \cdot \tfrac1{12} = \tfrac1{18} - \tfrac1{72} = \tfrac1{24}, so the second moment of the signed area is E[(D/2)2]=196\mathbb{E}[(D/2)^2] = \tfrac1{96}.

Step 2: E[∣D∣]\mathbb{E}[|D|] directly. The expected value of ∣D∣|D| is the genuinely hard step, and we give only the answer: classical computation (Woolhouse 1867, Alikoski 1939) yields E[∣D∣]=1172.\mathbb{E}[|D|] = \frac{11}{72}. The calculation uses the six-fold expansion of DD, Fubini, and a patient evaluation of the resulting polynomial integrals. The final answer is E[Area⁡(△P1P2P3)]=12E[∣D∣]=11144.■\boxed{\mathbb{E}[\operatorname{Area}(\triangle P_1 P_2 P_3)] = \tfrac12 \mathbb{E}[|D|] = \frac{11}{144}.} \qedhere

The value 11/144≈0.076411/144 \approx 0.0764 is small compared with the unit-square area 11, reflecting that most random triangles are “thin.” The similar value for a triangle (Chapter 43) is 112⋅Area⁡(T)\tfrac1{12} \cdot \operatorname{Area}(T), which on a unit-area triangle is also 112≈0.083\tfrac1{12} \approx 0.083. For the unit disc (area π\pi), the analogous constant is 3548π2\tfrac{35}{48 \pi^2} 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
Report an error on this page

Reports are stored by Netlify. See the privacy note.