Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
(The result was later detailed in the American Statistician as an introductory simulation exercise akin to Buffon’s needle.) This is a brilliant solution as it does not involve anything but a standard uniform generator. I do not think it relates in any close way to the generation from a Poisson process with parameter λ=1 where the probability to exceed one in one step is e⁻¹, hence deriving a Geometric variable from this process leads to an unbiased estimator of e as well. As an aside, W. Huber proposed the following elegantly concise line of R code to implement an approximation of e:
1/mean(n*diff(sort(runif(n+1))) > 1)
Hard to beat, isn’t it?! (Although it is more exactly a Monte Carlo approximation of
which adds a further level of approximation to the solution….)
Filed under: Books, R, Statistics Tagged: Buffon’s needle, cross validated, Gnedenko, Monte Carlo integration, Poisson process, simulation
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.