Tutorials › Stochastic Processes › Two-State Stationary Distributions

Stationary Distributions · Tutorial 183 of 994

Two-State Stationary Distributions

Learn to solve the two-state balance equations, classify all boundary cases, and distinguish a stationary distribution from a limiting distribution.

Intermediate 9 min read

What You'll Learn

  • Write the general two-state transition matrix using two transition probabilities.
  • Derive and solve the stationarity equations with a row-vector distribution.
  • Determine exactly when a stationary distribution exists uniquely or is nonunique.
  • Identify absorbing states and the identity-matrix boundary case.
  • Recognize the irreducible periodic two-state chain and test whether distributions converge.

The General Two-State Chain

For a chain with only two states, stationarity reduces to one balance equation and a normalization condition. Solving this small system carefully is useful beyond the two-state case: it shows how probability flowing out of one state must be balanced by probability flowing in, and it exposes boundary cases that can be hidden by formulas involving division.

Let \((X_n)_{n\ge0}\) be a discrete-time Markov chain on the probability space \((\Omega,\mathcal{F},\mathbb{P})\), with state space \(S=\{1,2\}\) and transition matrix \(P=(p_{ij})\). Use the parameters \(a=p_{12}\) and \(b=p_{21}\). Since each row of a transition matrix sums to \(1\), the matrix has the form

$$ P= \begin{bmatrix} 1-a & a\\ b & 1-b \end{bmatrix}, \qquad 0\le a\le1,\quad 0\le b\le1. $$

Here \(a\) is the probability of moving from state \(1\) to state \(2\), and \(b\) is the probability of moving from state \(2\) to state \(1\). A distribution is a row vector \(\mu=(\mu_1,\mu_2)\) with nonnegative entries summing to \(1\); its one-step update is \(\mu P\).

Definition: A stationary distribution for \(P\) is a probability row vector \(\pi=(\pi_1,\pi_2)\) such that \(\pi P=\pi\). If \(X_0\) has distribution \(\pi\), then \(X_n\) has distribution \(\pi\) for every \(n\ge0\), since repeated multiplication gives \(\pi P^n=\pi\).

Write a candidate probability vector as \(\pi=(x,1-x)\), where \(0\le x\le1\). The stationarity equations are

$$ x=x(1-a)+(1-x)b, \qquad 1-x=xa+(1-x)(1-b). $$

These two equations express the same constraint. The first coordinate after a transition consists of the mass that stays in state \(1\), plus the mass that enters state \(1\) from state \(2\). Rearranging the first equation gives \(ax=b(1-x)\). This is the balance of probability flow between the states.

Theorem (Complete two-state classification): For the transition matrix above, if \(a+b>0\), there is exactly one stationary distribution, namely \(\pi=(\frac{b}{a+b},\frac{a}{a+b})\). If \(a+b=0\), then \(a=b=0\), \(P\) is the identity matrix, and every probability vector is stationary.

Proof. Let \(\pi=(x,1-x)\) be any stationary distribution. Its first coordinate must satisfy \(x=x(1-a)+(1-x)b\). Subtracting \(x(1-a)\) from both sides gives \(ax=b(1-x)\), or \((a+b)x=b\). If \(a+b>0\), division gives the only possible value \(x=b/(a+b)\), so \(1-x=a/(a+b)\). Both entries are nonnegative because \(a,b\ge0\), and their sum is \((a+b)/(a+b)=1\). To check stationarity, the first coordinate of \(\pi P\) is \[ \frac{b}{a+b}(1-a)+\frac{a}{a+b}b =\frac{b-ab+ab}{a+b} =\frac{b}{a+b}. \] The entries of \(\pi P\) sum to \(1\), because each row of \(P\) sums to \(1\); hence its second coordinate is \(a/(a+b)\). Thus the candidate is stationary and is the only possibility. If \(a+b=0\), nonnegativity implies \(a=b=0\), so \(P\) is the identity matrix and \(\mu P=\mu\) for every probability vector \(\mu\). This proves both cases. \(\square\)

The theorem gives an exhaustive answer, including the endpoints \(a=0\) or \(b=0\). A useful equivalent formulation is that a probability vector is stationary exactly when the flow from state \(1\) to state \(2\) equals the flow from state \(2\) to state \(1\).

