Random walk
Dr. Anjali Devi J S
Assistant Professor (Contract Faculty) , Mahatma Gandhi University, Kerala.
Revision
• Random Experiment?
A process by which we observed something uncertain.
Example: Random Experiment- Toss a coin
Sample space{ Head, Tail}
• Random variable?
A numerical description or function of the outcome of a statistical
experiment.
• Random walk?
Random Walk- Applications
• Brownian motion
• Swimming of a E coli
• Polymer random coil
• Protein search for a binding site on DNA
Random motion of particles
What is Random walk?
• Radom walk is the process by which randomly- moving objects
wander away from where they started.
Brownian motion
Brownian motion of a big particle (dust particle) that collides with a large set of smaller particles (molecules of a
gas) which move with different velocities in different random directions.
2-dimensional random walk of a silver atom on
an Ag(111) surface
Simplest random walk is 1- dimensional walk
Suppose that the black dot below is sitting on a number
line. The black dot starts in the center.
1- dimensional Random walk…..
• Then, it takes a step, either forward or backward, with equal
probability. It keeps taking steps either forward or backward each
time.
• Let's call the 1st step a1, the second step a2, the third step a3 and so
on. Each "a" is either equal to +1 (if the step is forward) or -1 (if the
step is backward). The picture below shows a black dot that has taken
5 steps and ended up at -1 on the number line.
Random walk- Demonstration
x=0
x=-1 x=+1
Number of steps, N=0 Probability=1
Probability=1/2
N=1
N=2 x=-2 X=0 X=-2
Probability=1/3 2/3 1/3
N=3 x=-3 X=-1 X=+1 X=-3
Probability=1/4 2/4 2/4 1/4
Random walk
• At every step, object goes to right or left with probability ½
• There N steps, and 2 possible options at each step, so there are total
2N different possible paths.
• Note that every path has the same probability: (½)N
Random walk
• But we want to know the probability of object being at a certain
location after N steps.
• While every path has same probability, different ending locations has
different number of paths which lead to them.
Random walk- Demonstration
x=0
x=-1 x=+1
Number of steps, N=0 Probability=1
Probability=1/2
N=1
N=2 x=-2 X=0 X=-2
Probability=1/3 2/3 1/3
N=3 x=-3 X=-1 X=+1 X=-3
Probability=1/4 2/4 2/4 1/4
For N=2, there is only one path that leads to x=2
The position of object after N steps
• All paths are equally likely but we need to know the number of paths
that leads to object ending up at a particular value of x after N steps.
• The locations of the object after N steps is determined by ho many
steps it takes to the right , which we’ll call m, and how many it takes
to the left N-m
The position x of the object after these N steps is x =m-(N-m)=2m-N
Question
Find the position of foot ball which undergoes one dimensional
random walk after 10 steps. It is given that ball took 5 steps to right.
The position x of the object after these N steps is x =m-(N-m)=2m-N
Consider a drunkard whose motion is confined to the X-axis. For simplicity let us assume that
after every unit of time, he moves one step either to the right or to the left with probabilities p
and q respectively.
If he starts at the origin, how far his typical distance after N units of time have elapsed?
OR
What is the probability [PN(m)] that drunkard is at coordinate m?
Question
Answer
N=n1+n2
m =n1-n2
Let n1 be the number of steps to the right, n2 be the number of steps to left,
Answer (Contd)
Suppose we assume that drunkard has zero memory and that every step is completely
independent of the previous step and is only characterized by the probabilities p and q
The number of ways in which N steps can be composed of n1 right steps and n2 left
steps,
NCm
For each of these possibilities, probability is given by
pn1qn2
The overall probability of finding the drunkard at position m after N steps is,
PN(m)= NCmpn1qn2
PN(m)= NCmpn1qn2
n1=
N+m
𝟐
n2=
N−m
𝟐
On rearranging,
PN(m)=
𝑵!
𝒏𝟏! 𝑵−𝒏𝟏 !
𝒑𝒏𝟏𝒒𝑵−𝒏𝟏
Answer (Contd)
This is simply a binomial distribution
PN(m)=
𝑵!
𝒏𝟏! 𝑵−𝒏𝟏 !
𝒑𝒏𝟏𝒒𝑵−𝒏𝟏
Mean
The mean number of steps to the right is,
𝒏𝟏 =pN
The mean number of steps to the left is,
𝒏𝟐 =qN
Variance
The variance is given by,
𝜎𝑛1
2
= 𝑁𝑝𝑞
𝜎𝑛1 = 𝑁𝑝𝑞
The root mean square deviation is given by,
Unbiased Random walk
Random walk in the plane and space
Theorem
In the symmetric random walks in one and two dimensions there is probability
one that the particle will sooner or later (and therefore infinitely often) return
to initial position. In three dimensions, however, this probability is <1
Random walk: Notions and
notations
Epoch: A point on the time axis. A physical experiments may take some
time, but our ideal trials are timeless and occur at epochs.
𝑺𝟏, 𝑺𝟐,……. , 𝑺𝒏 -points on vertical x axis; they will be called the
positions of a particle performing a random walk
The event at epoch n the particle is at the point r will be denoted by
{𝑺𝒏 = 𝐫}
( Simply, we call this event as a “visit” to r at epoch n.)
For its probability 𝒑𝒏,𝒓
Random walk: Notions and
notations
The number 𝑵𝒏,𝒓 . 𝒐𝒇 𝒑𝒂𝒕𝒉𝒔 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒐𝒓𝒊𝒈𝒊𝒏 to the point (n,r)
𝒑𝒏,𝒓=P {𝑺𝒏 = 𝐫} =𝑛𝐶𝑛+𝑟
2
2−𝑛
Random walk: Notions and
notations
A return to the origin occurs at epoch k if 𝑺𝒌 = 𝟎
Hence k necessarily even, and for k=2ν
The probability of return to the origin equals 𝒑2ν ,𝟎
Because of frequent occurrence of this probability , 𝒑2ν ,𝟎is
denoted as 𝒖2ν,𝒓
Random walk: Notions and
notations
𝑢2ν=2ν Cν2−2ν
First return to origin
A first return to origin occurs at epoch 2ν if
𝑆1 ≠ 0, … … . 𝑆2ν−1 ≠ 0, 𝑏𝑢𝑡 𝑆2ν = 0
The probability for this event will be denoted by 𝑓2ν
𝑓0=0
Basic Results
The Main Lemma
The probability that no return to the origin occurs up to and including epoch
2n is the same as the probability that a return occurs at epoch 2n.
In symbols,
P{𝑆1 ≠ 0, … … . , 𝑆2𝑛 ≠ 0}=𝑃{𝑆2𝑛 = 0}= 𝑢2𝑛
Lemma 1
Lemma 2
The Main Lemma
Basic Results
The probability that the first return to the origin (𝑓2𝑛) occurs at epoch 2n is
given by,
In symbols,
𝑓2𝑛 =
1
2𝑛 − 1
𝑢2𝑛
𝑢2𝑛 be the probability that the 2𝑛th trial
takes the particle to the initial position
Basic Results
Lemma(Reflection principle)
The number of paths from A to B which touch or cross the x axis equals
the number of paths from A’ to B.
The ballot theorem
Basic Results
Let n and x be positive integers. There are exactly
𝑥
𝑛
𝑁𝑛,𝑥 paths
(𝑠1, … … 𝑠𝑛 = 𝑥) from the origin to the point (n,x) such that
𝑠1>0,…. 𝑠1>0.
The theorem has received its name from the classical probability
problem: Ballot problem.
The ballot problem
In an election candidate A secures a votes and candidate B secures b votes.
What is the probability that A is ahead throughout the count?
P(A is ahead throughout the count)=
𝑁𝑎+𝑏
≠0
(0,𝑎−𝑏)
𝑁𝑎+𝑏(0,𝑎−𝑏)
=
𝑎−𝑏
𝑎+𝑏
Example:
If there are 5 voters, of whom 3 vote for candidate A
and 2 vote for candidate B, the probability that A will
always be in lead is,
1
5
Generating functions And Random walks
Recall, that if (𝑋𝑖) is independent and identically distributed, then
𝑆𝑛 = 𝑆0 +
𝑖=0
𝑛
𝑋𝑖
is a random walk
What is Generating functions?
• A generating function is an infinite series that has the ability to be
summed.
• These series act as filling cabinet where the information stored within
can be seen on the coefficient on 𝑧𝑛
𝐺 𝑎𝑛; 𝑧 =
𝑛=0
∞
𝑎𝑛𝑧𝑛
Probability Generating functions?
• A probability mass function is a list of probabilities for each possible
value the random variable can take on.
• These values can be extracted from special type of generating function
known as the probability generating function (p.g.f)
• The p.g.f is where the value of the coefficients on 𝑧𝑛
are the
probability the random variable takes the wanted value n.
Definition:Probability Generating functions
The probability generating function of the integer valued random variable
X is defined by
G(s)= 𝑘 𝑃 𝑋 = 𝑘 𝑠𝑘
Generating functions for random walk
If X has p.g.f G(z) then we have (when S0=0)
Gn(z)=E(𝑧𝑆𝑛)=(G(z))n
We can define the function H by
𝐻 𝑧, 𝑤 =
𝑛=0
∞
𝑤𝑛𝐺𝑛 𝑧 = (1 − 𝑤𝐺(𝑧))−1
This bivariate generating function tells everything about Sn
as P(Sn)=r is the coefficient of zrwn in 𝐻 𝑧, 𝑤
Further Reading
1. Elementary Probability, David Stirzaker,
Cambridge University Press.
2. Introduction to Probability Theory and Its
Applications, W. Feller (2nd Edn.), John
Wiley and Sons.

