Tutorials › Stochastic Processes › Detailed Balance and Reversibility

Stationary Distributions and Limit Theorems for CTMCs · Tutorial 554 of 994

Detailed Balance and Reversibility

Derive detailed balance from a finite-state generator, prove why it gives a stationary reversible chain, and practice checking candidates.

Advanced 10 min read

What You'll Learn

  • Define reversibility for a stationary finite-state continuous-time Markov chain.
  • Check detailed balance using a generator and a candidate probability vector.
  • Prove that detailed balance implies stationarity and transition-kernel symmetry.
  • Connect generator balance to reversal of finite-dimensional distributions.
  • Distinguish reversible stationary chains from stationary chains with directed flow.

From Generator Rates to Reversibility

In a stationary continuous-time Markov chain, the rate of transitions from \(i\) to \(j\) need not match the rate in the opposite direction: the chain may carry a persistent circulation around its state space. Detailed balance is the stronger condition that the stationary flow from \(i\) to \(j\) exactly matches the flow back. This condition can be checked directly from a generator, and in a finite state space it guarantees both stationarity and reversibility.

Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\). Let \((X_t)_{t\ge0}\) be a time-homogeneous continuous-time Markov chain with finite state space \(S\), generator \(Q=(q_{ij})\), and transition matrix \(P(t)=(p_{ij}(t))=e^{tQ}\). For \(i\ne j\), \(q_{ij}\ge0\) is the instantaneous transition rate from \(i\) to \(j\); \(q_{ii}=-\sum_{j\ne i}q_{ij}\), so every row of \(Q\) sums to zero. Set \(\mathcal{F}_t=\sigma(X_s:0\le s\le t)\) for the natural filtration. The finite-state assumption ensures the chain is nonexplosive. We use the standard finite-state CTMC fact that \(P(t)\) is stochastic and satisfies the semigroup relation \(P(s+t)=P(s)P(t)\).

A probability vector \(\pi=(\pi_i)_{i\in S}\) is written as a row vector. It is stationary if \(\pi P(t)=\pi\) for every \(t\ge0\). When \(X_0\) has distribution \(\pi\), the chain is reversible if for every \(m\ge1\), every \(0\le t_0<t_1<\cdots<t_m\), and states \(i_0,\ldots,i_m\), the joint probability of the sequence of states at those times is unchanged when the order of the states and the time intervals are reversed.

Definition (Detailed balance): A probability vector \(\pi\) satisfies detailed balance for \(Q\) if \(\pi_i q_{ij}=\pi_j q_{ji}\) for every pair of distinct states \(i,j\). The equation for \(i=j\) is an identity and imposes no additional condition. The quantity \(\pi_iq_{ij}\) is the stationary rate flow from \(i\) to \(j\).

Why Detailed Balance Gives Stationarity and Reversibility

Theorem: Let \(S\) be finite and \(Q\) the generator of a CTMC on \(S\). If a probability vector \(\pi\) satisfies detailed balance, then (1) \(\pi Q=0\), (2) \(\pi P(t)=\pi\) for every \(t\ge0\), and (3) the chain started with distribution \(\pi\) is reversible. Conversely, if \(\pi\) is stationary and the chain started with \(\pi\) is reversible, then \(\pi_iq_{ij}=\pi_jq_{ji}\) for all distinct \(i,j\).

Proof. First suppose detailed balance holds. For each state \(j\), use the detailed balance equations and the zero sum of row \(j\) of \(Q\) to obtain

$$ (\pi Q)_j=\sum_{i\in S}\pi_iq_{ij} =\sum_{i\in S}\pi_jq_{ji} =\pi_j\sum_{i\in S}q_{ji}=0. $$

The equality also holds when some \(\pi_j=0\); no division by a component of \(\pi\) is involved. Thus \(\pi Q=0\). Since \(P(t)=e^{tQ}\), the power series for the matrix exponential gives \(\pi P(t)=\pi\): the constant term is \(\pi\), and every term of positive degree contains \(\pi Q=0\).

It remains to prove reversibility. Let \(D\) be the diagonal matrix with \(D_{ii}=\pi_i\). Detailed balance, including the automatic diagonal identities, says \(DQ=Q^{\mathsf T}D\). Induction on \(n\) gives \(DQ^n=(Q^{\mathsf T})^nD\): it holds for \(n=0\), and multiplying the identity for \(n\) by the relation \(DQ=Q^{\mathsf T}D\) gives the identity for \(n+1\). Taking the matrix-exponential series therefore yields \(DP(t)=P(t)^{\mathsf T}D\). In entries, this is \(\pi_i p_{ij}(t)=\pi_jp_{ji}(t)\).