Proposition (Flow balance): For a probability vector \(\pi=(\pi_1,\pi_2)\), stationarity is equivalent to \(\pi_1a=\pi_2b\).

Proof. If \(\pi P=\pi\), its first coordinate satisfies \(\pi_1=\pi_1(1-a)+\pi_2b\). Subtracting \(\pi_1(1-a)\) gives \(\pi_1a=\pi_2b\). Conversely, suppose \(\pi_1+\pi_2=1\) and \(\pi_1a=\pi_2b\). The first coordinate of \(\pi P\) is \(\pi_1(1-a)+\pi_2b=\pi_1(1-a)+\pi_1a=\pi_1\). The two coordinates of \(\pi P\) sum to \(\pi_1+\pi_2=1\), so its second coordinate is \(1-\pi_1=\pi_2\). Therefore \(\pi P=\pi\). \(\square\)

Worked Cases: Unique and Nonunique Stationarity

First check the rows of the matrix, then solve the equation and substitute the resulting vector back into \(\pi P=\pi\). This order is especially important at parameter values where a transition probability is zero.

Worked Example: Both States Communicate

Take \(a=\tfrac13\) and \(b=\tfrac12\). The transition matrix is

$$ P= \begin{bmatrix} \tfrac23 & \tfrac13\\ \tfrac12 & \tfrac12 \end{bmatrix}. $$

The first row sums to \(\tfrac23+\tfrac13=1\), and the second row sums to \(\tfrac12+\tfrac12=1\). Since \(a+b=\tfrac13+\tfrac12=\tfrac56>0\), the theorem gives

$$ \pi_1=\frac{\tfrac12}{\tfrac56}=\frac35, \qquad \pi_2=\frac{\tfrac13}{\tfrac56}=\frac25. $$

Check by multiplication: the first coordinate of \(\pi P\) is \(\tfrac35\cdot\tfrac23+\tfrac25\cdot\tfrac12=\tfrac25+\tfrac15=\tfrac35\). The second coordinate is \(\tfrac35\cdot\tfrac13+\tfrac25\cdot\tfrac12=\tfrac15+\tfrac15=\tfrac25\). The entries sum to \(\tfrac35+\tfrac25=1\), so \(\pi=(\tfrac35,\tfrac25)\) is indeed a stationary distribution.

Worked Example: One Absorbing State

Let \(a=0\) and \(b=\tfrac25\). The matrix is

$$ P= \begin{bmatrix} 1 & 0\\ \tfrac25 & \tfrac35 \end{bmatrix}. $$

The first row sums to \(1+0=1\), and the second sums to \(\tfrac25+\tfrac35=1\). State \(1\) is absorbing because its row is \((1,0)\). Since \(a+b=\tfrac25>0\), the unique stationary distribution is

$$ \pi=\left(\frac{\tfrac25}{\tfrac25},\frac{0}{\tfrac25}\right)=(1,0). $$

Direct substitution gives \((1,0)P=(1\cdot1+0\cdot\tfrac25,\ 1\cdot0+0\cdot\tfrac35)=(1,0)\). Uniqueness can also be seen from flow balance: \(\pi_1a=\pi_2b\) becomes \(0=\tfrac25\pi_2\), so \(\pi_2=0\), and normalization forces \(\pi_1=1\). A zero transition probability therefore does not by itself imply multiple stationary distributions.

Worked Example: The Identity Matrix

Take \(a=b=0\). Then

$$ P= \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}. $$

The first row sums to \(1+0=1\), and the second row sums to \(0+1=1\). For any \(c\in[0,1]\), let \(\pi=(c,1-c)\). Multiplication gives \(\pi P=(c\cdot1+(1-c)\cdot0,\ c\cdot0+(1-c)\cdot1)=(c,1-c)=\pi\). Thus every probability vector is stationary, including \((1,0)\), \((0,1)\), and \((\tfrac12,\tfrac12)\). There is no unique stationary distribution. The theorem’s division by \(a+b\) cannot be used here because \(a+b=0\).

Periodicity Does Not Remove Stationarity

