Unit 12, lesson 81

Hitting Times and Absorption

How hitting times and hitting probabilities of a Markov chain are defined, how first-step analysis with boundary conditions gives absorption probabilities and expected times, and why a hitting time can be infinite.

  • Video 81
  • Hitting Times and Model Checking

A process starts in an active state A. At each step it either stays active or ends in one of two final outcomes, B or C, and once it has ended it stays ended. Will it ever end in B, and how many steps does it take to end at all? These questions concern the first time a path reaches a target, not where the chain is at one fixed step. This lesson defines hitting times and hitting probabilities, finds them by conditioning on the first step with explicit boundary conditions, and shows how a hitting time can be infinite and what that does to its mean.

Key terms

Absorbing state

Definition Let X0,X1,X2,…X_0, X_1, X_2, \dots be a time-homogeneous Markov chain on a state space SS with transition matrix PP. A state ii is absorbing if Pii=1P_{ii} = 1, so that Pij=0P_{ij} = 0 for every j≠ij \ne i. Once the chain is in an absorbing state, it stays there at every later step. In a chain with absorbing states, entering one of them is called absorption. Write PiP_i and EiE_i for probabilities and expectations when the chain starts in state ii, that is, with X0=iX_0 = i.

In plain words An absorbing state is a final outcome, such as a finished job or a failed part. In a transition diagram its only outgoing arrow is a loop back to itself.

Example On the states A, B and C, in that order, take

P=[0.50.30.2010001].P = \begin{bmatrix} 0.5 & 0.3 & 0.2 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}.

States B and C are absorbing, and A is not. Started in A, the chain is still in A after nn steps with probability 0.5n0.5^n, which tends to 00, so with probability 11 it is eventually absorbed in B or C. A state with Pii=0.99P_{ii} = 0.99 is not absorbing. A chain started there may stay for a long time, but the probability that it stays forever is lim⁡n→∞0.99n=0\lim_{n \to \infty} 0.99^n = 0.

Hitting time

Definition For a nonempty set DD of target states, the hitting time of DD is

TD=min⁡{n≥0:Xn∈D},T_D = \min\{ n \ge 0 : X_n \in D \},

the first time the chain is in DD, with TD=∞T_D = \infty when the chain never enters DD. Time 00 counts, so TD=0T_D = 0 when X0∈DX_0 \in D. For a single state B write TBT_B. The variable min⁡{n≥1:Xn∈D}\min\{ n \ge 1 : X_n \in D \}, which ignores time 00, is a different random time. It agrees with TDT_D whenever the chain starts outside DD.

In plain words A hitting time is a clock that stops at the first visit to the target and ignores everything afterward. Its definition needs two choices, the target set and whether a start inside the target counts as time zero.

Example In the chain above, started in A, the path A, A, B, B and so on has TB=2T_B = 2 and T{B,C}=2T_{\{B, C\}} = 2. The path A, C, C and so on has T{B,C}=1T_{\{B, C\}} = 1 and TB=∞T_B = \infty, since it never reaches B. A chain started in B has TB=0T_B = 0. To have TB=kT_B = k from A, the chain must stay in A for k−1k - 1 steps and then move to B, so

PA(TB=k)=0.5k−1⋅0.3P_A(T_B = k) = 0.5^{k - 1} \cdot 0.3

for k=1,2,3,…k = 1, 2, 3, \dots, which gives 0.30.3, 0.150.15 and 0.0750.075 for the first three values of kk.

Hitting probability

Definition For a target set DD and a start ii, the hitting probability is

hi=Pi(TD<∞),h_i = P_i(T_D < \infty),

the probability that the chain started at ii ever enters DD. It is a different quantity from the probability Pi(TD≤n)P_i(T_D \le n) of reaching DD by a deadline nn and from the probability Pi(Xn∈D)P_i(X_n \in D) of being in DD at step nn. The events {TD≤n}\{T_D \le n\} grow with nn and their union is {TD<∞}\{T_D < \infty\}, so Pi(TD≤n)P_i(T_D \le n) increases to hih_i as n→∞n \to \infty. When every state of DD is absorbing, being in DD at step nn is the same event as {TD≤n}\{T_D \le n\}.

