Why Return Cycles Give Long-Run Frequencies
A Markov chain’s successive steps are dependent, so the usual strong law for independent observations cannot be applied directly to its state indicators. At returns to a fixed state, however, the future starts afresh: the path segments between consecutive returns are independent and have the same distribution. The state frequency can therefore be obtained by applying the strong law to the number of visits in a cycle and the length of that cycle.
Let \((X_n)_{n\ge 0}\) be a Markov chain on a countable state space \(S\), defined on a probability space \((\Omega,\mathcal F,\mathbb P)\), with transition matrix \(P=(p_{ij})\). Use the filtration \(\mathcal F_n=\sigma(X_0,\ldots,X_n)\). The matrix is row-stochastic: \(\sum_{j\in S}p_{ij}=1\) for every \(i\). The chain is irreducible if each state can be reached from each other state with positive probability in some finite number of steps. It is positive recurrent if it is irreducible and its expected return time to a state is finite. For an irreducible chain, if this holds for one state, it holds for every state.
The return time is excluded from the cycle: the cycle includes its starting visit to \(a\), but not the next visit to \(a\), which starts the following cycle. In an irreducible positive recurrent chain, the return cycles under \(\mathbb P_a\) are independent and identically distributed by the strong Markov property. Their common length has finite mean \(m_a=\mathbb E_a[T_a^+]\), where \(T_a^+=\inf\{n\ge 1:X_n=a\}\).
The Stationary Distribution from One Cycle
Define the expected number of visits to \(j\) in one cycle by \(c_j=\mathbb E_a[R_1(j)]\). Since \(R_1(j)\le T_a^+\), each \(c_j\) is finite. The expected cycle length is the sum of the expected visit counts across states, because exactly one state is occupied at every time in the cycle.
Proof. Nonnegativity is immediate. Summing the visit counts over the countable state space and using monotone convergence gives \(\sum_{j\in S}c_j=\mathbb E_a[T_a^+]=m_a\). Thus \(\rho\) is a probability distribution. To check invariance, use Tonelli’s theorem and the Markov property. Since \(\{n<T_a^+\}\) is \(\mathcal F_n\)-measurable,
The last sum counts visits to \(j\) at times \(1,\ldots,T_a^+\). Compared with the cycle count at times \(0,\ldots,T_a^+-1\), it removes the term \(\mathbf 1_{\{X_0=j\}}\) and adds \(\mathbf 1_{\{X_{T_a^+}=j\}}\). Both \(X_0\) and \(X_{T_a^+}\) equal \(a\), so these terms are equal and the two counts agree. Hence \(\sum_i c_i p_{ij}=c_j\). Dividing by \(m_a\) proves \(\rho P=\rho\). The standard uniqueness theorem for the stationary distribution of an irreducible chain with a stationary probability distribution then gives \(\rho=\pi\); that uniqueness result is established in the earlier material on stationary distributions. \(\square\)
This cycle formula identifies the target of the frequency limit. The remaining step is to show that observed cycle lengths and visit counts approach their expectations at the appropriate rates.
The Regenerative State-Frequency Theorem
Proof. First start the chain at the regenerative state \(a\). Write \(S_k=T_k\) for the time of the \(k\)th return, with \(S_0=0\), and set \(K(n)=\max\{k:S_k\le n\}\). By the strong law of large numbers applied to the independent, identically distributed cycle lengths and visit counts,
Because \(S_{K(n)}\le n<S_{K(n)+1}\), these limits imply \(K(n)/n\to 1/m_a\). Indeed, \(K(n)\to\infty\), and dividing the two inequalities by \(K(n)\), the lower and upper bounds for \(n/K(n)\) both tend to \(m_a\).
The time indices from \(0\) through \(n-1\) contain all the first \(K(n)\) complete cycles and a possibly incomplete part of the next cycle. That partial cycle contributes at most \(L_{K(n)+1}\) visits to any state. We verify that this remainder is negligible. From \(S_k/k\to m_a\) and \(S_{k-1}/(k-1)\to m_a\), it follows that \(L_k/k\to0\), since \(L_k=S_k-S_{k-1}\). Also \((K(n)+1)/n\to1/m_a\), so \(L_{K(n)+1}/n\to0\). Consequently,
where the final equality is the cycle formula proved above. This proves the claim under \(\mathbb P_a\).
Now start at any \(x\in S\). Irreducibility and positive recurrence imply that the hitting time \(H=\inf\{n\ge0:X_n=a\}\) is finite almost surely. The first \(H\) terms of the time average contribute at most \(H/n\), which tends to zero almost surely. By the strong Markov property at \(H\), the path from time \(H\) onward has the law of the chain started at \(a\), so its state frequency converges almost surely to \(\pi_j\). Removing or adding the finite initial segment does not change the limit. The result follows under \(\mathbb P_x\). \(\square\)
The strong law used here requires independent, identically distributed integrable variables. Both requirements have a specific role: the Markov property at return times gives identical, independent cycles, and positive recurrence gives the finite mean cycle length. The visit count is integrable because it is bounded by the cycle length.
Worked Cycle Calculations
Worked Example: A Deterministic Three-State Cycle
Let \(S=\{1,2,3\}\), and let the chain move deterministically from \(1\) to \(2\), from \(2\) to \(3\), and from \(3\) to \(1\). In the state order \(1,2,3\),
Each row sums to \(1\). Starting at \(1\), a return cycle has length \(3\): at time indices \(0,1,2\) the chain visits states \(1,2,3\), respectively, and returns to \(1\) at time \(3\). Thus \(m_1=3\) and each expected visit count is \(1\), giving \(\rho=(1/3,1/3,1/3)\).
Check: Multiplication gives \(\rho P=(1/3,1/3,1/3)=\rho\), and \(1/3+1/3+1/3=1\). Directly, over each block of three consecutive times each state occurs once, so each empirical frequency tends to \(1/3\), from any starting state. The chain is periodic, but its state frequencies still converge.
Worked Example: A Two-State Chain with Random Return Cycles
Consider \(S=\{0,1\}\) and
The first row sums to \(\tfrac12+\tfrac12=1\), and the second sums to \(\tfrac13+\tfrac23=1\). The chain is irreducible. Use \(a=0\). Every cycle starts with one visit to \(0\). With probability \(\tfrac12\) it returns to \(0\) immediately; with probability \(\tfrac12\) it moves to \(1\) and then stays there for a geometrically distributed number \(G\) of steps before returning to \(0\). For \(r\ge0\), \(\mathbb P(G>r)=(\tfrac23)^r\), so
It follows that \(c_0=1\), \(c_1=\tfrac12\cdot3=\tfrac32\), and \(m_0=c_0+c_1=\tfrac52\). The cycle formula gives \(\rho_0=1/(\tfrac52)=\tfrac25\) and \(\rho_1=(\tfrac32)/(\tfrac52)=\tfrac35\).
Check: The entries sum to \(\tfrac25+\tfrac35=1\). Also, \((\tfrac25,\tfrac35)P\) has first entry \(\tfrac25\cdot\tfrac12+\tfrac35\cdot\tfrac13=\tfrac15+\tfrac15=\tfrac25\), and second entry \(\tfrac25\cdot\tfrac12+\tfrac35\cdot\tfrac23=\tfrac15+\tfrac25=\tfrac35\). Thus the cycle calculation agrees with the stationary equations.
Worked Example: A Three-State Chain with Two Possible Cycle Lengths
Let \(S=\{a,b,c\}\), with transitions \(a\to b\) with probability \(1\), \(b\to a\) and \(b\to c\) with probability \(\tfrac12\) each, and \(c\to a\) with probability \(1\). In that order,
The row sums are \(1\), \(\tfrac12+\tfrac12=1\), and \(1\); the chain is irreducible. Starting at \(a\), a cycle is \(a,b,a\) with probability \(\tfrac12\), of length \(2\), or \(a,b,c,a\) with probability \(\tfrac12\), of length \(3\). Therefore \(m_a=\tfrac12\cdot2+\tfrac12\cdot3=\tfrac52\). The cycle always visits \(a\) once and \(b\) once, and visits \(c\) with probability \(\tfrac12\). Hence \((c_a,c_b,c_c)=(1,1,\tfrac12)\), and the normalized cycle counts are \((\tfrac25,\tfrac25,\tfrac15)\).
Check: The entries sum to \(\tfrac25+\tfrac25+\tfrac15=1\). Multiplying by \(P\), the entries of \(\rho P\) are \(\tfrac25\cdot0+\tfrac25\cdot\tfrac12+\tfrac15\cdot1=\tfrac25\), \(\tfrac25\cdot1+\tfrac25\cdot0+\tfrac15\cdot0=\tfrac25\), and \(\tfrac25\cdot0+\tfrac25\cdot\tfrac12+\tfrac15\cdot0=\tfrac15\). Thus \(\rho P=\rho\), as required.
What the Result Does—and Does Not—Require
Aperiodicity is not needed for the state-frequency theorem. The deterministic three-state cycle illustrates why: its distribution at a fixed time does not settle to a single distribution, but its long-run fraction of time in each state does converge. Distributional convergence and convergence of time averages are different claims.
Positive recurrence, by contrast, is essential to this finite-mean cycle argument. For example, the simple symmetric random walk on the integers is irreducible and recurrent but null recurrent: its expected return time to \(0\) is infinite, and it has no stationary probability distribution. The proposition’s normalization \(c_j/m_0\) therefore cannot produce a stationary probability distribution. In the regenerative proof, a finite mean cycle length is what lets the strong law convert cycle counts into frequencies per unit time.
Common mistake: counting the return as part of the old cycle. In the deterministic example, the cycle from \(1\) to its next return has \(X_0=1\), \(X_1=2\), \(X_2=3\), and \(X_3=1\). The cycle is the half-open time interval from \(0\) up to, but not including, \(3\). A wrong count that labels the states at indices \(1,2,3\) as \(1,2,3\) misreads the trajectory: the actual states at those indices are \(2,3,1\). The correct cycle visits \(1,2,3\) at indices \(0,1,2\), respectively. Including the endpoint while also starting the next cycle at that same return can double-count its boundary state.
Check Your Understanding
Use the half-open cycle convention throughout, and distinguish the expected number of visits in a cycle from the expected cycle length.
- For a chain started at \(a\), why does the cycle from \(T_r\) to \(T_{r+1}\) include \(T_r\) but exclude \(T_{r+1}\)?
- In the two-state example, what is the expected number of visits to state \(1\) in one cycle from \(0\), and why is it not the expected cycle length?
- State the two strong-law limits used in the regenerative proof and identify the random variables to which the strong law is applied.
- Why does the incomplete cycle contribute a negligible fraction of the first \(n\) observations?
- Does the state-frequency theorem require aperiodicity? Explain using the deterministic three-state cycle.