A stationary distribution need not describe the limit of the distribution at time \(n\). A simple way to see the distinction is the irreducible two-state chain that always switches states. For this matrix, \(a=b=1\); it has a unique stationary distribution, but a chain started in state \(1\) alternates deterministically between the states.

Periodicity in the two-state irreducible case: If \(a>0\) and \(b>0\), the chain is irreducible. It has period \(2\) when \(a=b=1\), and period \(1\) otherwise.

Proof. When \(a=b=1\), every transition switches states. Starting from either state, a return is possible after \(n\) steps exactly when \(n\) is even, so the set of possible positive return times is \(\{2,4,6,\ldots\}\), whose greatest common divisor is \(2\). Now suppose \(a,b>0\) and they are not both \(1\). If \(a<1\), then \(p_{11}=1-a>0\), so state \(1\) has a return in one step and its period is \(1\). If \(a=1\), then \(b<1\) and \(b>0\). From state \(1\), a two-step return has probability \(1\cdot b=b>0\), and a three-step return along \(1\to2\to2\to1\) has probability \(1\cdot(1-b)\cdot b>0\). The greatest common divisor of \(2\) and \(3\) is \(1\), so state \(1\) has period \(1\). In either case, irreducibility means the two states communicate, and their return periods agree; thus the chain has period \(1\). \(\square\)

Worked Example: A Periodic Chain with a Unique Stationary Distribution

Set \(a=b=1\). The matrix is

$$ P= \begin{bmatrix} 0 & 1\\ 1 & 0 \end{bmatrix}. $$

Each row sums to \(0+1=1\). Here \(a+b=2>0\), so the unique stationary distribution is \(\pi=(\tfrac12,\tfrac12)\). Substitution gives \((\tfrac12,\tfrac12)P=(\tfrac12\cdot0+\tfrac12\cdot1,\ \tfrac12\cdot1+\tfrac12\cdot0)=(\tfrac12,\tfrac12)\).

But if the initial distribution is \(\mu_0=(1,0)\), then \(\mu_1=(1,0)P=(0,1)\), and \(\mu_2=(0,1)P=(1,0)\). These two distributions continue to alternate, so \(\mu_n\) has no limit. Starting instead at \(\pi\) leaves the distribution equal to \(\pi\) at every step. This verifies directly that stationarity and convergence to a stationary distribution are different properties.

A Common Mistake and a Practical Summary

A frequent error is to write only the mass that stays in state \(1\) when computing the next probability of being in state \(1\), omitting the incoming mass from state \(2\). In the first worked matrix, this incorrect calculation would be \(\pi_1=\tfrac23\pi_1\), which forces \(\pi_1=0\); normalization would then suggest the wrong vector \((0,1)\). Substitution exposes the error: \((0,1)P=(\tfrac12,\tfrac12)\), not \((0,1)\). The correct first-coordinate equation includes both sources of mass, \(\pi_1=\tfrac23\pi_1+\tfrac12\pi_2\), or equivalently \(\pi_1a=\pi_2b\).

For any two-state matrix, the parameter test \(a+b>0\) settles uniqueness without needing to assume irreducibility or aperiodicity. If both transition probabilities are positive, the stationary distribution puts positive mass on both states. If exactly one is zero, the unique stationary distribution is concentrated on the absorbing state. If both are zero, each state is absorbing and every initial distribution is stationary. Periodicity affects the behavior of distributions over time, not the stationarity equation itself.

Check Your Understanding

For each question, use row-vector distributions and verify any proposed stationary distribution by substitution.

  1. For \(P=\begin{bmatrix}\tfrac34&\tfrac14\\\tfrac12&\tfrac12\end{bmatrix}\), check the row sums and find the unique stationary distribution.
  2. For \(a=\tfrac12\) and \(b=0\), identify the absorbing state and find the stationary distribution.
  3. Why does the formula \((\frac{b}{a+b},\frac{a}{a+b})\) not apply when \(a=b=0\)? What are all the stationary distributions in that case?
  4. For the matrix that always switches states, find the stationary distribution and explain why a chain started in state \(1\) does not converge in distribution.
  5. Starting from \(\pi_1a=\pi_2b\) and \(\pi_1+\pi_2=1\), explain why a probability vector satisfying these equations is stationary.