Chemistry 531 The One-Dimensional Random Walk
Chemistry 531 The One-Dimensional Random Walk
Chemistry 531 The One-Dimensional Random Walk
1 Introduction
What follows is a treatment of the one-dimensional random walk that we have discussed in
class. It is hoped that these notes will augment the work we have done during lecture.
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
The walker can take steps of unit length either to the left or to the right. At each step,
the direction of the walk is chosen completely at random. For example, after one step the
location of the walker will be either -1
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
or at +1
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
1
If the probabilities of left and right steps are equal, after one step each of the two pos-
sible locations are equally probable. The statement of equal probability means that if many
walkers at the origin of their own coordinate systems make one random step each, 50 per
cent of the walkers will find themselves at location +1 and 50 per cent will find themselves
at location -1. After two steps the possible locations are +2
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
or 0
X
X
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
or -2
-5 -4 -3 -2 -1 0 1 2 3 4 5 6
Note that two walkers have been placed at location 0. The two walkers at 0 represent
the two ways the walkers can reach 0; a step to the left followed by a step to the right or a
step to the right followed by a step to the left. In contrast, the walker can reach location -2
only by two steps to the left and +2 only by making two steps to the right. Consequently,
if many walkers make two steps each, the fraction that will be at location 0 will be 1/2.
Additionally, 1/4 of the walkers will be at location +2 and 1/4 of the walkers will be at
location -2.
The probability distribution obtained by continuing the walk for more steps is given by
a technique developed by Pascal. Known as Pascal’s triangle, it is a set of integers obtained
by beginning with the number 1 in the first line and generating subsequent lines by addition
of the integers in the previous line.
2
The form of Pascal’s triangle is
1
11
121
1331
14641
1 5 10 10 5 1
1 6 15 20 15 6 1
The meaning of the last line shown for Pascal’s triangle is that if a random walk is executed
with a total of 6 steps, there are 20 ways of reaching the origin, 15 ways each of reaching
locations ± 2, 6 ways each of reaching locations ± 4 and only 1 way each of reaching
locations ± 6. If the number of ways is plotted in a histogram, the random walk distribution
is qualitatively seen to approach that of a bell shaped curve. We make this more explicit in
the next section.
nR − nL = m (3)
We wish to develop an expression for the probability that the walker finds itself at location
m after N steps. Notice that m, N , nR and nL are not all independent by virtue of Eqs. (2)
and (3). In particular we can write
m = 2nR − N (4)
so that we can express the probability we seek either in terms of m or nR . We shall develop
expressions for both. We first note that the probability of any particular sequence of left
and right steps is given by pnR q nL . In giving this expression, we have assumed that the
3
probability of any one particular sequence is equal to the probability of any other particular
sequence. Then the probability of the walker making nR steps to the right and nL steps to
the left is given by the probability of each possible sequence multiplied by the number of
possible sequences. By the binomial distribution, this probability is then given by
N ! nR nL
PN (nR , nL ) = p q (5)
nR !nL !
Expressing Eq.(5) in terms of m alone or nR alone we have
N!
PN (nR ) = pnR q N −nR (6)
nR !(N − nR )!
or
N!
PN (m) = p1/2(N +m) q 1/2(N −m) (7)
[1/2(N + m)]![1/2(N − m)]!
Often, the probability function P (u) is defined so that it satisfies a normalization condition;
i.e.
N
X
P (uj ) = 1 (9)
j=1
For two functions of u, f (u) and g(u) and for a numerical constant c, it is easy to prove the
relation
< f (u) + cg(u) >=< f (u) > +c < g(u) > (11)
A particularly important quantity is the deviation of u from its mean, defined by
4
In terms of ∆u, we can define the n’th moment of u about the mean by < (∆u)n >. For the
particular case that n = 2 we have
= (p + q)N (17)
=1 (18)
by virtue of Eq. (1). Because Eq. (6) has now been shown to be a normalized probability
distribution, we can write
N
N!
pnR q N −nR
X
< nR >= nR (19)
nR =0 nR !(N − nR )!
N
N!
q N −nR nR pnR
X
= (20)
n
nR =0 R !(N − n R )!
Using the identity
∂ n
npn = p p (21)
∂p
Eq. (20) becomes
N
N! ∂
q N −nR p pnR
X
< nR >= (22)
nR =0 nR !(N − nR )! ∂p
N
∂ X N!
=p q N −nR pnR (23)
∂p nR =0 nR !(N − nR )!
5
∂
=p (p + q)N (24)
∂p
= Np (25)
an intuitively appealing result. Using similar methods, it is easy to show that < nL >= N q.
The demonstration of the latter result is left as an exercise. To obtain the standard deviation
of the random walk probability distribution, we need an expression for < n2R > which is now
obtained using the same approach. We have
N
N!
< n2R >= n2R pnR q N −nR
X
(26)
nR =0 nR !(N − nR )!
N
N!
q N −nR n2R pnR
X
= (27)
nR =0 nR !(N − nR )!
6
5 Behavior for large N
We now develop an expression for the random walk probability distribution in the limit as
the number of steps becomes large. We will begin with Eq. (7) and be interested in the limit
that N → ∞ under conditions where m << N . For simplicity we will specialize to the case
that p = q = 1/2. The extension of the result to the more general case will be given in the
next section.
The development requires the introduction of Stirling’s approximation which is exact in
the limit of infinite N
1 1
ln N ! ∼
= (N + ) ln N − N + ln(2π) (38)
2 2
Using Stirling’s approximation and Eq. (7) we can write
1 1 1 1
lim ln PN (m) = (N + ) ln N − N + ln(2π) − (N + m + 1) ln[ (N + m)]
N →∞ 2 2 2 2
1 1 1 1 1 1
+ (N + m) − ln(2π) − (N − m + 1) ln[ (N − m)] + (N − m) − ln(2π) − N ln 2 (39)
2 2 2 2 2 2
1 1 1 1 1 1
= N ln N + ln N − ln(2π)−N ln 2− (N +m+1) ln[ (N +m)]− (N −m+1) ln[ (N −m)]
2 2 2 2 2 2
(40)
1 1 1 N m 1 N m
= N ln N + ln N − ln(2π)−N ln 2− (N +m+1) ln[ (1+ )]− (N −m+1) ln[ (1− )]
2 2 2 2 N 2 2 N
(41)
1 1 1 N 1 N
= N ln N + ln N − ln(2π) − N ln 2 − (N + m + 1) ln[ ] − (N − m + 1) ln[ ]
2 2 2 2 2 2
1 m 1 m
− (N + m + 1) ln[(1 + )] − (N − m + 1) ln[(1 − )] (42)
2 N 2 N
We now introduce the Taylor expansion for the natural logarithm
7
Taking the exponential of each side of Eq. (46), we finally obtain
1/2
2
2 /2N
lim PN (m) = e−m (47)
N →∞ πN
Equation (47) is in the form of a continuous probability distribution in m. It is usual to
express the probability in terms of a continuous displacement coordinate x. If we imagine
the one-dimensional walker taking steps of length `, then x = m`, and Eq. (47) takes the
form
2 2
PN (x) = Ae−x /2σ (48)
In Eq. (48) A is a normalization factor to be discussed in the next section, and
√
σ = N `2 (49)
Equation (48) is called a Gaussian probability distribution. The Gaussian probability distri-
bution is so important to statistical mechanics, that we discuss its properties in a separate
section.
where D represents the domain of the problem. We now wish to normalize the Gaussian
distribution obtained from the large N limit of the random walk problem. We first need the
result of an important general integral
Z ∞
π
r
−ax2
e dx = (51)
−∞ a
Then from Eq. (48) Z ∞
2 /2σ 2
√
Ae−x dx = A 2πσ 2 (52)
−∞
8
Before continuing, we need to generalize the random walk distribution for large N for the
case where p 6= q. In that case the normalized Gaussian distribution is of the form
s
1
PN (x) = exp(−(x − µ)2 /2σ 2 ) (54)
2πσ 2
where µ is a parameter, the meaning of which will be made clear shortly. For continuous
probability distribution, averages are defined similarly to the discrete case. If f (x) is some
general function of x, we define the average or mean of f by the relation
R∞
−∞ dxP (x)f (x)
< f (x) >= R∞ (55)
−∞ dxP (x)
Figure 1
6
P (x) 3
0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
x
the overall normalization to unity. We have also put µ=0., arbitrarily. Notice that the peak
of the distribution is centered about x = µ as expected. In the dark solid line of Figure 1, we
9
also plot the normalized Gaussian distribution peaked about x = µ = 0., but in this case we
have taken σ = .05. Notice that the effect of decreasing σ is to make the overall distribution
more narrow while increasing the peak height to maintain the normalization. This is one
indiction that σ is a measure of the width of the Gaussian distribution.
Another way of understanding σ as a width is by integrating the distribution from −σ to
σ (notice σ has units of length). This integration must be performed numerically, because
the indefinite integral of a Gaussian is not analytic 1 . By using techniques of numerical
integration, one can show that
1 Zσ
dxe−x /2σ ∼
2 2
√ = .67 (58)
2πσ 2 −σ
i.e., approximately two thirds of the area under a Gaussian distribution lies between x = −σ
and x = σ. As σ becomes smaller, the distribution must become sharper so that most of the
area below it will lie in the region within its standard deviation.
A third way of understanding the relation between the standard deviation and the width
of a distribution is by defining the ratio of the height of the distribution at x = σ to its
maximum at x = 0; i.e. we define R by
2 2
e−σ /2σ
R= (59)
e0
= e−.5 (60)
√
We see that at x = σ the Gaussian has fallen to 1/ e of its maximum value. As σ becomes
smaller, the distribution approaches zero more and more rapidly with x.
10
Another example is experimental measurements in a laboratory. If a set of measurements
of some quantity is made in a laboratory, the results will be distributed about the mean
in a Gaussian distribution if the measurements are strictly statistically independent. As we
shall see later in the semester the energies of member subsystems in a canonical ensemble
fall on a Gaussian distribution about the mean energy of the system. It is the generality
of the Gaussian distribution that made our study of the one-dimensional random walk so
important.
11