I promise this is my last post on the now week and a half old π pay! Building on the last post, I figured I could show how convergence actually works in the estimation algorithm. If you’ll recall, we plotted a number of x,y pairs inside a square inscribing a quarter circle. The ratio of those points inside the quarter circle to the overall number of points plotted was an estimate of pi. **How** good depended strongly on the number of points plotted. In fact the simplest method of estimation involves plotting thousands of points in one round, no iteration at all. But breaking the points into rounds can give us a neat look at how quickly the average will converge on pi and where the points themselves are plotted. So below the jump (a backsidesmack first!) I present a highly caffeinated animation of the process:

Code is in the last pi day post or online at github.

*Related*

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** fun with simple math, Monte Carlo, pi, pi day, R Stuff, Simulation