This app is a simulation of the discrete-time Markov chain with state space \( S = \{0, 1\} \). The transition matrix is \[ P = \left[\begin{matrix} 1 - p & p \\ q & 1 - q \end{matrix} \right] \] so that \( p \) is the probability of a transition to state 1 when in state 0, and \( q \) is the probability of a transition to state 0 when in state 1. The time and the sate are recorded at each update in the data table. The limiting distribution and the proportion of time that the chain is in each state are shown in the distribution graph and the distribution table.
The parameters \(p\) and \(q\), and the initial state \(x_0\) can be varied with the input controls.