Random Walk and Probability: Complete Derivations
The one-dimensional random walk is the fundamental model used to teach probability theory in statistical mechanics. It illustrates how microscopic randomness leads to macroscopic predictability (diffusion). Below is the rigorous, step-by-step derivation of every mathematical result in this model, from the binomial distribution to the Gaussian continuum limit.
1. The 1D Random Walk Model
Consider a particle moving along a 1D axis (lattice) with step length \( \ell \).
- Total Steps: \( N \)
- Step Right: Probability \( p \)
- Step Left: Probability \( q \)
- Normalization: \( p + q = 1 \)
2. Defining Position and Variables
Let:
- \( n_1 \): Number of steps to the right.
- \( n_2 \): Number of steps to the left.
The Constraints
1. The total number of steps is fixed:
2. The net displacement \( x \) is the difference in steps multiplied by the step length:
We define an integer variable \( m \) to represent the net difference in steps:
Solving for \( n_1 \) and \( n_2 \)
We have a system of two linear equations:
(2) \( n_1 - n_2 = m \)
Step 1: Add equation (1) and (2):
Step 2: Subtract equation (2) from (1):
3. The Probability Distribution
Probability of a Single Sequence
Consider a specific sequence of steps (e.g., Right, Right, Left...). Since steps are independent, we multiply probabilities:
Multiplicity (Counting Sequences)
How many distinct sequences result in exactly \( n_1 \) right steps and \( n_2 \) left steps? This is a combinatorics problem: choosing \( n_1 \) slots for right steps out of \( N \) available slots.
Total Probability \( W_N(n_1) \)
The total probability is the product of the probability per sequence and the number of sequences:
This is the Binomial Distribution.
Position Probability \( P_N(m) \)
Substitute \( n_1 = \frac{N+m}{2} \) and \( n_2 = \frac{N-m}{2} \) into the equation above:
4. Statistical Averages (Generating Function Method)
To find the mean and variance without summing complex series, we use the derivative trick on the normalization condition:
Derivation of the Mean \( \overline{n_1} \)
Step 1: Take the derivative of the sum with respect to \( p \):
Step 2: Apply the derivative to the term \( p^{n_1} \) inside the sum:
Step 3: Multiply the entire equation by \( p \):
The term in brackets is \( W_N(n_1) \). The sum is the definition of the mean \( \overline{n_1} \). Since \( p+q=1 \):
Derivation of the Variance \( (\delta n_1)^2 \)
We need the second moment \( \overline{n_1^2} \). We start by differentiating twice, but it's easier to use the operator \( p \frac{\partial}{\partial p} \) twice.
Step 1: Differentiate the result of the first derivative again (before multiplying by p):
Step 2: This is algebraically complex because \( q \) depends on \( p \) if we strictly enforce \( p+q=1 \) later. A cleaner way is treating \( p \) and \( q \) as independent variables until the end, or acknowledging \( \overline{n_1^2} - \overline{n_1}^2 \). The standard result is:
Step 3: Calculate Variance:
Variance in Displacement \( x \)
Since \( x = m\ell = (2n_1 - N)\ell \), the variance of \( x \) relates to \( n_1 \):
Substituting \( (\delta n_1)^2 = Npq \):
5. Derivation of Gaussian Approximation (Stirling's Method)
We want to approximate \( \ln W_N(n_1) \) for large \( N \). We use Stirling's approximation:
The log of the probability is:
Step 1: The First Derivative (Finding the Maximum)
We treat \( n_1 \) as continuous. Differentiating \( \ln W \) with respect to \( n_1 \):
Using \( \frac{d}{dx}(x \ln x - x) = \ln x \):
Set derivative to zero to find the peak \( \overline{n_1} \):
Since \( p+q=1 \), we recover \( \overline{n_1} = Np \).
Step 2: The Second Derivative (The Width)
Differentiate \( \ln \left( \frac{N-n_1}{n_1} \frac{p}{q} \right) \) with respect to \( n_1 \):
Evaluate this at the peak \( n_1 = Np \) (and \( N-n_1 = Nq \)):
Step 3: Taylor Expansion and Exponentiation
Expand \( \ln W \) about the peak \( n_1 = Np \). Let \( \eta = n_1 - Np \):
Exponentiating gives the Gaussian form:
The normalization constant \( A \) is found by integral \( \int_{-\infty}^{\infty} A e^{-x^2/2\sigma^2} dx = 1 \). Here \( \sigma^2 = Npq \). The result is \( A = \frac{1}{\sqrt{2\pi Npq}} \).
6. Continuum Limit: The Diffusion Equation
We transform the discrete probability \( P(m) \) to a continuous probability density \( P(x) \).
- Substitute variable: \( x = m\ell \).
- Substitute drift: \( \bar{x} = N(p-q)\ell \).
- Substitute variance: \( \sigma_x^2 = 4Npq\ell^2 \).
The Gaussian becomes:
Consider the unbiased case (\( p=q=1/2 \)) where \( \bar{x}=0 \):
Let \( t = N\tau \) (time) and \( D = \frac{\ell^2}{2\tau} \). Then \( N\ell^2 = \frac{t}{\tau} \ell^2 = 2Dt \). Substituting \( 2Dt \) into the equation:
This function is the fundamental solution (Green's function) to the Diffusion Equation: