Qm

Estimating pi by throwing darts

A circle of radius 1 is drawn inside a square of side 2, touching all four sides. Points are thrown at random, uniformly over the square.

  1. How does the fraction of points landing inside the circle give an estimate of pi?
  2. Roughly how many points are needed to get pi correct to two decimal places?
Show a hint

The chance a random point lands inside the circle is the ratio of the circle's area to the square's area. For part 2, the standard deviation of a fraction estimated from N points is about the square root of p(1 minus p)/N.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

Dropping needles to estimate piEstimate the probability three uniforms sum below oneFrom an hour to half an hourAnts on a triangleHow many molecules in a glass of water?
All questions →