Stirling's Formula
筆者在另一篇證明用常態分佈近似二項分佈的文章中,用到了這個Stirling's Formula,這裡證明一下。主要內容來自於page 552, section 11, chapter 11 in Boas's Mathematical Methods in The Physical Sciences 3rd edition. 黑色字體是課文,藍色字體是我的補充說明。
n!∼nne−n√2πn
Proof:
Start with p!=∫∞0xpe−xdx=∫∞0e(plnx)−xdx.
xp | e−x | |
\+ | ||
pxp−1 | −e−x | |
\− | ||
p(p−1)xp−2 | e−x | |
\+ | ||
p(p−1)(p−2)xp−3 | −e−x | |
\− | ||
⋮ | ⋮ | ⋮ |
p(p−1)(p−2)⋯2x | ±e−x | |
\± | ||
p! | ±e−x | |
\± | ||
0 | ---∫± | ±e−x |
Substitute a new variable y such that x=p+y√p.
Then dx=√pdy
x=0 corresponds to y=−√p,
and (11.2) becomes p!=∫∞−√pepln(p+y√p)−p−y√p√pdy.
For large p, the logarithm can be expanded in the following power series: ln(p+y√p)=lnp+ln(1+y√p)=lnp+y√p−y22p+⋯.
since 11−x=1+x+x2+⋯ and ln(1−x)=−x−x22−x33−⋯ by integrating both sides and ln(1+x)=x−x22+x33−⋯.
I don't know why we can omit the later terms in the following deduction.
Substituting (11.4) into (11.3), we get p!∼∫∞−√pe(plnp)+y√p−(y2/2)−p−y√p√pdycancel out y√p=e(plnp)−p√p∫∞−√pe−y2/2dy=ppe−p√p[∫∞−∞e−y2/2dy−∫−√p−∞e−y2/2dy].
The first integral is easily shown to be √2π (Problem 9.4). The second integral tends to zero as p→∞, and we have p!∼ppe−p√2πp
which is (11.1).
No comments:
Post a Comment