The Markov property, that the past and future are independent given the present, essentially treats the past and future symmetrically. However, there is a lack of symmetry in the fact that, in the usual formulation, we have an *initial* time 0, but not a *terminal* time. If we introduce a terminal time, then we can run the process backwards in time. In this section, we are interested in the following questions:

- Is the new process still Markov?
- If so, how does the new transition probability matrix relate to the original one?
- Under what conditions are the forward and backward processes stochastically the same?

As usual, our starting point is a (time homogeneous) Markov chain $X=\left(\begin{array}{c}X_{0}\\ X_{1}\\ X_{2}\\ \end{array}\right)$ with state space $S$ and transition probability matrix $P$. Let $m$ be a positive integer, which we will think of as the terminal time. Define $Y_{n}=X_{m-n}$ for $n\in \{0, 1, , m\}$. Thus, the process forward in time is $X_{m}=\left(\begin{array}{c}X_{0}\\ X_{1}\\ \\ X_{m}\end{array}\right)$ while the process backwards in time in $Y_{m}=\left(\begin{array}{c}Y_{0}\\ Y_{1}\\ \\ Y_{m}\end{array}\right)=\left(\begin{array}{c}X_{m}\\ X_{m-1}\\ \\ X_{0}\end{array}\right)$

Use basic conditional probability arguments and the Markov property for $X$ to show that for every positive integer $n< m$ and for every sequence of states $\left(\begin{array}{c}x_{0}\\ x_{1}\\ \\ x_{n-1}\\ x\\ y\end{array}\right)$,

$$(Y_{n+1}=y, Y_{0}=x_{0}Y_{1}=x_{1}Y_{n-1}=x_{n-1}Y_{n}=x)=\frac{(X_{m-n-1}=y)P(y, x)}{(X_{m-n}=x)}$$Since the right-hand side depends only on $x$, $y$, $n$, and $m$, the backwards process $Y_{m}$ is a Markov chain, but is not time-homogeneous in general. Note however, that the backwards chain will be time homogeneous if $X_{0}$ has an invariant distribution. Thus, from now on, we will assume that our original chain $X$ is irreducible and positive recurrent with (unique) invariant probability density function $f$.

Show that if $X_{0}$ has probability density function $f$, then $Y_{m}$ is a time-homogeneous Markov chain with transition probability matrix $Q$ given by

$$Q(x, y)=\frac{f(y)P(y, x)}{f(x)}\text{,\hspace{1em}}\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$$Show that if $X_{0}$ does not have probability density function $f$, but $X$ is aperiodic, then the expression in Exercise 1 converges to $Q(x, y)$ defined in Exercise 2 as $m\to \infty $.

Thus, we now *define* the time reverse of the chain
$X=\left(\begin{array}{c}X_{0}\\ X_{1}\\ X_{2}\\ \end{array}\right)$
to be the Markov chain
$Y=\left(\begin{array}{c}Y_{0}\\ Y_{1}\\ Y_{2}\\ \end{array}\right)$
with transition probability matrix
$Q$ defined in Exercise 2, regardless of the initial distribution of
$X$ and without regard to a finite time horizon
$m$. The results in Exercise 1, Exercise 2, and Exercise 3 are motivation for this definition. Note that the fundamental relationship between the transition probability matrices
$P$ and
$Q$ is

Note that

- $Q(x, x)=P(x, x)$ for each $x\in S$.
- $Q(x, y)> 0$ if and only if $P(y, x)> 0$
- The graphs of $X$ and $Y$ are reverses of each other. That is, to go from the graph of one chain to the graph of the other, reverse the direction of each edge.

Show that for every sequence of states $\left(\begin{array}{c}x_{1}\\ x_{2}\\ \\ x_{n}\end{array}\right)$,

$$f(x_{1})Q(x_{1}, x_{2})Q(x_{2}, x_{3})Q(x_{n-1}, x_{n})=f(x_{n})P(x_{n}, x_{n-1})P(x_{3}, x_{2})P(x_{2}, x_{1})$$Show that for every $\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$ and $n\in \mathbb{N}$,

$$f(x)Q^{n}(x, y)=f(y)P^{n}(y, x)$$Show that

- $Y$ is also irreducible.
- $f$ is invariant for $Y$.
- $Y$ is positive recurrent
- $X$ and $Y$ are time reversals of each other.
- $X$ and $Y$ have the same mean return time $\mu (x)$ for every $x\in S$.

Suppose for a moment that $X$ is only assumed to be irreducible. Show that if there exists a probability density function $f$ and a transition probability matrix $Q$ such that $f(x)Q(x, y)=f(y)P(y, x)$ for all $\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$, then

- $f$ is invariant for $X$
- $X$ is positive recurrent.
- $Q$ is the transition probability matrix of the reversed chain.

Clearly, an interesting special case occurs when the transition probability matrix of the time-reversed chain turns out to be the same as the original transition probability matrix. A chain of this type could be used to model a physical process that is stochastically the same, forward or backward in time.

