Monte Carlo Estimate of Pi
If a circle of radius R is inscribed inside a square with side length 2R, then the area of the circle will be pi*R^2 and the area of the square will be (2R)^2. So the ratio of the area of the circle to the area of the square will be pi/4. This means that, if you pick N points at random inside the square, approximately N*pi/4 of those points should fall inside the circle.
In this simulation, we drop 500 random points at a time, and keep track of the total number that land in the circle and the total number that land in the square.
Click on pause/play button in the lower left corner to start and stop the simulation.