4 Markov chains

4.8 Expected hitting times

Definition 4.8.1.

If a Markov chain X is started in state i (X0=i) and reaches state j for the first time at time Ti⁢j then Ti⁢j is called the hitting time for state j from state i. In mathematical notation

Ti⁢j=min⁡{T:XT=j,T≥1|X0=i}.

When i=j we obtain Ti⁢i, the return time for state i.

Here we will be concerned with expected hitting times and expected return times:

τi⁢j=𝐄⁢[Ti⁢j].
Theorem 4.8.2.

For an n state Markov chain with transition matrix P,

τi⁢j=1+∑k=1,k≠jnPi⁢k⁢τk⁢j.
Proof.

For a given realisation of the Markov chain, let Ti⁢j be the actual hitting time for state j from state i. Then

Ti⁢j={1 with probability Pi⁢j1+Tk⁢j′ with probability Pi⁢k(k≠j),

where Tk⁢j′ is the further time to reach state j if the first transition is from i to k. By the Markov property, Tk⁢j′ has the same distribution as Tk⁢j. Taking expectations and using the Tower Law

τi⁢j = 𝐄⁢[Ti⁢j]
= Pi⁢j×1+∑k=1,k≠jnPi⁢k⁢𝐄⁢[(1+Tk⁢j′)]
= ∑k=1nPi⁢k+∑k=1,k≠jnPi⁢k⁢𝐄⁢[Tk⁢j] (by linearity of expectation)
= 1+∑k=1,k≠jnPi⁢kτk⁢j. (since rows sum to 1)

∎

Example 4.8.3.

A Markov chain has transition probability matrix

P=(0.10.30.60.30.50.20.50.50.0).

What is the expected return time for state 1 and the expected hitting time for state 1 from each of states 2 and 3? What is the expected time to hit state 1 if the Markov chain has initial distribution (1/2,1/10,2/5)?

From Theorem 4.8.2

τ11 = 1+0.3⁢τ21+0.6⁢τ31 (4.1)
τ21 = 1+0.5⁢τ21+0.2⁢τ31 (4.2)
τ31 = 1+0.5⁢τ21 (4.3)

Substituting (4.3) into (4.2) gives

τ21=1+0.5⁢τ21+0.2+0.1⁢τ21⇒0.4⁢τ21=1.2⇒τ21=3.0.

Substitution back in to (4.3) gives τ31=2.5; then substitution into the first equation provides τ11=3.4.

NB: More generally (4.2) and (4.3) would be two simultaneous equations. The invariant distribution for P is π=(10/34,15/34,9/34), so in this particular example: τ11=1/π1.

The expected hitting time for state 1 from starting distribution (1/2,1/10,2/5) is

(1/2)*τ11+(1/10)*τ21+(2/5)*τ31=17/10+3/10+1=3.
Example 4.8.4.

A Markov chain has transition kernel

P=(0.60.400.80.200.50.30.2)

What can be said about the return time for state 3 and the hitting time for state 3 from each of states 1 and 2?

It is impossible to get to state 3 from either state 1 or state 2. From state 3, either the return time is 1 or the chain will never return to state 3. One way to view of this is that the hitting/return times are infinite. Also the classes are {1,2} and {3}.

The invariant distribution for P is π=(2/3,1/3,0), so in this particular example: τ33=1/π3.

Remark.

Recall that for a finite irreducible Markov chain all states are persistent and it can be shown that the expected hitting times are finite.

Theorem 4.8.5.

If a Markov chain has invariant distribution π then the expected return time to a persistent state i is τi⁢i=1/πi.

Remark.
  • (a)

    Compare with a geometric random variable for which the expected value of the first occurrence is the reciprocal of the success probability.

  • (b)

    In an irreducible MC, a stationary distribution exists if and only if all states are persistent with finite τi⁢i and in this case the invariant distribution is given by πi=1/τi⁢i. In particular in an irreducible MC with finite state space, the invariant distribution always exists whereas the asysmptotic distribution will exist if it is additionally aperiodic.

Heuristic of proof: (not a full rigorous proof) Let the Markov chain start in its stationary distribution π and imagine letting the chain run for a very long time T.

Let ti(A) be the time until the chain first hits state i and ti(B) be the time from the last time the chain hits state i until T.

Suppose that the chain hits state i Ni times and let Ti⁢i(1),…,Ti⁢i(Ni-1) be the return times to state i.

Figure 4.1: Link, Caption: none provided

Now (see the picture) T=ti(A)+∑k=1Ni-1Ti⁢i(k)+ti(B); so taking expectations:

T=𝐄⁢[ti(A)+ti(B)]+𝐄⁢[∑k=1Ni-1Ti⁢i(k)]. (4.4)

Because the chain is in its stationary distribution

𝐄⁢[Ni]=𝐄⁢[∑j=1T1⁢1{Xj=i}]=∑j=1T𝐄⁢[1⁢1{Xj=i}]=πi⁢T;

here 1⁢1{A} is the indicator function, i.e. 1⁢1{A}=1 if A is true, and 1⁢1{A}=0 otherwise.
If we replace Ni by πi⁢T=𝐄⁢[Ni] (this needs justification which is why this is not a formal proof) then by (4.4)

T=𝐄⁢[ti(A)+ti(B)]+(πi⁢T-1)⁢τi⁢i.

Dividing through by T gives

1=(πi-1/T)⁢τi⁢i+1T⁢𝐄⁢[ti(A)+ti(B)].

By the Remark before this Theorem, 𝐄⁢[ti(A)+ti(B)] is bounded (since ti(B)<Ti⁢iNi), so letting T→∞ gives the required result. ∎