Stirling's approximation
The Stirling formula is a mathematical formula with which one can calculate approximate values for large factorials. It is named after the mathematician James Stirling.
Basic
The Stirling formula in its simplest form is an asymptotic formula
The individual elements of this formula, see Faculty (!), Square root ( √), circle number ( π ) and exponential ( e).
A derivation can be found in the article Sattelpunktsnäherung.
Specifically applies to:
In particular, the limit of the fraction is equal to 1
The Stirling series for by the Euler MacLaurin sum formula is
Wherein the k-th Bernoulli number designated. As an approximation we consider only a finite number of terms. The error is on the order of the first neglected member. Example: If you stop trying after the third link is the absolute error less than. The series itself does not converge for fixed n, it is an asymptotic expansion.
For n > 7.31 × 1043 one member for a relative error less than 1 percent is sufficient:
For satisfying two members for a relative error less than 0.1 percent:
For small n can be calculated from the formula for three terms a simple formula for n! derived. with
Results in the approximation
The error (at minimal additional computational effort for calculation of the first two terms ) of less than 3% for n = 0, less than 1% for n> 0 and less than 0.1% for n> 2
Substituting in the exponential results for:
And by inserting the Stirling number in the series of the exponential function:
Where the coefficients satisfy any simple education law.
Derivation of the first two terms
The formula is often used in statistical physics in the limit of large particle numbers, as they occur ( scale particles ) in thermodynamic systems. Thermodynamic considerations, it is usually quite sufficient to consider the first two elements. This formula can be extracted simply by using only the first term of the Euler - MacLaurin formula:
Generalization: the Stirling formula for the gamma function
For all
Wherein a function which satisfies all.
The individual elements of this formula see gamma function (), square root ( √), circle number ( π ) and exponential ( e).
For all the value is an approximation of the above formula with so always a bit too small. The relative error is, however, smaller for x ≥ 9 % and less than 1 for x ≥ 84 than 0.1%.
It applies to all
Which arise as a special case the approximation formulas of the previous section.
Applications
The Stirling formula is used in all applications where the exact values of a faculty are not important. In particular, in the calculation of the information of a message, and the calculation of the entropy of a statistical ensemble of sub- result of the Stirling formula -simplification.
Example: Consider a system with several subsystems, each of which can assume different states. Furthermore, it is known that the condition can be adopted by a probability. This subsystems must reside in the state and it is. The number of possible distributions of a system as described above is then
And applies to the entropy
Using the Stirling formula can now be up to errors of order, this formula simplifies to
Thus results for the entropy of each of the subsystems, the well-known formula
Similarly, we obtain ( up to a constant prefactor ) for the information content of a well -defined system, the formula