For ordered times \(t_0<\cdots<t_m\), write \(\Delta_\ell=t_\ell-t_{\ell-1}\). By stationarity and the Markov property, the joint probability of the specified states is \(\pi_{i_0}\prod_{\ell=1}^m p_{i_{\ell-1},i_\ell}(\Delta_\ell)\). Apply the transition-kernel identity to each factor. The factors of \(\pi\) telescope, giving \(\pi_{i_m}\prod_{\ell=1}^m p_{i_\ell,i_{\ell-1}}(\Delta_\ell)\), the probability of the reversed sequence with reversed time intervals. This multiplication argument remains valid if a component of \(\pi\) is zero, because the entrywise identities hold without division. Hence the stationary chain is reversible.

For the converse, take two states \(i\ne j\) and use reversibility at times \(0\) and \(t>0\). It gives \(\pi_i p_{ij}(t)=\pi_jp_{ji}(t)\). For a finite-state CTMC, \(P(0)=I\) and \(P'(0)=Q\), so for distinct states \(p_{ij}(0)=p_{ji}(0)=0\). Divide the equality by \(t\) and let \(t\) decrease to zero; the derivative definition gives \(\pi_iq_{ij}=\pi_jq_{ji}\). This proves both directions. \(\square\)

Thus detailed balance is exactly the generator-level test for reversibility when the chain is stationary. It also proves stationarity directly, without first solving differential equations for \(P(t)\). A stationary distribution need not satisfy detailed balance: stationarity only requires the total inflow and outflow to balance at each state, while detailed balance requires the flow to balance separately on each pair of states.

Checking Detailed Balance in Finite Chains

Worked Example: A Two-State Chain

Consider \(S=\{1,2\}\) with rates \(q_{12}=2\) and \(q_{21}=3\). The generator is

$$ Q=\begin{bmatrix}-2&2\\3&-3\end{bmatrix}. $$

Its row sums are \(-2+2=0\) and \(3-3=0\), as required. Detailed balance for a probability vector \((\pi_1,\pi_2)\) is \(2\pi_1=3\pi_2\). Together with \(\pi_1+\pi_2=1\), this gives \(\pi_1=\tfrac32\pi_2\), so \(\tfrac52\pi_2=1\), \(\pi_2=\tfrac25\), and \(\pi_1=\tfrac35\).

Check: The two pairwise flows are \(\pi_1q_{12}=\tfrac35\cdot2=\tfrac65\) and \(\pi_2q_{21}=\tfrac25\cdot3=\tfrac65\). Also, direct multiplication gives

$$ \pi Q =\left(\tfrac35,\tfrac25\right) \begin{bmatrix}-2&2\\3&-3\end{bmatrix} =\left(-\tfrac65+\tfrac65,\ \tfrac65-\tfrac65\right) =(0,0). $$

The vector is normalized, satisfies detailed balance and is stationary by the theorem. The stationary chain is reversible.

Worked Example: Stationary but Not Reversible

On \(S=\{1,2,3\}\), let each state move clockwise at rate \(2\) and counterclockwise at rate \(1\). The generator is

$$ Q=\begin{bmatrix} -3&2&1\\ 1&-3&2\\ 2&1&-3 \end{bmatrix}. $$

Each row sums to zero: \(-3+2+1=0\), \(1-3+2=0\), and \(2+1-3=0\). Test the uniform candidate \(\pi=(\tfrac13,\tfrac13,\tfrac13)\). It is normalized, and direct multiplication gives

$$ \pi Q =\left(\tfrac13,\tfrac13,\tfrac13\right) \begin{bmatrix}-3&2&1\\1&-3&2\\2&1&-3\end{bmatrix} =(0,0,0), $$

because the first component is \(\tfrac13(-3+1+2)=0\), the second is \(\tfrac13(2-3+1)=0\), and the third is \(\tfrac13(1+2-3)=0\). Thus \(\pi\) is stationary. But detailed balance fails between states \(1\) and \(2\): \(\pi_1q_{12}=\tfrac13\cdot2=\tfrac23\), whereas \(\pi_2q_{21}=\tfrac13\cdot1=\tfrac13\). The stationary chain is not reversible. Its total inflow and outflow balance at every state, but there is a net clockwise flow.

Worked Example: Finding and Testing a Candidate on a Line

Let \(S=\{1,2,3\}\) and take rates \(q_{12}=1\), \(q_{21}=2\), \(q_{23}=3\), and \(q_{32}=1\), with no direct transitions between \(1\) and \(3\). Then

$$ Q=\begin{bmatrix} -1&1&0\\ 2&-5&3\\ 0&1&-1 \end{bmatrix}. $$

The row sums are \(-1+1+0=0\), \(2-5+3=0\), and \(0+1-1=0\). Suppose someone proposes \(\widetilde{\pi}=(\tfrac12,\tfrac14,\tfrac14)\). It is normalized, but the detailed balance equation for states \(2\) and \(3\) fails: \(\widetilde{\pi}_2q_{23}=\tfrac14\cdot3=\tfrac34\), while \(\widetilde{\pi}_3q_{32}=\tfrac14\cdot1=\tfrac14\). In fact, direct multiplication gives \(\widetilde{\pi}Q=(0,-\tfrac12,\tfrac12)\), so it is not stationary either.

To find a detailed-balance vector, let its components be \(\pi_1,\pi_2,\pi_3\). The equations on the two edges are \(\pi_1q_{12}=\pi_2q_{21}\), or \(\pi_2=\tfrac12\pi_1\), and \(\pi_2q_{23}=\pi_3q_{32}\), or \(\pi_3=3\pi_2=\tfrac32\pi_1\). The edge between \(1\) and \(3\) has zero rates in both directions, so its equation is \(0=0\). Normalizing gives \(\pi_1+\tfrac12\pi_1+\tfrac32\pi_1=3\pi_1=1\). Therefore \(\pi=(\tfrac13,\tfrac16,\tfrac12)\).

Check: The flows on the first edge are \(\tfrac13\cdot1=\tfrac13\) and \(\tfrac16\cdot2=\tfrac13\). On the second they are \(\tfrac16\cdot3=\tfrac12\) and \(\tfrac12\cdot1=\tfrac12\). On the third they are both zero. The components sum to \(\tfrac13+\tfrac16+\tfrac12=1\), and

$$ \pi Q =\left(-\tfrac13+\tfrac13,\ \tfrac13-\tfrac56+\tfrac12,\ \tfrac12-\tfrac12\right) =(0,0,0). $$

The candidate is a stationary probability vector satisfying detailed balance, so this chain started from \(\pi\) is reversible.

Common Mistakes and a Practical Test

A common mistake is to treat stationarity and detailed balance as interchangeable. For the directed-cycle example, one might incorrectly infer reversibility from \(\pi Q=0\). The calculation that exposes the error is \(\pi_1q_{12}=\tfrac23\ne\tfrac13=\pi_2q_{21}\): the distribution is stationary, but the pairwise flows do not match. Stationarity checks net flow at each state; reversibility checks every pair of states.

Another error is to compare rates alone, ignoring the stationary masses. The condition is \(\pi_iq_{ij}=\pi_jq_{ji}\), not \(q_{ij}=q_{ji}\). Unequal rates can satisfy detailed balance when the corresponding stationary probabilities compensate, as in the two-state example. For a finite-state candidate, a reliable procedure is to check that it is a probability vector, verify the generator row sums, test each unordered pair once, and then multiply \(\pi Q\) as an independent stationarity check. If all detailed balance equations hold, the theorem supplies stationarity and reversibility.

Zero probabilities require care as well. Detailed balance is an equality of products and remains meaningful when \(\pi_i=0\); it must not be rearranged by dividing by \(\pi_i\) unless \(\pi_i>0\) has been established. In finite state spaces the theorem includes such cases, but a proposed vector with zero mass still has to satisfy every pairwise equation. In applications on infinite state spaces, generator equations can require additional conditions to justify the passage from rates to a stationary process; the finite-state proof here uses the matrix exponential directly.

Check Your Understanding

For each question, distinguish the pairwise detailed-balance test from the statewise stationarity test.

  1. For a two-state generator with \(q_{12}=4\) and \(q_{21}=2\), find the normalized vector satisfying detailed balance and verify both flows.
  2. Why does \(\pi Q=0\) alone fail to prove reversibility? Use the directed-cycle generator above to identify a specific failed pairwise equation.
  3. For a finite-state generator, explain why the identity \(DQ=Q^{\mathsf T}D\) implies \(DP(t)=P(t)^{\mathsf T}D\).
  4. If \(\pi_i=0\), what does detailed balance require of \(\pi_jq_{ji}\) for every state \(j\)? Why is division by \(\pi_i\) invalid?
  5. State the derivative-at-zero argument that recovers generator detailed balance from reversibility of a stationary CTMC.