Partition functions  
 
  Monte Carlo  
 
  Gaussian  
 
  Poissonian  
 
  home  
 
  ask us  
 

 
Contents

Combinatorics


Probability & Statistics




© The scientific sentence. 2010


Stirling's approximation




1. Stirling's approximation




n! = 1 x 2 x 3 x ... x n
ln n! = ln 1 + ln 2 + ln 3 + ... + ln n 
= ∑ ln k [k: 1 → n] ≈ ∫ ln x dx [1 → n]
Since : ∫ ln x = xln x - x, 
we have:
ln n! =  xln x - x [1 → n] = n ln n - n + 1 
N is large ⇒ n + 1 ≈ n. It follows:

ln n! ≈ n ln n - n 

Stirling's approximation ln (nne-n) = n ln n - n

2. Stirling's series


Stirling's series 
Factorial function is defined by Gamma function as:
n! = γ(n+1) = ∫ xn e-x dx  [x:0 → ∞]

Let's take the derivative of ln (xn e-x). We have:
d[ln (xn e-x)]/dx = d[n ln x - x] - n/x -1 
Then the expression ln (xn e-x) is important near 
x = n. Let's write x = n + ε, where ε << n. It follows:
ln (xn e-x) = n ln (n + ε) - (n + ε)

Using the expansion of ln (1 + ξ) = ξ - ξ2/2 + 
ξ3/3 - ... + (-1)n+1ξn/n 
= ∑ (-1)n+1ξn/n [1 → ∞]; we get:

ln (xn e-x) = n ln [n (1 + ε/n)] - (n + ε) 
= n ln n + n ln (1 + ε/n) - n - ε = 
n ln n + nε/n - n(ε/n)2/2 + ... - n - ε 
= n ln n - n - (ε)2/2n + ...

Hence:
xn e-x ≈ nne-ne- (ε)2/2n 
= nne-ne- (ε)2/2n 

Then:

n! = ∫ xn e-x dx [x: 0 → ∞] = 
∫ nne-ne- (ε)2/2n dε [ε: -n → ∞]
≈ nne-n∫e- (ε)2/2n dε [ε: - ∞  → + ∞]

We have:
∫e- (ζ)2/2n dζ [ζ : - ∞  → + ∞]
= (2πn)1/2

Then:
n! ≈ nne-n (2πn)1/2 
= (2π)1/2 nn+1/2e-n 

Let's take the ln:

ln n! ≈ n ln n - n + (1/2) ln (2πn) = (n+1/2) ln n  - n +(1/2) ln (2π)

Stirling's formula ln n! ≈ n ln n - n + (1/2) ln (2πn) ln n! ≈ (n+1/2) ln n - n + (1/2) ln (2π)
With large n, The above expression reduces to Stirling's approximation:
Stirling's approximation ln n! ≈ n ln n - n



  
Google
Web
ScientificSentence
 



chimie labs
|
scientific sentence
|
java
|
Perl
|
php
|
green cat
|
contact
|


© Scientificsentence 2010. All rights reserved.