Quantcast
Viewing all articles
Browse latest Browse all 1015

The answer is e, what was the question?!

By xi’an

(This article was originally published at R – Xi’an’s Og, and syndicated at StatsBlogs.)

A rather exotic question on X validated: since π can be approximated by random sampling over a unit square, is there an equivalent for approximating e? This is an interesting question, as, indeed, why not focus on e rather than π after all?! But very quickly the very artificiality of the problem comes back to hit one in one’s face… With no restriction, it is straightforward to think of a Monte Carlo average that converges to e as the number of simulations grows to infinity. However, such methods like Poisson and normal simulations require some complex functions like sine, cosine, or exponential… But then someone came up with a connection to the great Russian probabilist Gnedenko, who gave as an exercise that the average number of uniforms one needs to add to exceed 1 is exactly e, because it writes as

Image may be NSFW.
Clik here to view.
sum_{n=0}^inftyfrac{1}{n!}=e

(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:

Hard to beat, isn’t it?! (Although it is more exactly a Monte Carlo approximation of

Image may be NSFW.
Clik here to view.
left(1-frac{1}{n}right)^n

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 …read more

Source:: statsblogs.com


Viewing all articles
Browse latest Browse all 1015

Trending Articles