logo

Statistical Proof of Stirling's Formula 📂Mathematical Statistics

Statistical Proof of Stirling's Formula

정리

$$ \lim_{n \to \infty} {{n!} \over {e^{n \ln n - n} \sqrt{ 2 \pi n} }} = 1 $$

설명

The Stirling approximation, or Stirling’s formula, is usefully applied in various fields, including statistics and physics. If one is well-versed in probability theory, the mathematical statistical proof can be more intuitive and easier to understand compared to other proofs.

같이보기

증명

Let’s denote it as $X_{1} , \cdots , X_{n} \overset{\text{iid}}{\sim} \exp (1)$.

Relationship between Exponential Distribution and Gamma Distribution: $$ \displaystyle \Gamma \left(1, { 1 \over \lambda } \right) \iff \text{exp} (\lambda) $$

Sum of Gamma Distributions: If it is $X_i \sim \Gamma ( k_{i}, \theta)$, then $$ \displaystyle \sum_{i=1}^{n} X_{i} \sim \Gamma \left( \sum_{i=1}^{n} k_{i} , \theta \right) $$

Since $X_{1} , \cdots , X_{n}$ is iid, $Y = \sum_{k=1}^{n} X_{k}$ follows a Gamma Distribution with a degree of freedom of $n,1$, denoted as $\Gamma (n,1)$. Meanwhile, due to $E X_{k} = \operatorname{Var} X_{k} = 1$, according to the Central Limit Theorem when $n \to \infty$ $$ {{ \sum_{k=1}^{n} X_{k}/n - 1 } \over { 1 / \sqrt{n} }} \overset{D}{\to} N (0,1) $$ In other words, when $Z$ is a random variable following the standard normal distribution, for all $x \in \mathbb{R}$ $$ \begin{align*} & P \left( {{ Y/n - 1 } \over { 1 / \sqrt{n} }} \le x \right) \to P \left( Z \le x \right) \\ \implies & P \left( Y/n \le {{ x } \over { \sqrt{n} }} + 1 \right) \to P \left( Z \le x \right) \\ \implies & P \left( Y \le \sqrt{n} x + n \right) \to P \left( Z \le x \right) \end{align*} $$ For sufficiently large $n \in \mathbb{N}$, using an approximation formula for the cumulative distribution function $F_{\square}$ $$ F_{Y} \left( \sqrt{n} x + n \right) \approx F_{Z} (x) $$ can be expressed as follows.

Probability Density Function of Gamma Distribution $$ f(x) = {{ 1 } \over { \Gamma ( k ) \theta^{k} }} x^{k - 1} e^{ - x / \theta} \qquad , x > 0 $$

Probability Density Function of Standard Normal Distribution $$ f(z) = {{ 1 } \over { \sqrt{2 \pi} }} \exp \left[ - {{ z^{2} } \over { 2 }} \right] $$

Differentiating both sides by $x$, according to the Fundamental Theorem of Calculus $$ \sqrt{n} \cdot {{ 1 } \over { \Gamma ( n ) 1^{n} }} \left( \sqrt{n} x + n \right)^{n - 1} e^{ - \left( \sqrt{n} x + n \right) / 1} \approx {{ 1 } \over { \sqrt{2 \pi} }} \exp \left[ - {{ x^{2} } \over { 2 }} \right] $$ Here, if it’s $x = 0$, we obtain the following. $$ \sqrt{n} \cdot {{ 1 } \over { \Gamma ( n ) }} \left( n \right)^{n - 1} e^{ - n } \approx {{ 1 } \over { \sqrt{2 \pi} }} $$ Since the Gamma function is a generalization of the factorial, if $\Gamma (n) = (n-1)!$, and multiplying both sides by $(n-1)!\sqrt{2\pi}$, $$ \sqrt{2 \pi n} e^{(n-1) \log n} e^{-n} \approx (n-1)! $$ Summarizing the above, $$ \begin{align*} & e^{n\log n - n} e^{-\log n} \sqrt{2 \pi n} \approx (n-1)! \\ \implies & e^{n\log n - n} {{ 1 } \over { n }} \sqrt{2 \pi n} \approx (n-1)! \\ \implies & e^{n\log n - n} \sqrt{2 \pi n} \approx n! \end{align*} $$