How to calculate Pi with rice



Draw a square and a quatercircle in it on a paper and throw a hand full of rice on it. Done!

Well almost done. Now you count how many grains of rice landed inside the square and how many landed inside the quatercircle. The ratio of these two numbers approximates the ratio of the two areas Pi*r^2/r^2=Pi/4. Multiply the ratio by 4 and you get Pi, well it is an approximation. If you are not happy with the accuracy just use more rice.

This is one example of the Monte Carlo method. The key is to avoid computing a complicated formula by using random samples in a clever way.