# the incredible accuracy of Stirling’s approximation

December 6, 2016
By

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

The last riddle from the Riddler [last before The Election] summed up to find the probability of a Binomial B(2N,½) draw ending up at the very middle, N. Which is

$\wp={2N \choose N}2^{-2N}$

If one uses the standard Stirling approximation to the factorial function,

log(N!)≈Nlog(N) – N + ½log(2πN)

the approximation to ℘ is 1/√πN, which is not perfect for the small values of N. Introducing the second order Stirling approximation,

log(N!)≈Nlog(N) – N + ½log(2πN) + 1/12N

the approximation become

℘≈exp(-1/8N)/√πN

which fits almost exactly from the start. This accuracy was already pointed out by William Feller, Section II.9.

Filed under: Kids, R, Statistics Tagged: American elections 2016, Stirling approximation, The Riddler

Please comment on the article here: R – Xi'an's Og

Tags: , , , , ,

 Tweet

Email: