Stirling's Approximation - Speed of Convergence and Error Estimates

Speed of Convergence and Error Estimates

More precisely,

with

Stirling's formula is in fact the first approximation to the following series (now called the Stirling series):

 n!\sim\sqrt{2\pi n}\left({n\over e}\right)^n \left( 1 +{1\over12n} +{1\over288n^2} -{139\over51840n^3} -{571\over2488320n^4} + \cdots \right)
 =\sqrt{2\pi n}\left({n\over e}\right)^n \left( 1 +{1\over(2^1)(6n)^1} +{1\over(2^3)(6n)^2} -{139\over(2^3)(2\cdot3\cdot5)(6n)^3} -{571\over(2^6)(2\cdot3\cdot5)(6n)^4} + \cdots \right).

Explicit formula for the coefficients in this series was given by G. Nemes . The first graph in this section shows the relative error vs. n, for 1 through all 5 terms listed above.

As, the error in the truncated series is asymptotically equal to the first omitted term. This is an example of an asymptotic expansion. It is not a convergent series; for any particular value of n there are only so many terms of the series that improve accuracy, after which point accuracy actually gets worse. This is demonstrated in the next graph, which shows the relative error vs. the number of terms in the series, for larger numbers of terms. (More precisely, let be the Stirling series to t terms evaluated at n. The graphs show, which, when small, is essentially the relative error.)

Writing Stirling's series in the form:

 \ln n!\sim n\ln n - n + {1\over 2}\ln(2\pi n) +{1\over12n} -{1\over360n^3} +{1\over1260n^5} -{1\over 1680n^7} +\cdots
 =n\ln n - n + {1\over 2}\ln(2\pi n) +{1\over(2^2\cdot3^1)n} -{1\over(2^3\cdot3^2\cdot5^1)n^3} +{1\over(2^2\cdot3^2\cdot5^1\cdot7^1)n^5} -{1\over(2^4\cdot3^1\cdot5^1\cdot7^1)n^7} +\cdots.

it is known that the error in truncating the series is always of the same sign and at most the same magnitude as the first omitted term.

Read more about this topic:  Stirling's Approximation

Famous quotes containing the words speed of, speed, error and/or estimates:

    The terror of the atom age is not the violence of the new power but the speed of man’s adjustment to it—the speed of his acceptance.
    —E.B. (Elwyn Brooks)

    There exist certain individuals who are, by nature, given purely to contemplation and are utterly unsuited to action, and who, nevertheless, under a mysterious and unknown impulse, sometimes act with a speed which they themselves would have thought beyond them.
    Charles Baudelaire (1821–1867)

    Never miss an opportunity to allow a child to do something she can and wants to on her own. Sometimes we’re in too much of a rush—and she might spill something, or do it wrong. But whenever possible she needs to learn, error by error, lesson by lesson, to do better. And the more she is able to learn by herself the more she gets the message that she’s a kid who can.
    Polly Berrien Berends (20th century)

    Writing a book I have found to be like building a house. A man forms a plan, and collects materials. He thinks he has enough to raise a large and stately edifice; but after he has arranged, compacted and polished, his work turns out to be a very small performance. The authour however like the builder, knows how much labour his work has cost him; and therefore estimates it at a higher rate than other people think it deserves,
    James Boswell (1740–1795)