# Absorbing Markov chain

In the mathematical theory of probability, an **absorbing Markov chain** is a Markov chain in which every state can reach an absorbing state. An absorbing state is a state that, once entered, cannot be left.

Like general Markov chains, there can be continuous-time absorbing Markov chains with an infinite state space. However, this article concentrates on the discrete-time discrete-state-space case.

## Formal definition

A Markov chain is an absorbing chain if^{[1]}^{[2]}

- there is at least one absorbing state and
- it is possible to go from any state to at least one absorbing state in a finite number of steps.

In an absorbing Markov chain, a state that is not absorbing is called transient.

### Canonical form

Let an absorbing Markov chain with transition matrix *P* have *t* transient states and *r* absorbing states. Unlike a typical transition matrix, the rows of *P* represent sources, while columns represent destinations. Then

- [math]\displaystyle{ P = \left( \begin{array}{cc} Q & R\\ \mathbf{0} & I_r \end{array} \right), }[/math]

where *Q* is a *t*-by-*t* matrix, *R* is a nonzero *t*-by-*r* matrix, **0** is an *r*-by-*t* zero matrix, and *I*_{r} is the *r*-by-*r* identity matrix. Thus, *Q* describes the probability of transitioning from some transient state to another while *R* describes the probability of transitioning from some transient state to some absorbing state.

## Fundamental matrix

A basic property about an absorbing Markov chain is the expected number of visits to a transient state *j* starting from a transient state *i* (before being absorbed). The probability of transitioning from *i* to *j* in exactly *k* steps is the (*i*,*j*)-entry of *Q*^{k}. Summing this for all *k* (from 0 to ∞) yields the fundamental matrix, denoted by *N*. It can be proven that

- [math]\displaystyle{ N = \sum_{k=0}^\infty Q^k = (I_t - Q)^{-1}, }[/math]

where *I*_{t} is the *t*-by-*t* identity matrix. The (*i*, *j*) entry of matrix *N* is the expected number of times the chain is in state *j*, given
that the chain started in state *i*. With the matrix *N* in hand, other properties of the Markov chain are easy to obtain.^{[2]}

This fundamental matrix can be thought of as a matrix equivalent of the following geometric series:

- [math]\displaystyle{ n = \sum_{k=0}^\infty q^k = \frac{1}{1-q} = (1-q)^{-1}. }[/math]

### Variance on number of visits

The variance on the number of visits to a transient state *j* with starting at a transient state *i* (before being absorbed) is the (*i*,*j*)-entry of the matrix

- [math]\displaystyle{ N_2 = N (2 N_{\operatorname{dg}} - I_t) - N_{\operatorname{sq}}, }[/math]

where *N*_{dg} is the diagonal matrix with the same diagonal as *N* and *N*_{sq} is the Hadamard product of *N* with itself (i.e. each entry of *N* is squared).

### Expected number of steps

The expected number of steps before being absorbed when starting in transient state *i* is the *i*th entry of the vector

- [math]\displaystyle{ \mathbf{t} = N \mathbf{1}, }[/math]

where **1** is a length-*t* column vector whose entries are all 1.

### Variance on number of steps

The variance on the number of steps before being absorbed when starting in transient state *i* is the *i*th entry of the vector

- [math]\displaystyle{ (2 N - I_t) \mathbf{t} - \mathbf{t}_{\operatorname{sq}}, }[/math]

where **t**_{sq} is the Hadamard product of **t** with itself (i.e. each entry of **t** is squared).

### Transient probabilities

The probability of visiting transient state *j* when starting at a transient state *i* is the (*i*,*j*)-entry of the matrix

- [math]\displaystyle{ H = (N - I_t) (N_{\operatorname{dg}})^{-1}, }[/math]

where *N*_{dg} is the diagonal matrix with the same diagonal as *N*.

### Absorbing probabilities

Another property is the probability of being absorbed in the absorbing state *j* when starting from transient state *i*, which is the (*i*,*j*)-entry of the matrix

- [math]\displaystyle{ B = N R. }[/math]

Alternatively, this probability can also be directly obtained from the (*i*,*j*)-entry of [math]\displaystyle{ P^n }[/math] for a large enough value of *n*. That is:

- [math]\displaystyle{ (\lim_{n \to \infty}P^n)_{i,j} = B_{i,j} }[/math]

## Examples

### String generation

Consider the process of repeatedly flipping a fair coin until the sequence (heads, tails, heads) appears. This process is modeled by an absorbing Markov chain with transition matrix

- [math]\displaystyle{ P = \begin{bmatrix} 1/2 & 1/2 & 0 & 0\\ 0 & 1/2 & 1/2 & 0\\ 1/2 & 0 & 0 & 1/2\\ 0 & 0 & 0 & 1 \end{bmatrix}. }[/math]

The first state represents the empty string, the second state the string "H", the third state the string "HT", and the fourth state the string "HTH". Although in reality, the coin flips cease after the string "HTH" is generated, the perspective of the absorbing Markov chain is that the process has transitioned into the absorbing state representing the string "HTH" and, therefore, cannot leave.

For this absorbing Markov chain, the fundamental matrix is