In plain words A hitting probability asks whether the target is ever reached, with no deadline. A deadline probability is never larger, and it approaches the hitting probability as the deadline grows.

Example Started in A, the events {TB=k}\{T_B = k\} for different kk are disjoint, since a path has only one first visit to B. Adding their probabilities,

PA(TB<∞)=∑k=1∞0.5k−1⋅0.3=0.31−0.5=0.6.\begin{aligned} &P_A(T_B < \infty) \\[0.4em] &\quad = \sum_{k=1}^{\infty} 0.5^{k-1} \cdot 0.3 \\[0.4em] &\quad = \frac{0.3}{1 - 0.5} = 0.6. \end{aligned}

By the deadline 33 the probability is 0.3+0.15+0.075=0.525=21/400.3 + 0.15 + 0.075 = 0.525 = 21/40, less than 0.60.6. The chain reaches the set {B,C}\{B, C\} by step 33 unless it stays in A for three steps, so PA(T{B,C}≤3)=1−0.53=7/8P_A(T_{\{B, C\}} \le 3) = 1 - 0.5^3 = 7/8. The three numbers answer three different questions.

First-step analysis

Definition First-step analysis finds hitting quantities by conditioning on the first step X1X_1. For a target set DD, the hitting probabilities hi=Pi(TD<∞)h_i = P_i(T_D < \infty) satisfy, for every state ii outside DD,

hi=∑j∈SPijhj.h_i = \sum_{j \in S} P_{ij} h_j.

The reason is that the first step goes to jj with probability PijP_{ij}, and by the Markov property and time homogeneity the chain then behaves like a new chain started at jj. Values that follow directly from the meaning of the question, rather than from this equation, are boundary conditions. For hitting probabilities they are hi=1h_i = 1 for every ii in DD, and hi=0h_i = 0 for every state ii from which DD cannot be reached. On a finite state space, the equations together with both kinds of boundary condition have exactly one solution.

In plain words Take one step, then ask the same question again from wherever the chain landed. The boundary conditions record the answers that need no calculation. Without them, the equations may fail to determine the answer.

Example For the target B in the chain above, the equation at A is

hA=0.5hA+0.3hB+0.2hC.\begin{aligned} h_A &= 0.5h_A + 0.3h_B \\[0.4em] &\quad + 0.2h_C. \end{aligned}

The boundary conditions are hB=1h_B = 1, since a chain started in B has TB=0T_B = 0, and hC=0h_C = 0, since a chain in C stays in C and never reaches B. The first-step equation at C would read hC=hCh_C = h_C, which every number satisfies, so it is the boundary condition that fixes hCh_C. Substituting gives hA=0.5hA+0.3h_A = 0.5h_A + 0.3, so 0.5hA=0.30.5h_A = 0.3 and hA=0.6h_A = 0.6, in agreement with the sum of first-hit probabilities. The same method with target C gives 0.40.4. The two answers add to 11 because the probability of staying in A forever is lim⁡n→∞0.5n=0\lim_{n \to \infty} 0.5^n = 0.

Expected time to absorption

Definition For a target set DD, let ki=Ei[TD]k_i = E_i[T_D]. When DD is the set of absorbing states, kik_i is the expected time to absorption from ii. The boundary conditions are ki=0k_i = 0 for ii in DD, not 11 as for probabilities, and for ii outside DD first-step analysis gives

ki=1+∑j∈SPijkj,k_i = 1 + \sum_{j \in S} P_{ij} k_j,

where the 11 counts the step just taken and the sum is the expected remaining time. These equations should be treated as ordinary linear equations only after checking that the kik_i involved are finite. One check is the tail formula E[T]=∑n=0∞P(T>n)E[T] = \sum_{n=0}^{\infty} P(T > n), valid for every random variable TT whose values are nonnegative integers or ∞\infty. On a finite state space, if DD can be reached from every state, then every kik_i is finite.

In plain words Count one step for the move just made, then add the average time still needed from the new state. The algebra treats each kik_i as an ordinary number, so first make sure it is one.

Example Take the absorbing set {B,C}\{B, C\} and start in A. The boundary conditions are kB=kC=0k_B = k_C = 0, and the equation at A is

kA=1+0.5kA+0.3⋅0+0.2⋅0.\begin{aligned} k_A &= 1 + 0.5k_A \\[0.4em] &\quad + 0.3 \cdot 0 + 0.2 \cdot 0. \end{aligned}

The chain is still in A after nn steps with probability 0.5n0.5^n, so PA(T{B,C}>n)=0.5nP_A(T_{\{B, C\}} > n) = 0.5^n and

EA[T{B,C}]=∑n=0∞0.5n=2,E_A\bigl[T_{\{B, C\}}\bigr] = \sum_{n=0}^{\infty} 0.5^{n} = 2,

which is finite. The equation then gives 0.5kA=10.5k_A = 1, so kA=2k_A = 2 steps. In fact T{B,C}T_{\{B, C\}} is geometric on {1,2,3,… }\{1, 2, 3, \dots\} with success probability 0.50.5, whose mean is 22.

Infinite hitting time

Definition A hitting time TDT_D equals ∞\infty on every path that never enters DD. If Pi(TD=∞)>0P_i(T_D = \infty) > 0, then Ei[TD]=∞E_i[T_D] = \infty, because Ei[TD]≥n Pi(TD=∞)E_i[T_D] \ge n \, P_i(T_D = \infty) for every nn. When hi>0h_i > 0, the conditional mean Ei[TD∣TD<∞]E_i[T_D \mid T_D < \infty] averages only over the paths that reach DD, and it can be finite even when Ei[TD]E_i[T_D] is infinite. The mean can also be infinite when Pi(TD<∞)=1P_i(T_D < \infty) = 1. On a finite state space this cannot happen, but on the integers it does, for the symmetric simple random walk started at 11 with target 00.

In plain words An unconditional mean averages over all paths, including those that never arrive, and each of those contributes an infinite time. Averaging only over the paths that do arrive can give a finite number, but it answers a narrower question.

Example In the chain above, PA(TB=∞)=0.4P_A(T_B = \infty) = 0.4, the probability of absorption in C. So EA[TB]=∞E_A[T_B] = \infty, and the answer 22 for the target {B,C}\{B, C\} cannot be reused for B alone. The first-step equation agrees. With target B, a chain in C never reaches B, so EC[TB]=∞E_C[T_B] = \infty, and the equation at A contains the infinite term 0.2 EC[TB]0.2 \, E_C[T_B]. Given that B is reached, for k=1,2,3,…k = 1, 2, 3, \dots

PA(TB=k∣TB<∞)=0.5k−1⋅0.30.6=0.5k,\begin{aligned} &P_A(T_B = k \mid T_B < \infty) \\[0.4em] &\quad = \frac{0.5^{k-1} \cdot 0.3}{0.6} = 0.5^{k}, \end{aligned}

a geometric distribution with success probability 0.50.5 and mean EA[TB∣TB<∞]=2E_A[T_B \mid T_B < \infty] = 2. A finite conditional mean and an infinite unconditional mean do not contradict each other, because they average over different collections of paths.

Check yourself

  1. Change the row of A so that the chain stays in A with probability 1/41/4, moves to B with probability 1/21/2 and moves to C with probability 1/41/4, keep B and C absorbing, and start in A. Write the boundary conditions for reaching B, then find the probability that the chain ever reaches B and the probability that it never does.
Show the answer

The boundary conditions are hB=1h_B = 1 and hC=0h_C = 0. The first-step equation at A is

