TOPICS
Search

Random Walk--1-Dimensional


Let N steps of equal length be taken along a line. Let p be the probability of taking a step to the right, q the probability of taking a step to the left, n_1 the number of steps taken to the right, and n_2 the number of steps taken to the left. The quantities p, q, n_1, n_2, and N are related by

 p+q=1
(1)

and

 n_1+n_2=N.
(2)

Now examine the probability of taking exactly n_1 steps out of N to the right. There are (N; n_1)=(n_1+n_2; n_1) ways of taking n_1 steps to the right and n_2 to the left, where (n; m) is a binomial coefficient. The probability of taking a particular ordered sequence of n_1 and n_2 steps is p^(n_1)q^(n_2). Therefore,

 P(n_1)=((n_1+n_2)!)/(n_1!n_2!)p^(n_1)q^(n_2)=(N!)/(n_1!(N-n_1)!)p^(n_1)q^(N-n_1),
(3)

where n! is a factorial. But this is simply a binomial distribution, so the mean number of steps n_1 to the right is

 <n_1>=pN,
(4)

and the mean number of steps to the left is

 <n_2>=N-<n_1>=N(1-p)=qN.
(5)

Similarly, the variance is given by

 sigma_(n_1)^2=<n_1^2>-<n_1>^2=Npq,
(6)

and the root-mean-square deviation is

 sigma_(n_1)=sqrt(Npq).
(7)
RandomWalkBiased

Consider now the distribution of the distances d_N traveled after a given number of steps,

 d_N=n_1-n_2=2n_1-N,
(8)

as opposed to the number of steps in a given direction. The above plots show d_N(p) for N=200 and three values p=0.1, p=0.5, and p=0.9, respectively. Clearly, weighting the steps toward one direction or the other influences the overall trend, but there is still a great deal of random scatter, as emphasized by the plot below, which shows three random walks all with p=0.5.

RandomWalk

Surprisingly, the most probable number of sign changes in a walk is 0, followed by 1, then 2, etc.

For a random walk with p=1/2, the probability P_N(d) of traveling a given distance d after N steps is given in the following table.

steps-5-4-3-2-1012345
01
11/201/2
21/402/401/4
31/803/803/801/8
41/(16)04/(16)06/(16)04/(16)01/(16)
51/(32)05/(32)0(10)/(32)0(10)/(32)05/(32)01/(32)

In this table, subsequent rows are found by adding half of each cell in a given row to each of the two cells diagonally below it. In fact, it is simply Pascal's triangle padded with intervening zeros and with each row multiplied by an additional factor of 1/2. The coefficients in this triangle are given by

 P_N(d)=1/(2^N)(N; (d+N)/2)
(9)

(Papoulis 1984, p. 291). The moments

 mu_p=sum_(d=-N,-(N-2),...,N)d^pP_N(d)
(10)

of this distribution of signed distances are then given by

mu=0
(11)
mu_2=N
(12)
mu_3=0
(13)
mu_4=N(3N-2),
(14)

so the mean is mu=0, the skewness is gamma_1=0, and the kurtosis excess is

 gamma_2=-2/N.
(15)

The expectation value of the absolute distance after N steps is therefore given by

<d_N>=sum_(d=-N,-(N-2),...)^(N)|d|P_N(d)
(16)
=1/(2^N)sum_(d=-N,-(N-2),...)^(N)(|d|N!)/(((N+d)/2)!((N-d)/2)!).
(17)

This sum can be done symbolically by separately considering the cases N even and N odd. First, consider even N so that N=2J. Then

<d_(2J)>=(N!)/(2^N)[sum_(d=-2J,; -2(J-1),...)^(-2)(|d|)/(((2J+d)/2)!((2J-d)/2)!)+0+sum_(d=2,4,...)^(2J)(|d|)/(((2J+d)/2)!((2J-d)/2)!)]
(18)
=(N!)/(2^N)[sum_(d=-J,-(J-1),...)^(-1)(|2d|)/(((2J+2d)/2)!((2J-2d)/2)!)+sum_(d=1,2,...)^(J)(|2d|)/(((2J+2d)/2)!((2J-2d)/2)!)]
(19)
=(N!)/(2^N)[2sum_(d=1)^(J)(2d)/((J+d)!(J-d)!)]
(20)
=(N!)/(2^(N-2))sum_(d=1)^(J)d/((J+d)!(J-d)!).
(21)

