Ever wondered what a quarter of a million points might look like on an Excel chart?
I thought this was a nice visualization of the Monte Carlo method, so I decided to share it. It uses over 2 million formulas, so I used VBA to create the formulas when you open the workbook, which takes about 10 seconds on my machine, but saves over 50 MB of file size!
Try varying the number of darts and see how the accuracy of PI is affected. This shows quite clearly that high precision results with the Monte Carlo method require very large samples. Of course an infinite sample size would produce a perfect value for PI... whatever that means ;)
Or try hitting F9 and have the worksheet re-calc.
An interesting display happens when you have the number of darts set to the max (264,000) and you ALT-TAB to another window that completely covers the chart and then ALT-TAB back! Each flash is 32,000 points being drawn on the chart.
Here's the workbook:
If you liked this article, please share it!