hA=14hA+12⋅1+14⋅0,h_A = \tfrac14 h_A + \tfrac12 \cdot 1 + \tfrac14 \cdot 0,

so 34hA=12\tfrac34 h_A = \tfrac12 and hA=2/3h_A = 2/3. The chain stays in A forever with probability lim⁡n→∞(1/4)n=0\lim_{n \to \infty} (1/4)^n = 0, so it is absorbed in C with probability 1/31/3, and that is the probability of never reaching B. As a check, adding the first-hit probabilities gives ∑k≥1(1/4)k−1⋅12=12/34=2/3\sum_{k \ge 1} (1/4)^{k-1} \cdot \tfrac12 = \tfrac12 \big/ \tfrac34 = 2/3.

  1. For the same chain, find the expected number of steps until absorption, after checking that it is finite. A classmate concludes that EA[TB]E_A[T_B] is the same number. Is that right?
Show the answer

The target set is {B,C}\{B, C\} with kB=kC=0k_B = k_C = 0. The chain is still in A after nn steps with probability (1/4)n(1/4)^n, so EA[T{B,C}]=∑n≥0(1/4)n=4/3E_A[T_{\{B, C\}}] = \sum_{n \ge 0} (1/4)^n = 4/3, which is finite. The first-step equation kA=1+14kAk_A = 1 + \tfrac14 k_A gives the same value kA=4/3k_A = 4/3.

The classmate is wrong. The chain never reaches B with probability 1/31/3, so TB=∞T_B = \infty with positive probability and EA[TB]=∞E_A[T_B] = \infty. The number 4/34/3 does reappear as a conditional mean, since

PA(TB=k∣TB<∞)=(1/4)k−1⋅122/3=(14)k−1⋅34,\begin{aligned} &P_A(T_B = k \mid T_B < \infty) \\[0.4em] &\quad = \frac{(1/4)^{k-1} \cdot \tfrac12}{2/3} \\[0.4em] &\quad = \left( \tfrac14 \right)^{k-1} \cdot \tfrac34, \end{aligned}

a geometric distribution with success probability 3/43/4 and mean 4/34/3. In this chain the time at which the chain leaves A does not depend on where it goes, so the paths that end in B take as long on average as all paths together.

  1. A walk on the states 0,1,2,30, 1, 2, 3 moves from 11 or 22 one step up or one step down with probability 1/21/2 each, and the states 00 and 33 are absorbing. Starting at 11, find the probability of reaching 33 and the expected time to absorption.
Show the answer

For the probability of reaching 33, first-step analysis at the two inner states gives

h1=12h0+12h2,h2=12h1+12h3.\begin{aligned} h_1 &= \tfrac12 h_0 + \tfrac12 h_2, \\[0.4em] h_2 &= \tfrac12 h_1 + \tfrac12 h_3. \end{aligned}

With the boundary conditions h0=0h_0 = 0 and h3=1h_3 = 1 these become h1=12h2h_1 = \tfrac12 h_2 and h2=12h1+12h_2 = \tfrac12 h_1 + \tfrac12. Substituting gives h1=14h1+14h_1 = \tfrac14 h_1 + \tfrac14, so h1=1/3h_1 = 1/3 and h2=2/3h_2 = 2/3.

For the time, the boundary conditions change to k0=k3=0k_0 = k_3 = 0. From 11 or 22, the walk is still at an inner state after two steps along only one path, with probability 1/41/4, so the probability of no absorption in 2m2m steps is (1/4)m(1/4)^m and the expected time is finite. Then

k1=1+12k2,k2=1+12k1,\begin{aligned} k_1 &= 1 + \tfrac12 k_2, \\[0.4em] k_2 &= 1 + \tfrac12 k_1, \end{aligned}

so k1=1+12+14k1k_1 = 1 + \tfrac12 + \tfrac14 k_1, which gives k1=2k_1 = 2, and by symmetry k2=2k_2 = 2. The walk started at 11 reaches 33 with probability 1/31/3 and is absorbed after 22 steps on average.

How this lesson connects