But this sum can be evaluated analytically as

 sum_(d=1)^Jd/((J+d)!(J-d)!)=1/(2Gamma(J)Gamma(1+J)).
(22)

Writing J=N/2, plugging back in, and simplifying gives

 <d_(N even)>=2/(sqrt(pi))(Gamma(1/2+1/2N))/(Gamma(1/2N))=((N-1)!!)/((N-2)!!),
(23)

where N!! is the double factorial.

Now consider N odd, so N=2J-1. Then

<d_(N odd)>=<d_(2J-1)>
(24)
=(N!)/(2^N)[sum_(d=-(2J-1),; -(2J+1),...)^(-1)(|d|)/(((2J-1+d)/2)!((2J-1-d)/2)!)+sum_(d=1,3,...)^(2J-1)(|d|)/(((2J-1+d)/2)!((2J-1-d)/2)!)]
(25)
=(N!)/(2^(N-1))[sum_(d=1,3,...)^(2J-1)d/(((2J-1+d)/2)!((2J-1-d)/2)!)]
(26)
=(N!)/(2^(N-1))[sum_(d=2,4,...)^(2J)(d-1)/(((2J-2+d)/2)!((2J-d)/2)!)]
(27)
=(N!)/(2^(N-1))[sum_(d=1)^(J)(2d-1)/((J+d-1)!(J-d)!)].
(28)

But this sum can be evaluated analytically as

 sum_(d=1)^J(2d-1)/((J+d-1)!(J-d)!)=1/([Gamma(J)]^2).
(29)

Writing J=(N+1)/2, plugging back in, and simplifying gives

<d_(N odd)>=(N!)/(2^(N-1)[Gamma(1/2+1/2N)]^2)
(30)
=2/(sqrt(pi))(Gamma(1/2N+1))/(Gamma(1/2N+1/2))
(31)
=(N!!)/((N-1)!!).
(32)

Both the even and odd solutions can be written in terms of J as

 <d_J>=2/(sqrt(pi))(Gamma(J+1/2))/(Gamma(J))=((2J-1)!!)/((2J-2)!!),
(33)

or explicitly in terms of N as

