2 Repeated trials and simple random walks

2.2 Simple random walks

Definition 2.2.1.

The stochastic process Xt is a simple random walk if

P(Xt=Xt-1+1)=pP(Xt=Xt-1-1)=q=1-p

where each step in the walk corresponds to the outcome of a Bernoulli trial, so is independent of all other steps.

Exercise 2.2.2.

What is the probability that a simple random walk, started at X0=1 will reach the value 3 before it reaches the value 0?

Figure 2.3: Link, Caption: none provided

So by Corollary 1.3.3:

P(A)=p2(1)+pqP(A)+q(0)P(A)=p21-pq.

Now we calculate the probability of the gambler’s ruin.

Lemma 2.2.3.

Consider two simple random walks, Xt and Yt, with Xt defined as in 2.2.1, and Yt defined by

P(Yt=Yt-1+1)=qP(Yt=Yt-1-1)=p.

Assume X0=Y0=1. Define the events

EX=`Xt eventually reaches zero’,𝑎𝑛𝑑EY=`Yt eventually reaches zero’.

Finally let RX=P(EX) and RY=P(EY). Then

RX=qpRY.
Remark.

The Xt and Yt processes differ only in that the probability of Xt moving up is equal to the probability of Yt moving down, and vice-versa.

Proof.

Let the rv TX be the time at which Xt first becomes 0, i.e. the time to ruin, starting from X0 = 1. We note the possibility that TX may not have a proper distribution, i.e. one which sums to 1. In fact that is what we wish to determine, the value of

RX=j=0P(TX=j).

If this is less than 1 we say that TX has an improper distribution.

Firstly note that for P(TX=j)>0 we need j to be odd (as we need one more downward move than upward move). Writing j=2m+1 we get

P(TX=2m+1)=N2m+1pmqm+1,

where N2m+1 is the number of paths for the stochastic process that start with X0=1, end with X2m+1=0 and with Xt>0 for t=1,,2m. The probability of each of these paths is pmqm+1 as each of these paths involves m upward moves, and m+1 downward moves.

[To see this we can look at the example 2m+1=7, and draw all realisations of the simple random walk that end in TX=7:

Figure 2.4: Link, Caption: none provided

There are 5 such paths, and each individual path has probabilty p3q4. So we get P(TX=7)=5p3q4.]

Now define TY to be the time at which Yt first becomes 0. By a similar argument we have

P(TY=2m+1)=N2m+1qmpm+1,

the only difference being through the interchange of p and q due to the different probabilities of up/down moves. Finally we note

RX =m=0P(TX=2m+1)
=m=0N2m+1pmqm+1
=qpm=0N2m+1pm+1qm
=qpm=0P(TY=2m+1)
=qpRY.

Theorem 2.2.4.

Let Xt be a simple random walk (RW) starting from X0=1. Define the event:

E=`Xt eventually reaches zero’

i.e. X1=0 or X2=0 or X3=0 …. Then

R=P(E)={1 if pqqp if pq
Remark.

Note that E and R are same as EX and RX but still we prefer to use separate notations. This is one aspect of the Gambler’s ruin problem. The Gambler starts with £1 and plays a succession of games, winning or losing £1 at each game with respective probabilities p and q. We say that ruin occurs when the gambler has no £s left, i.e. when Xt = 0 for the first time. Play must then stop.

Proof.

Our proof consists of two parts, and uses Lemma 2.2.3. In part (a) we calculate Rk, the probability of ruin if X0=k, in terms of R. In part (b) we use part (a), and Corollory 1.3.3, to obtain a quadratic equation for R. Lemma 2.2.3 is then used to show which root of this quadratic equation we should take.

Part (a). Consider a more general walk starting from X0=k; let

Ek=Xt eventually reaches 0 starting from X0=k

and let Rk=P(Ek). We call this ‘Ruin starting with £k’. We now show that Rk=Rk.

Consider a sequence of k games. The gambler starts with £k in her pocket, takes out £1 and plays until that is lost. She then takes out another pound and does the same. And so on, playing k games until she has no £ left i.e. is ruined. This is the only way in which ruin can occur. Each game is independent of the others and is lost with probability R, so the required probability is Rk. A graphical representation for k=3 is

Figure 2.5: Link, Caption: none provided

Formally, define the event H1 to be the ‘passage from the state X0=k to reach the level x=k-1 for the first time’, and call this time the rv T1. Then let H2 be the ‘passage from XT1=k-1 to reach the level x=k-2 for the first time’, and call this time T2. And so on until X0=0 for the first time which is the time of ruin Tk. Then

P(Ek)=P(H1H2Hk)=P(H1)P(H2)P(Hk)=Rk

because all these events are independent. The reason for their independence is that the outcome of the second game is not affected in any way by the loss of the first £, and so on. The events H1, H2, …Hk correspond exactly to the event E of ruin for the game starting with just £1, so have the same probability R.

The lengths of time of each game, which we call L1=T1, L2=T2-T1, …, Lk=Tk-Tk-1 are therefore also independent, a fact we use for a later result.

Part (b). Condition on the outcome of the first step in the RW starting from X0=1.

Figure 2.6: Link, Caption: none provided

Now use Corollory 1.3.3:

P(ruin from X0=1)=P(ruin |X1=2)P(X1=2)+P(ruin |X1=0)P(X1=0).

But from part (a), P(ruin |X1=2)=P(ruin |X0=2)=R2. Also P(ruin |X1=0)=1 because ruin has just occurred. So

R=R2p+ 1q.

This give the quadratic equation for R:

pR2-R+q=(pR-q)(R-1)=0R=qp or R=1.

When p=q=1/2, R=1. Next assume pq. Consider a plot of these two roots as function of p:

Figure 2.7: Link, Caption: none provided

If p<q then because the value q/p>1 is not possible, the value of R must be 1. If p>q, then it is not possible to have R=RX=1, otherwise, by Lemma 2.2.3 RY=p/q>1. So we now know that R=q/p for q<p. ∎

Theorem 2.2.5.

The expected time to ruin starting from X0=1, in the case p<12 is

e=E(T)=m=1(2m+1)P(T=2m+1)=11-2p.
Remark.

This is only meaningful when T is a proper rv with P[T<]=1. From Theorem 2.2.4, this holds when p<q i.e. p<12.

Part (a). As before, let Tk be the time at which ruin occurs starting from X0=k. Then

Figure 2.8: Link, Caption: none provided
Tk=L1+L2++Lk

where L1 is the length of the first game and so on. Now L1, L2, …all have the same distribution as T. They are also independent, although that is not neccessary for this result, which is

E(Tk)=E(L1)+E(L2)++E(Lk)=kE(T)=ke.

Part (b). Condition on the outcome of the first step, with the same figure as before:

Figure 2.9: Link, Caption: none provided

and use E(T)=E[E(T|X1)]. Now

if X1={20 then T={1+T21 with probability {pq

so that

E(T)=E(1+T2)p+ 1q=p+E(T2)p+q

where T2 is the further time to ruin from X1=2. But T2 has exactly the same distribution as T2 and from part (a), E(T2)=E(T2)=2e, giving

e=p+ 2ep+q.

Then (1-2p)e=1 so e=1/(1-2p)=1/(q-p).

It is possible similarly to evaluate E(T2), hence Var(T) and higher moments.

We have already calculated the probability of ruin without using the expression for N2m+1. Next we calculate the probability of ruin at the (2m+1)-th stage by deriving an expression for N2m+1.