Suppose again that $X=\left(\begin{array}{c}X_{0}\\ X_{1}\\ X_{2}\\ \end{array}\right)$ is an irreducible, positive recurrent Markov chain with transition probability matrix $P$ and invariant probability density function $f$. The chain $X$ is said to be reversible if

$$f(x)P(x, y)=f(y)P(y, x)\text{,\hspace{1em}}\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$$Thus, $P$ is also the transition probability matrix of the time-reversed chain. Specifically, by Exercise 2, if $X_{0}$ has probability density function $f$, then $P$ is the transition probability matrix of the chain backwards in time relative to any terminal time $m$.

Show that $X$ is reversible if and only if for every sequence of states $\left(\begin{array}{c}x_{1}\\ x_{2}\\ \\ x_{n}\end{array}\right)$,

$$f(x_{1})P(x_{1}, x_{2})P(x_{2}, x_{3})P(x_{n-1}, x_{n})=f(x_{n})P(x_{n}, x_{n-1})P(x_{3}, x_{2})P(x_{2}, x_{1})$$Show $X$ is reversible if and only if for every $\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$ and $n\in \mathbb{N}$,

$$f(x)P^{n}(x, y)=f(y)P^{n}(y, x)$$The basic reversibility condition uniquely determines the invariant probability density function. Suppose for a moment that $X$ is only assumed to be irreducible. Show that if there exists a probability density function $f$ such that $f(x)P(x, y)=f(y)P(y, x)$ for all $\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$, then

- $f$ is invariant for $X$
- $X$ is positive recurrent.
- $X$ is reversible.

If we have reason to believe that a Markov chain is reversible (based on modeling considerations, for example), then the condition in the previous exercise can be used to find the invariant probability density function $f$. This procedure is often easier than using the definition of invariance directly.

The following exercise gives a condition for reversibility that does not directly reference the invariant distribution. The condition is known as the Kolmogorov cycle condition, and is named for Andrei Kolmogorov

Suppose that $X$ is irreducible and positive recurrent. Show that $X$ is reversible if and only if for every sequence of states $\left(\begin{array}{c}x_{1}\\ x_{2}\\ \\ x_{n}\end{array}\right)$,

$$P(x_{1}, x_{2})P(x_{2}, x_{3})P(x_{n-1}, x_{n})P(x_{n}, x_{1})=P(x_{1}, x_{n})P(x_{n}, x_{n-1})P(x_{3}, x_{2})P(x_{2}, x_{1})$$- Suppose that the chain is reversible. Use the definition to verify the Kolmogorov cycle condition.
- Conversely, suppose that the Kolmogorov cycle condition holds. Show that $P(x, y)P^{k}(y, x)=P(y, x)P^{k}(x, y)$ for every $k\in $
- Average over $k$ from 1 to $n$ to show that $P(x, y)\frac{1}{n}G_{n}(y, x)=P(y, x)\frac{1}{n}G_{n}(x, y)$ for every $n\in $
- Let $n\to \infty $ to conclude that $f(x)P(x, y)=f(y)P(y, x)$

Note that the Kolmogorov cycle condition states that the probability of visiting states $\left(\begin{array}{c}x_{2}\\ x_{3}\\ \\ x_{n}\\ x_{1}\end{array}\right)$ in sequence, starting in state $x_{1}$ is the same as the probability of visiting states $\left(\begin{array}{c}x_{n}\\ x_{n-1}\\ \\ x_{2}\\ x_{1}\end{array}\right)$ in sequence, starting in state $x_{1}$.

Recall the general two-state chain $X$ on $S=\{0, 1\}$ with the transition probability matrix

$$P=\begin{pmatrix}1-p & p\\ q & 1-q\end{pmatrix}$$where $p$ and $q$ are parameters with $0< p< 1$ and $0< q< 1$. Show that $X$ is reversible and to use the basic reversibility condition to show once again that the invariant probability density function is $f=\left(\begin{array}{c}\frac{q}{p+q}\\ \frac{p}{p+q}\end{array}\right)$.

Suppose that $X$ is a Markov chain on a finite state space $S$ with symmetric transition probability matrix $P$. Thus $P(x, y)=P(y, x)$ for all $\left(\begin{array}{c}x\\ y\end{array}\right)\in S^{2}$. Show that $X$ is reversible and that the uniform distribution on $S$ is invariant.

Consider the Markov chain $X$ on $S=\{a, b, c\}$ with transition probability matrix $P$ given below:

$$P=\begin{pmatrix}1/4 & 1/4 & 1/2\\ 1/3 & 1/3 & 1/3\\ 1/2 & 1/2 & 0\end{pmatrix}$$- Draw the state graph of $X$ and note that the chain is irreducible.
- Find the invariant probability density function $f$.
- Find the mean return time to each state.
- Find the transition probability matrix $Q$ of the time-reversed chain $Y$.
- Draw the state graph of $Y$.

Read the discussion of reversibility for the Ehrenfest chains, and work the problems.

Read the discussion of reversibility for the Bernoulli-Laplace chain, and work the problems.

Read the discussion of reversibility for the random walks on graphs, and work the problems.

Read the discussion of time reversal for the reliability chains, and work the problems.

Read the discussion of reversibility for the birth-death chains.