<d_N>=2^(1-n)[n/2](n; [n/2])
(34)
={((N-1)!!)/((N-2)!!) for N even; (N!!)/((N-1)!!) for N odd.
(35)

The first few values of <d_N> for N=0, 1, ... are therefore 0, 1, 1, 3/2, 3/2, 15/8, 15/8, 35/16, 35/16, ... (OEIS A086116 and A060818; Abramowitz and Stegun 1972, Prévost 1933, Hughes 1995), where the terms of each pair are given by the generating function

 (1-x)^(-3/2)=1+3/2x+(15)/8x^2+(35)/(16)x^3+(315)/(128)x^4+....
(36)

These numbers also arise in the heads-minus-tails distribution.

Now, examine the asymptotic behavior of <d_N>. The asymptotic expansion of the gamma function ratio is

 (Gamma(J+1/2))/(Gamma(J))=sqrt(J)(1-1/(8J)+1/(128J^2)+...)
(37)

(Graham et al. 1994), so plugging in the expression for <d_N> gives the asymptotic series

 <d_N>=sqrt((2N)/pi)(1∓1/(4N)+1/(32N^2)+/-5/(128N^3)-(21)/(2048N^4)∓...),
(38)

where the top signs are taken for N even and the bottom signs for N odd. Therefore, for large N,

 <d_N>∼sqrt((2N)/pi),
(39)

which is also shown by Grünbaum (1960), Mosteller et al. (1961, p. 14), and König et al. (1999).

Tóth (2000) has proven that there are no more than three most-visited sites in a simple symmetric random walk in one dimension with unit steps.


See also

Binomial Distribution, Catalan Number, Heads-Minus-Tails Distribution, p-Good Path, Pólya's Random Walk Constants, Random Walk--2-Dimensional, Random Walk--3-Dimensional, Self-Avoiding Walk, Wiener Process

Explore with Wolfram|Alpha

References

Abramowitz, M. and Stegun, I. A. (Eds.). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, p. 798, 1972.Chandrasekhar, S. "Stochastic Problems in Physics and Astronomy." Rev. Modern Phys. 15, 1-89, 1943. Reprinted in Selected Papers on Noise and Stochastic Processes (Ed. N. Wax). New York: Dover, pp. 3-91, 1954.Erdős, P. and Révész, P. "On the Favourite Points of Random Walks." Math. Structures--Comput. Math.--Math. Model. (Sofia) 2, 152-157, 1984.Erdős, P. and Révész, P. "Problems and Results on Random Walks." In Mathematical Statistics and Probability Theory, Vol. B: Statistical Inference and Methods. Proceedings of the Sixth Pannonian Symposium on Mathematical Statistics Held in Bad Tatzmannsdorf, September 14-20, 1986 (Ed. P. Bauer, F. Koneczny, and W. Wertz). Dordrecht, Netherlands: Reidel, pp. 59-65, 1987.Feller, W. Ch. 3 in An Introduction to Probability Theory and Its Applications, Vol. 1, 3rd ed., rev. printing. New York: Wiley, 1968.Gardner, M. "Random Walks and Gambling." Ch. 6 in Mathematical Circus: More Puzzles, Games, Paradoxes, and Other Mathematical Entertainments. Washington, DC: Math. Assoc. Amer., pp. 66-74, 1992.Graham, R. L.; Knuth, D. E.; and Patashnik, O. Answer to problem 9.60 in Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, 1994.Grünbaum, B. "Projection Constants." Trans. Amer. Math. Soc. 95, 451-465, 1960.Hersh, R. and Griego, R. J. "Brownian Motion and Potential Theory." Sci. Amer. 220, 67-74, 1969.Hughes, B. D. Eq. (7.282) in Random Walks and Random Environments, Vol. 1: Random Walks. New York: Oxford University Press, p. 513, 1995.Kac, M. "Random Walk and the Theory of Brownian Motion." Amer. Math. Monthly 54, 369-391, 1947. Reprinted in Selected Papers on Noise and Stochastic Processes (Ed. N. Wax). New York: Dover, pp. 295-317, 1954.König, H.; Schütt, C.; and Tomczak-Jaegermann, N. "Projection Constants of Symmetric Spaces and Variants of Khintchine's Inequality." J. reine angew. Math. 511, 1-42, 1999.Mosteller, F.; Rourke, R. E. K.; and Thomas, G. B. Probability and Statistics. Reading, MA: Addison-Wesley, 1961.Papoulis, A. "Random Walk." Probability, Random Variables, and Stochastic Processes, 2nd ed. New York: McGraw-Hill, pp. 290-291, 1984.Prévost, G. Tables de Fonctions Sphériques. Paris: Gauthier-Villars, pp. 156-157, 1933.Révész, P. Random Walk in Random and Non-Random Environment. Singapore: World Scientific, 1990.Sloane, N. J. A. Sequences A060818 and A086116 in "The On-Line Encyclopedia of Integer Sequences."Tóth, B. "No More than Three Favourite Sites for Simple Random Walk." 26 Apr 2000. http://arxiv.org/abs/math.PR/0004164.Tóth, B. and Werner, W. "Tied Favourite Edges for Simple Random Walk." Combin., Prob., Comput. 6, 359-369, 1997.Trott, M. "The Mathematica Guidebooks Additional Material: Random Walk with Varying Step Size." http://www.mathematicaguidebooks.org/additions.shtml#N_1_01.

Cite this as:

Weisstein, Eric W. "Random Walk--1-Dimensional." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/RandomWalk1-Dimensional.html

Subject classifications