- [math]\displaystyle{ \begin{align} N & = (I - Q)^{-1} = \left( \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix} - \begin{bmatrix} 1/2 & 1/2 & 0\\ 0 & 1/2 & 1/2\\ 1/2 & 0 & 0 \end{bmatrix} \right)^{-1} \\[4pt] & = \begin{bmatrix} 1/2 & -1/2 & 0\\ 0 & 1/2 & -1/2\\ -1/2 & 0 & 1 \end{bmatrix}^{-1} = \begin{bmatrix} 4 & 4 & 2\\ 2 & 4 & 2\\ 2 & 2 & 2 \end{bmatrix}. \end{align} }[/math]

The expected number of steps starting from each of the transient states is

- [math]\displaystyle{ \mathbf{t} = N \mathbf{1} = \begin{bmatrix} 4 & 4 & 2\\ 2 & 4 & 2\\ 2 & 2 & 2 \end{bmatrix} \begin{bmatrix} 1\\ 1\\ 1 \end{bmatrix} = \begin{bmatrix} 10\\ 8\\ 6 \end{bmatrix} . }[/math]

Therefore, the expected number of coin flips before observing the sequence (heads, tails, heads) is 10, the entry for the state representing the empty string.

## Games of chance

Games based entirely on chance can be modeled by an absorbing Markov chain. A classic example of this is the ancient Indian board game Snakes and Ladders. The graph on the left^{[3]} plots the probability mass in the lone absorbing state that represents the final square as the transition matrix is raised to larger and larger powers. To determine the expected number of turns to complete the game, compute the vector **t** as described above and examine **t**_{start}, which is approximately 39.2.

### Infectious disease clinic

The example of infectious disease testing, in either blood products or in medical clinics, is often taught as an example of an absorbing Markov chain.^{[4]} The public U.S. Centers for Disease Control and Prevention (CDC) model for HIV and for hepatitis B, for example,^{[5]} illustrates the property that absorbing Markov chains can lead to the detection of disease, versus the loss of detection through other means.

In the standard CDC model, the Markov chain has five states, a state in which the individual is uninfected, then a state with infected but undetectable virus, a state with detectable virus, and absorbing states of having quit/been lost from the clinic, or of having been detected (the goal). The typical rates of transition between the Markov states are the probability *p* per unit time of being infected with the virus, *w* for the rate of window period removal (time until virus is detectable), *q* for quit/loss rate from the system, and *d* for detection, assuming a typical rate [math]\displaystyle{ \lambda }[/math] at which the health system administers tests of the blood product or patients in question.

It follows that we can "walk along" the Markov model to identify the overall probability of detection for a person starting as undetected, by multiplying the probabilities of transition to each next state of the model as:

[math]\displaystyle{ \frac{p}{(p+q)} \frac{w} {(w+q)} \frac{d} {(d+q)} }[/math].

The subsequent total absolute number of false negative tests—the primary CDC concern—would then be the rate of tests, multiplied by the probability of reaching the infected but undetectable state, times the duration of staying in the infected undetectable state:

[math]\displaystyle{ \frac{p}{(p+q)} \frac{1} {(w+q)} \lambda }[/math].

## See also

- Discrete phase-type distribution
- Absorbing set (random dynamical systems)

## References

- ↑
^{1.0}^{1.1}Grinstead, Charles M.; Snell, J. Laurie (July 1997). "Ch. 11: Markov Chains".*Introduction to Probability*. American Mathematical Society. ISBN 978-0-8218-0749-1. https://www.dartmouth.edu/~chance/teaching_aids/books_articles/probability_book/Chapter11.pdf. - ↑
^{2.0}^{2.1}Kemeny, John G.; Snell, J. Laurie (July 1976). "Ch. 3: Absorbing Markov Chains". in Gehring, F. W.; Halmos, P. R..*Finite Markov Chains*(Second ed.). New York Berlin Heidelberg Tokyo: Springer-Verlag. pp. 224. ISBN 978-0-387-90192-3. https://archive.org/details/finitemarkovchai00keme_792. - ↑ Based on the definition found in S. C. Althoen; L. King; K. Schilling (March 1993). "How Long Is a Game of Snakes and Ladders?".
*The Mathematical Gazette*(The Mathematical Gazette, Vol. 77, No. 478)**78**(478): 71–76. doi:10.2307/3619261. - ↑ results, search (1998-07-28) (in en).
*Markov Chains*. Cambridge: Cambridge University Press. ISBN 9780521633963. https://www.amazon.com/Markov-Cambridge-Statistical-Probabilistic-Mathematics/dp/0521633966/ref=sr_1_1?s=books&ie=UTF8&qid=1532297444&sr=1-1&keywords=markov+chains. - ↑ Sanders, Gillian D.; Anaya, Henry D.; Asch, Steven; Hoang, Tuyen; Golden, Joya F.; Bayoumi, Ahmed M.; Owens, Douglas K. (June 2010). "Cost-Effectiveness of Strategies to Improve HIV Testing and Receipt of Results: Economic Analysis of a Randomized Controlled Trial".
*Journal of General Internal Medicine***25**(6): 556–563. doi:10.1007/s11606-010-1265-5. ISSN 0884-8734. PMID 20204538.

## External links

Original source: https://en.wikipedia.org/wiki/Absorbing Markov chain.
Read more |