In honour of Pi Day (March 14), the chart shows six ways of randomly selecting a point in a unit disc. Four of the methods are bad, for various reasons.

## A. Midpoint of random *p*, *q* on circumference

*p* = (cos(𝜃_{1}), sin(𝜃_{1})) is a point on the circumference

*q* = (cos(𝜃_{2}), sin(𝜃_{2})) is another point on the circumference

*x* = ½ cos(𝜃_{1}) + ½ cos(𝜃_{2}) and

*y* = ½ sin(𝜃_{1}) + ½ sin(𝜃_{2}), for random 𝜃_{1} and 𝜃_{2}, define their midpoint.

## B. Random polar coordinates

*x* = *r* cos(𝜃)

and *y* = *r* sin(𝜃), for random angle 𝜃 and radius *r* ≤ 1. This gives choices biased towards the centre.

## C. Random *y*, then restricted *x*

Random *y*, followed by random *x* in the range −√(1−*y*^{2}) to √(1−*y*^{2}). This gives choices biased towards the top and bottom.

## D. Random point on chord in A

Similar to **A**, but *x* = *a* cos(𝜃_{1}) + (1−*a*) cos(𝜃_{2})

and *y* = *a* sin(𝜃_{1}) + (1−*a*) sin(𝜃_{2}), for random 𝜃_{1} and 𝜃_{2} on the circumference of the circle and random *a* between 0 and 1. This gives choices biased towards the periphery.

## E. Random polar with sqrt(*r*)

Similar to **B**, but *x* = √*r* cos(𝜃)

and *y* = √*r* sin(𝜃), for random angle 𝜃 and radius *r*. The square root operation makes the selection uniform across the disc.

## F. Random *x*, *y* within disc

Random *x* and *y*, repeating the choice until *x*^{2} + *y*^{2} ≤ 1. This is uniform, and the selection condition restricts the final choice to the disc.

Oh, and here are some Pi Day activities.