A Note on Exact State Visit Probabilities in Two-State Markov Chains
Mohammad Taha Shah
TL;DR
The paper addresses the problem of determining the exact distribution of the number of visits to a given state in a two-state Markov chain after $N$ transitions. It derives a closed-form expression for $\mathbb{P}(N_l=k\mid N)$ by conditioning on the initial state and partitioning into cases where the final path ends in $S_0$ or $S_1$, using combinatorial counts based on weak compositions. The main contributions are explicit sum expressions for $\mathbb{P}_1(k,N\mid S_1)$ and $\mathbb{P}_2(k,N\mid S_0)$, treatment of boundary cases $k=0$ and $k=N$, and numerical validation. This work enables exact enumeration of state-transition sequences and has implications for queuing, statistical physics, and reinforcement learning, with suggested extensions to multi-state chains.
Abstract
In this note we derive the exact probability that a specific state in a two-state Markov chain is visited exactly $k$ times after $N$ transitions. We provide a closed-form solution for $\mathbb{P}(N_l = k \mid N)$, considering initial state probabilities and transition dynamics. The solution corrects and extends prior incomplete results, offering a rigorous framework for enumerating state transitions. Numerical simulations validate the derived expressions, demonstrating their applicability in stochastic modeling.
