

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Stirling's approximation, a mathematical formula used to approximate the natural logarithm of large factorials. The approximation is based on the integral of ln x from 0 to n and is shown to get better as n increases. Examples of the approximation for various values of n and compares the result to the exact value of ln n!.
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


In confronting statistical problems we often encounter factorials of very large numbers. The factorial N! is a product N(N-1)(N-2)..(2)(1). Therefore, ln N! is a sum
where we have used the property of logarithms that log(abc) = log(a) + log(b) + log(c). The sum is shown in figure below.
The sum of the area under the blue rectangles shown below up to N is ln N!. As you can see the rectangles begin to closely approximate the red curve as m gets larger. The area under the curve is given the integral of ln x.
To solve the integral use integration by parts
Here we let u = ln x and dv = dx. Then v = x and du = dx/x.
Notice that x/x = 1 in the last integral and x ln x is 0 when evaluated at zero, so we have
N
N
1
N
0
N
0
N
N
Which gives us Stirling’s approximation: ln N! = N ln N – N. As is clear from the figure above Stirling’s approximation gets better as the number N gets larger. Let’s try a few numbers N N! ln N! N ln N – N Error 10 3.63 x 10^6 15.1 13.02 13.8% 50 3.04 x 10^64 148.4 145.6 1.88% 100 9.33 x 10^157 363.7 360.5 0.88% 150 5.71 x 10^262 605.0 601.6 0.56%
My calculator overheats at 200!. That is all right since we have shown that the result is converging. In thermodynamics we are often dealing very large N (i.e. of the order of Avagadro’s number). Clearly, for these values Stirling’s approximation is excellent.
0
N
0
N