Star Student Builder logoStar Student Builder
← Young Researchers MathsMonte Carlo estimation35 minutesStd 9–12

Pi From Scattered Rice

✨ Throwing rice at a square of paper without aiming gives you the value of pi.

A twenty centimetre square with a quarter circle drawn inside it, scattered rice grains shown as dots, twenty-two of the twenty-eight grains lying inside the arc, giving pi as four times twenty-two over twenty-eight.
How it works

🧰 You need

  • a large sheet of paper
  • a pencil, ruler and a string compass
  • about 400 rice grains or lentils
  • a cup
  • a calculator

⚠️ Sweep up spilled grains so nobody slips, and do not cook the used rice.

πŸ‘€ What you will see

The grains fall in an uneven scatter, yet the fraction inside the arc is close to 0.785. With 200 grains you typically land within a few per cent of pi, and with 400 grains you usually do better. Two people with the same number of grains get slightly different answers.

πŸ§ͺ Do it

  1. Draw a square of side 20 centimetres and, with a pin and string, draw a quarter circle of radius 20 centimetres inside it from one corner.
  2. Hold the cup high above the paper and scatter about 200 grains over the square without aiming.
  3. Sweep away every grain that landed outside the square and count the grains remaining, calling this N.
  4. Count how many of those lie inside the quarter circle, calling this n, and count a grain on the arc as half.
  5. Estimate pi as four times n divided by N and write down your answer.
  6. Repeat with about 400 grains and compare how close each estimate is to 3.1416.
  7. Calculate the percentage error of both estimates.

πŸ’‘ Why it happens

The quarter circle has area pi times r squared divided by four, and the square has area r squared, so the quarter circle covers exactly pi over four of the square, about 0.785. If grains land at random then the fraction inside the arc estimates that proportion, which makes four n over N an estimate of pi. Using random trials to measure an area or a probability like this is called a Monte Carlo method, and computers use it for problems with no neat formula. The error shrinks with the square root of the number of grains, so four times as many grains only halves the error.

πŸ” Now try this

Pool results with three friends to reach 1600 grains and check whether the error has roughly halved twice.

πŸ€” Think about it

Why must the grains be scattered without aiming, and what happens to your estimate if you aim even slightly?

🧘 Ask the Acharya

β€œWhy must the grains be scattered without aiming, and what happens to your estimate if you aim even slightly?” β€” ask him and he will explain it from your own chapters.

Ask Guru β†’

More for Std 9–12

Ask GuruAcharya Samayeshwar