1. Random walk.pdf

  • 1.
    Random walk Dr. AnjaliDevi J S Assistant Professor (Contract Faculty) , Mahatma Gandhi University, Kerala.
  • 2.
    Revision • Random Experiment? Aprocess by which we observed something uncertain. Example: Random Experiment- Toss a coin Sample space{ Head, Tail} • Random variable? A numerical description or function of the outcome of a statistical experiment. • Random walk?
  • 3.
    Random Walk- Applications •Brownian motion • Swimming of a E coli • Polymer random coil • Protein search for a binding site on DNA Random motion of particles
  • 4.
    What is Randomwalk? • Radom walk is the process by which randomly- moving objects wander away from where they started.
  • 5.
    Brownian motion Brownian motionof a big particle (dust particle) that collides with a large set of smaller particles (molecules of a gas) which move with different velocities in different random directions.
  • 6.
    2-dimensional random walkof a silver atom on an Ag(111) surface
  • 7.
    Simplest random walkis 1- dimensional walk Suppose that the black dot below is sitting on a number line. The black dot starts in the center.
  • 8.
    1- dimensional Randomwalk….. • Then, it takes a step, either forward or backward, with equal probability. It keeps taking steps either forward or backward each time. • Let's call the 1st step a1, the second step a2, the third step a3 and so on. Each "a" is either equal to +1 (if the step is forward) or -1 (if the step is backward). The picture below shows a black dot that has taken 5 steps and ended up at -1 on the number line.
  • 9.
    Random walk- Demonstration x=0 x=-1x=+1 Number of steps, N=0 Probability=1 Probability=1/2 N=1 N=2 x=-2 X=0 X=-2 Probability=1/3 2/3 1/3 N=3 x=-3 X=-1 X=+1 X=-3 Probability=1/4 2/4 2/4 1/4
  • 10.
    Random walk • Atevery step, object goes to right or left with probability ½ • There N steps, and 2 possible options at each step, so there are total 2N different possible paths. • Note that every path has the same probability: (½)N
  • 11.
    Random walk • Butwe want to know the probability of object being at a certain location after N steps. • While every path has same probability, different ending locations has different number of paths which lead to them.
  • 12.
    Random walk- Demonstration x=0 x=-1x=+1 Number of steps, N=0 Probability=1 Probability=1/2 N=1 N=2 x=-2 X=0 X=-2 Probability=1/3 2/3 1/3 N=3 x=-3 X=-1 X=+1 X=-3 Probability=1/4 2/4 2/4 1/4 For N=2, there is only one path that leads to x=2
  • 13.
    The position ofobject after N steps • All paths are equally likely but we need to know the number of paths that leads to object ending up at a particular value of x after N steps. • The locations of the object after N steps is determined by ho many steps it takes to the right , which we’ll call m, and how many it takes to the left N-m The position x of the object after these N steps is x =m-(N-m)=2m-N
  • 14.
    Question Find the positionof foot ball which undergoes one dimensional random walk after 10 steps. It is given that ball took 5 steps to right. The position x of the object after these N steps is x =m-(N-m)=2m-N
  • 15.
    Consider a drunkardwhose motion is confined to the X-axis. For simplicity let us assume that after every unit of time, he moves one step either to the right or to the left with probabilities p and q respectively. If he starts at the origin, how far his typical distance after N units of time have elapsed? OR What is the probability [PN(m)] that drunkard is at coordinate m? Question Answer N=n1+n2 m =n1-n2 Let n1 be the number of steps to the right, n2 be the number of steps to left,
  • 16.
    Answer (Contd) Suppose weassume that drunkard has zero memory and that every step is completely independent of the previous step and is only characterized by the probabilities p and q The number of ways in which N steps can be composed of n1 right steps and n2 left steps, NCm For each of these possibilities, probability is given by pn1qn2 The overall probability of finding the drunkard at position m after N steps is, PN(m)= NCmpn1qn2 PN(m)= NCmpn1qn2
  • 17.
    n1= N+m 𝟐 n2= N−m 𝟐 On rearranging, PN(m)= 𝑵! 𝒏𝟏! 𝑵−𝒏𝟏! 𝒑𝒏𝟏𝒒𝑵−𝒏𝟏 Answer (Contd) This is simply a binomial distribution
  • 18.
  • 19.
    Mean The mean numberof steps to the right is, 𝒏𝟏 =pN The mean number of steps to the left is, 𝒏𝟐 =qN
  • 20.
    Variance The variance isgiven by, 𝜎𝑛1 2 = 𝑁𝑝𝑞 𝜎𝑛1 = 𝑁𝑝𝑞 The root mean square deviation is given by,
  • 21.
  • 22.
    Random walk inthe plane and space Theorem In the symmetric random walks in one and two dimensions there is probability one that the particle will sooner or later (and therefore infinitely often) return to initial position. In three dimensions, however, this probability is <1
  • 23.
    Random walk: Notionsand notations Epoch: A point on the time axis. A physical experiments may take some time, but our ideal trials are timeless and occur at epochs. 𝑺𝟏, 𝑺𝟐,……. , 𝑺𝒏 -points on vertical x axis; they will be called the positions of a particle performing a random walk The event at epoch n the particle is at the point r will be denoted by {𝑺𝒏 = 𝐫} ( Simply, we call this event as a “visit” to r at epoch n.) For its probability 𝒑𝒏,𝒓
  • 24.
    Random walk: Notionsand notations The number 𝑵𝒏,𝒓 . 𝒐𝒇 𝒑𝒂𝒕𝒉𝒔 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒐𝒓𝒊𝒈𝒊𝒏 to the point (n,r) 𝒑𝒏,𝒓=P {𝑺𝒏 = 𝐫} =𝑛𝐶𝑛+𝑟 2 2−𝑛
  • 25.
    Random walk: Notionsand notations A return to the origin occurs at epoch k if 𝑺𝒌 = 𝟎 Hence k necessarily even, and for k=2ν The probability of return to the origin equals 𝒑2ν ,𝟎 Because of frequent occurrence of this probability , 𝒑2ν ,𝟎is denoted as 𝒖2ν,𝒓
  • 26.
    Random walk: Notionsand notations 𝑢2ν=2ν Cν2−2ν
  • 27.
    First return toorigin A first return to origin occurs at epoch 2ν if 𝑆1 ≠ 0, … … . 𝑆2ν−1 ≠ 0, 𝑏𝑢𝑡 𝑆2ν = 0 The probability for this event will be denoted by 𝑓2ν 𝑓0=0
  • 28.
    Basic Results The MainLemma The probability that no return to the origin occurs up to and including epoch 2n is the same as the probability that a return occurs at epoch 2n. In symbols, P{𝑆1 ≠ 0, … … . , 𝑆2𝑛 ≠ 0}=𝑃{𝑆2𝑛 = 0}= 𝑢2𝑛 Lemma 1
  • 29.
    Lemma 2 The MainLemma Basic Results The probability that the first return to the origin (𝑓2𝑛) occurs at epoch 2n is given by, In symbols, 𝑓2𝑛 = 1 2𝑛 − 1 𝑢2𝑛 𝑢2𝑛 be the probability that the 2𝑛th trial takes the particle to the initial position
  • 30.
    Basic Results Lemma(Reflection principle) Thenumber of paths from A to B which touch or cross the x axis equals the number of paths from A’ to B.
  • 31.
    The ballot theorem BasicResults Let n and x be positive integers. There are exactly 𝑥 𝑛 𝑁𝑛,𝑥 paths (𝑠1, … … 𝑠𝑛 = 𝑥) from the origin to the point (n,x) such that 𝑠1>0,…. 𝑠1>0. The theorem has received its name from the classical probability problem: Ballot problem.
  • 32.
    The ballot problem Inan election candidate A secures a votes and candidate B secures b votes. What is the probability that A is ahead throughout the count? P(A is ahead throughout the count)= 𝑁𝑎+𝑏 ≠0 (0,𝑎−𝑏) 𝑁𝑎+𝑏(0,𝑎−𝑏) = 𝑎−𝑏 𝑎+𝑏
  • 33.
    Example: If there are5 voters, of whom 3 vote for candidate A and 2 vote for candidate B, the probability that A will always be in lead is, 1 5
  • 34.
    Generating functions AndRandom walks Recall, that if (𝑋𝑖) is independent and identically distributed, then 𝑆𝑛 = 𝑆0 + 𝑖=0 𝑛 𝑋𝑖 is a random walk
  • 35.
    What is Generatingfunctions? • A generating function is an infinite series that has the ability to be summed. • These series act as filling cabinet where the information stored within can be seen on the coefficient on 𝑧𝑛 𝐺 𝑎𝑛; 𝑧 = 𝑛=0 ∞ 𝑎𝑛𝑧𝑛
  • 36.
    Probability Generating functions? •A probability mass function is a list of probabilities for each possible value the random variable can take on. • These values can be extracted from special type of generating function known as the probability generating function (p.g.f) • The p.g.f is where the value of the coefficients on 𝑧𝑛 are the probability the random variable takes the wanted value n.
  • 37.
    Definition:Probability Generating functions Theprobability generating function of the integer valued random variable X is defined by G(s)= 𝑘 𝑃 𝑋 = 𝑘 𝑠𝑘
  • 38.
    Generating functions forrandom walk If X has p.g.f G(z) then we have (when S0=0) Gn(z)=E(𝑧𝑆𝑛)=(G(z))n We can define the function H by 𝐻 𝑧, 𝑤 = 𝑛=0 ∞ 𝑤𝑛𝐺𝑛 𝑧 = (1 − 𝑤𝐺(𝑧))−1 This bivariate generating function tells everything about Sn as P(Sn)=r is the coefficient of zrwn in 𝐻 𝑧, 𝑤
  • 39.
    Further Reading 1. ElementaryProbability, David Stirzaker, Cambridge University Press. 2. Introduction to Probability Theory and Its Applications, W. Feller (2nd Edn.), John Wiley and Sons.