Library · Geometric Probability · Chapter 3

Closer to centre than to any side

Revised Report an error

Problem 3.1

A point PP is chosen uniformly at random in the unit square [−12,12]2[-\tfrac12, \tfrac12]^2. What is the probability that PP is closer to the centre O=(0,0)O = (0,0) than to every side?

Solution. Split the square into four triangles by its two diagonals. Consider the top triangle T={(x,y):y≥∣x∣}T = \{(x,y) : y \geq |x|\}: here the closest side is the top side y=12y = \tfrac12, at distance 12−y\tfrac12 - y.

In TT, the point (x,y)(x,y) is closer to O=(0,0)O = (0,0) than to the top side iff x2+y2≤12−y.\sqrt{x^2 + y^2} \leq \tfrac12 - y. Both sides are non-negative on TT, so squaring is reversible: the condition becomes x2+y2≤14−y+y2x^2 + y^2 \leq \tfrac14 - y + y^2, i.e., y≤14−x2y \leq \tfrac14 - x^2. This is the region under a downward parabola with focus OO and directrix y=12y = \tfrac12.

The parabola y=14−x2y = \tfrac14 - x^2 meets the boundary line y=xy = x of TT where x=14−x2x = \tfrac14 - x^2, giving x∗=2−12x^* = \tfrac{\sqrt 2 - 1}{2}. On TT, the region both inside TT (so y≥∣x∣y \geq |x|) and below the parabola is RT={(x,y):∣x∣≤x∗,  ∣x∣≤y≤14−x2}.R_T = \{ (x,y) : |x| \leq x^*,\; |x| \leq y \leq \tfrac14 - x^2 \}. Its area equals area⁡(RT)=2∫0x∗(14−x2−x)dx=2[x∗4−(x∗)33−(x∗)22].\operatorname{area}(R_T) = 2 \int_0^{x^*} \left( \tfrac14 - x^2 - x \right) dx = 2 \left[ \tfrac{x^*}{4} - \tfrac{(x^*)^3}{3} - \tfrac{(x^*)^2}{2} \right]. With x∗=(2−1)/2x^* = (\sqrt 2 - 1)/2 we have (x∗)2=(3−22)/4(x^*)^2 = (3 - 2\sqrt 2)/4 and (x∗)3=(52−7)/8(x^*)^3 = (5\sqrt 2 - 7)/8. Substituting and simplifying, area⁡(RT)=42−512.\operatorname{area}(R_T) = \frac{4\sqrt 2 - 5}{12}. By the fourfold symmetry of the square, the full region where PP is closer to OO than to every side has area 4⋅42−512=42−53.4 \cdot \frac{4\sqrt 2 - 5}{12} = \frac{4\sqrt 2 - 5}{3}. Since the unit square has area 11, P=42−53≈0.219.■\boxed{\mathbb{P} = \frac{4\sqrt 2 - 5}{3} \approx 0.219.} \qedhere

The region (sage) inside the unit square where a point is closer to the centre than to any side. The boundary consists of four parabolic arcs (copper), each with focus at the centre and one side as directrix. The region’s area is \tfrac{4\sqrt 2 - 5}{3} .
The region (sage) inside the unit square where a point is closer to the centre than to any side. The boundary consists of four parabolic arcs (copper), each with focus at the centre and one side as directrix. The region’s area is 42−53\tfrac{4\sqrt 2 - 5}{3}.
import numpy as np
x, y = np.random.rand(2, 10**7) - 0.5
d_centre = np.sqrt(x*x + y*y)
d_side = 0.5 - np.maximum(np.abs(x), np.abs(y))
p = (d_centre < d_side).mean()
print(f"sim: {p:.5f}   exact: {(4*np.sqrt(2)-5)/3:.5f}")
# sim: 0.21916   exact: 0.21895
Report an error on this page

Reports are stored by Netlify. See the privacy note.