Mathematics I / Programming for Mathematics
Practice question · Numerical answer

In a Monte Carlo estimate of pi, points are scattered in a unit square containing a quarter-circle and the estimate is four times the fraction landing inside. If 800 of 1000 points land inside, what is the estimate of pi?

Hints
  1. Compute the fraction of points inside first.
  2. Then multiply by 4, because the quarter-circle is a quarter of the relevant area.
Show the answer

3.2 (answers within ±0.01 count)

Why

800/1000 = 0.8, and 4 * 0.8 = 3.2. The true value is 3.14159..., so this run is off by about 0.06, a reminder that a Monte Carlo answer is a sample statistic, not a computation of pi.

Read the lesson: Programming for Mathematics →

Practise Programming for Mathematics

The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.

More questions on Programming for Mathematics