KatInterview

Estimate Pi Empirically with Minimal Tools to Six Decimal Places

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsmonte-carloprobabilityvariance-reduction

Last updated

Design a die-and-cardboard Monte Carlo experiment that estimates π, then derive how many trials five to six correct decimal places demand and how to realistically get there.

Setup

You have exactly two items: a square piece of cardboard and a fair six-sided die (faces 1–6, each equally likely). You may also use a pen and a ruler to mark the cardboard.

Design a repeatable experiment that produces an empirical estimate of π. Then analyze what it would take to make that estimate accurate to five or six decimal places.


Part 1 — Design the experiment

Describe your procedure in enough detail that someone else could run it without asking you any questions. Your answer should cover:

  • What you draw on the cardboard and what geometric relationship connects the drawing to π
  • How a sequence of die rolls encodes one random point, and what it means for a trial to be a "success"
  • The formula that turns your tally of successes into an estimate of π
  • Why the expected value of that estimator equals π (or how close it is, if there is an irreducible bias)
  • Any sources of bias in the procedure — coarse number resolution, non-uniform throws, edge effects — and how you handle them

Part 2 — Reaching five to six decimal places

Work through the numbers:

  • Define your error tolerance and confidence level (the problem leaves these open — state what you choose and why)
  • Derive the variance of your estimator and translate the precision target into a required trial count
  • Comment on whether that count is physically feasible with a real die
  • Describe at least two concrete techniques that would reduce the required trial count
  • Explain why systematic errors set a hard floor that no number of additional trials can overcome, and name at least two sources of such error in your design

What a complete answer looks like

A strong response links π to a geometric probability, builds an unbiased (or near-unbiased) estimator, works out the $1/\sqrt{N}$ convergence rate, converts the decimal-place target into a specific $N$ with the arithmetic shown, and then honestly confronts the gap between that $N$ and what a human with a die can produce. The best answers pivot to variance reduction rather than just asking for more rolls.

Hints

Hint 1

Start by asking: what ratio of areas connects a circle to the square that contains it? That ratio involves π and it is directly estimable by counting.

Hint 2

A single die roll gives you one of six values. To generate a coordinate in [0,1] with finer resolution you can combine multiple rolls — think of them as digits in base 6. Work out how many rolls per coordinate you need to keep discretization error below your target.

Hint 3

Five correct decimal places means an absolute error below roughly 5×10⁻⁶. The standard error of a Monte Carlo proportion estimator is σ/√N. Compute σ for the circle-in-square estimator and solve for N — then react to that number rather than just stating it.