Moment Generating Function¶
The moment generating function (MGF) of \(S_n\) encodes all moments in a single formula and provides the most elegant route to the Central Limit Theorem for the random walk.
Definition¶
For \(\lambda \in \mathbb{R}\), the MGF of the symmetric random walk \(S_n = \sum_{i=1}^n \xi_i\) is
Proposition 1.1.2 (Moment Generating Function)
Proof. Since \(\xi_1, \ldots, \xi_n\) are independent, the MGF of their sum factors:
For a single step:
Therefore \(\mathbb{E}[e^{\lambda S_n}] = (\cosh\lambda)^n\). \(\square\)
Recovering Moments¶
The \(k\)-th moment of \(S_n\) can be read off by differentiating the MGF \(k\) times at \(\lambda = 0\):
Using the Taylor expansion \(\cosh\lambda = 1 + \frac{\lambda^2}{2} + \frac{\lambda^4}{24} + \cdots\) and thus
we obtain:
Reading off coefficients:
- \(\mathbb{E}[S_n^2] = n\) (coefficient of \(\lambda^2/2!\)).
- \(\mathbb{E}[S_n^4] = 3n^2 - 2n\) (coefficient of \(\lambda^4/4!\), accounting for the cross term from \(\bigl(\frac{n\lambda^2}{2}\bigr)^2\)).
Both agree with the direct calculations in Moments of Random Walk.
Proof of the CLT via MGF Convergence¶
Theorem 1.1.10 (Central Limit Theorem for the Random Walk)
Proof. Substitute \(\lambda = \theta / \sqrt{n}\) for fixed \(\theta \in \mathbb{R}\):
Using \(\cosh x = 1 + \frac{x^2}{2} + O(x^4)\) as \(x \to 0\):
The function \(e^{\theta^2/2}\) is the MGF of \(\mathcal{N}(0,1)\), and it is finite for all \(\theta \in \mathbb{R}\). Since the MGFs of \(S_n/\sqrt{n}\) converge pointwise to a function that is finite on all of \(\mathbb{R}\), the MGF convergence theorem (see, e.g., Durrett (2019), Theorem 3.3.6) gives convergence in distribution:
MGF convergence theorem
The MGF convergence theorem states: if \(M_{X_n}(\theta) \to M_X(\theta)\) for all \(\theta\) in a neighbourhood of 0, and \(M_X(\theta)\) is finite in that neighbourhood, then \(X_n \xrightarrow{d} X\). Convergence on a neighbourhood of 0 is all the theorem requires; here we have the stronger statement that convergence holds on all of \(\mathbb{R}\).
References¶
- Durrett, R. (2019). Probability: Theory and Examples, 5th ed. Cambridge University Press.
- Feller, W. (1968). An Introduction to Probability Theory and Its Applications, Vol. 2, 3rd ed. Wiley.
Exercises¶
Exercise 1. For the asymmetric random walk with \(\mathbb{P}(\xi_i = +1) = p\) and \(\mathbb{P}(\xi_i = -1) = 1-p\), show that the MGF is \(\mathbb{E}[e^{\lambda S_n}] = (pe^\lambda + (1-p)e^{-\lambda})^n\). Verify that this reduces to \((\cosh \lambda)^n\) when \(p = 1/2\).
Solution to Exercise 1
For the asymmetric walk, the MGF of a single step is:
By independence, the MGF of \(S_n = \sum_{i=1}^n \xi_i\) factors:
When \(p = 1/2\):
so the formula reduces to \((\cosh\lambda)^n\) as required.
Exercise 2. Differentiate \(M_{S_n}(\lambda) = (\cosh\lambda)^n\) twice and evaluate at \(\lambda = 0\) to recover \(\mathbb{E}[S_n^2] = n\). Verify against the direct calculation in Moments of Random Walk.
Solution to Exercise 2
Let \(M(\lambda) = (\cosh\lambda)^n\). First derivative: \(M'(\lambda) = n(\cosh\lambda)^{n-1}\sinh\lambda\). At \(\lambda = 0\): \(M'(0) = n \cdot 1 \cdot 0 = 0 = \mathbb{E}[S_n]\).
Second derivative: \(M''(\lambda) = n(n-1)(\cosh\lambda)^{n-2}\sinh^2\lambda + n(\cosh\lambda)^{n-1}\cosh\lambda = n(n-1)(\cosh\lambda)^{n-2}\sinh^2\lambda + n(\cosh\lambda)^n\). At \(\lambda = 0\): \(M''(0) = 0 + n \cdot 1 = n = \mathbb{E}[S_n^2]\), agreeing with the direct calculation.
Exercise 3. In the CLT proof, we used the approximation \(\left(1 + \frac{\theta^2}{2n} + O(n^{-2})\right)^n \to e^{\theta^2/2}\). Prove this limit rigorously by taking logarithms and using \(\log(1+x) = x - x^2/2 + O(x^3)\) for small \(x\).
Solution to Exercise 3
Let \(a_n = 1 + \frac{\theta^2}{2n} + O(n^{-2})\). We need to show \(a_n^n \to e^{\theta^2/2}\). Take logarithms:
Using \(\log(1+x) = x - x^2/2 + O(x^3)\) with \(x = \frac{\theta^2}{2n} + O(n^{-2})\):
Therefore:
By continuity of the exponential, \(a_n^n = e^{n\log a_n} \to e^{\theta^2/2}\).