Log in Sign up
Back to Discover
🔢

Stirling's approximation

math Maturity 11-13

Math helps us find big numbers.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
Sometimes numbers get too big to count. We use a special way to guess them. It is a very good guess. This helps us work fast. Can you find big numbers?

41 words

Sometimes we need to count very large groups.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
A factorial is a way of multiplying numbers in a row. These numbers can grow very fast. They can become too big to write down.

We can use a special rule to guess these big numbers. This rule is called Stirling's formula. It was named after a man named James Stirling.

Another man named Abraham de Moivre found a similar rule first. His rule was not as exact as Stirling's.

Stirling's rule is a very good guess. It works well even for small numbers. It helps us understand math more easily.

Stirling error vs number of terms.svg
Stirling error vs number of terms.svg
This rule makes big math much simpler to use.

118 words

Sometimes we need to find a value for a factorial. A factorial is a way of multiplying numbers in a row. These numbers grow very fast. They can become too large to write down easily.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
We can use a special rule to guess these big numbers. This rule is called Stirling's formula. It is named after a man named James Stirling.

Abraham de Moivre found a similar rule first in 1721. His rule was not as exact as Stirling's. Stirling showed a more precise way in 1730. His rule is a very good guess. It works well even for small numbers.

Stirling error vs number of terms.svg
Stirling error vs number of terms.svg

In computer science, this rule is very useful. It helps people study how to sort items. There are even ways to use it for the gamma function. The gamma function is a way to extend factorials to other numbers. Some people found ways to make the rule work for calculators. These new ways help computers find answers very quickly.

Stirling series relative error.svg
Stirling series relative error.svg

174 words

In math, we often work with factorials. A factorial is what you get when you multiply a whole row of numbers together. These numbers grow very fast. They can quickly become too huge to write down easily.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
To help with this, mathematicians use a special tool called Stirling's approximation. This tool is a way to make a very good guess for a factorial. It is called an asymptotic approximation. This means the guess gets better as the numbers get larger. Even for small numbers, the guess is quite accurate.

How does this math tool work? One way to find it is by using a sum. We can turn that sum into an integral, which is a way to find the area under a curve.

Stirling series relative error.svg
Stirling series relative error.svg
Mathematicians also use something called the Euler–Maclaurin formula to find the error. This formula helps us see how far off our guess might be. You can also use a method called Laplace's method to find the formula. Another way involves the Poisson distribution and the Central Limit Theorem. These methods all help us reach the same helpful result.

There is a long history behind this formula. Abraham de Moivre first discovered a similar rule in 1721. His rule was a bit less precise than what we use now. He used it to describe the natural logarithm of a constant. Later, a mathematician named James Stirling made a big contribution in 1730. He showed exactly what that constant was. He shared his work in a book called Methodus Differentialis. This book was published in London in 1730.

Stirling error vs number of terms.svg
Stirling error vs number of terms.svg

There are many important facts about this rule. For example, it can be used for the gamma function. The gamma function is a way to use factorials for many different types of numbers. Some people even found ways to make the rule work for calculators. Robert H. Windschitl suggested a way in 2002 to help calculators. Gergő Nemes proposed a simpler version in 2007. Another famous mathematician, Srinivasa Ramanujan, also wrote about these kinds of ideas in his lost notebook. These different versions help us solve hard problems quickly.

This math helps us in the real world of computers. In computer science, people use it to study sorting. It helps them find the worst-case lower bound for comparison sorting. This is a way to see how long a task might take.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
It is like knowing the longest a trip might take before you leave. By using these guesses, scientists can plan better. It turns a hard, huge problem into something we can manage. This makes it a very important tool for many people.

451 words

In mathematics, Stirling's approximation is a powerful tool used to estimate factorials. A factorial is the product of all positive integers up to a specific number. As these numbers increase, factorials grow at an incredibly rapid rate.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
Because these values become so massive, calculating them exactly can be difficult. Stirling's formula provides an asymptotic approximation, meaning the estimate becomes increasingly accurate as the input value grows. It is an essential method for handling the scale of large-number mathematics.

To understand how this works, mathematicians often look at the natural logarithm of the factorial. This is useful because the logarithm of a product is the sum of the logarithms. By converting the product into a sum, one can approximate that sum using an integral. This process essentially calculates the area under a curve to estimate the total value.

Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
To refine this estimate, the Euler–Maclaurin formula is applied. This formula helps account for the error between the sum and the integral by using Bernoulli numbers. This step-by-step refinement allows for a much more precise result.

There are several ways to derive or express this approximation. One common method involves using Laplace's method, which is a way to approximate integrals of certain functions. Another approach uses the Central Limit Theorem and the Poisson distribution. In this version, the Poisson distribution is shown to converge toward a normal distribution. By evaluating the density function at the mean, mathematicians can derive the same logarithmic form. These different paths all lead to the same fundamental understanding of how factorials behave.

The history of this formula involves several important mathematical figures. Abraham de Moivre first discovered a related result in 1721. His version provided an approximate rational-number expression for the natural logarithm of a specific constant. However, it was not as precise as the version we use today. In 1730, James Stirling made a major contribution in his work, Methodus Differentialis. He published this in London and proved the exact value of the constant.

Stirling error vs number of terms.svg
Stirling error vs number of terms.svg
This work transformed the initial discovery into a precise mathematical tool.

Stirling's approximation is highly significant in the field of computer science. It is frequently used to find the worst-case lower bound for comparison sorting. This helps researchers understand the minimum number of steps required to sort a list of data. In these applications, it is often convenient to use the binary logarithm. The formula is also used to estimate the gamma function. The gamma function is a mathematical concept that extends the idea of factorials to complex numbers. This allows the approximation to be used in much broader mathematical contexts.

One fascinating aspect of the formula is the Stirling series, which provides higher-order corrections. This series allows for even greater accuracy by adding more terms.

Stirling series relative error.svg
Stirling series relative error.svg
However, this is an asymptotic expansion rather than a convergent series. This means that for any specific number, adding too many terms will eventually make the accuracy worse. The error in a truncated series is typically at most the same magnitude as the first omitted term. This creates a delicate balance for mathematicians trying to achieve perfect precision.

Modern technology has also found ways to adapt these ideas for practical use. For example, Robert H. Windschitl suggested an approximation in 2002 for calculators. This version helps devices with limited memory compute the gamma function accurately. In 2007, Gergő Nemes proposed a version that is even simpler but equally precise. The famous mathematician Srinivasa Ramanujan also included related ideas in his lost notebook. These modern developments ensure that Stirling's ideas remain useful in our digital age.

606 words
🖼️ Images & Media (3)
File:Mplwp factorial gamma stirling.svg
Mplwp factorial gamma stirling.svg
File:Stirling series relative error.svg
Stirling series relative error.svg
File:Stirling error vs number of terms.svg
Stirling error vs number of terms.svg
Up Next
🔢
Big O notation
Math
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.