### Two-State, Discrete-Time Chain

State Space

#### Description

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 record table. The proportion of time that the chain is in each state is shown visually in the graph box in red and displayed numerically in the distribution table. The limiting distribution is shown visually in the graph box in blue and displayed numerically in the distribution table

The parameters $$p$$ and $$q$$, and the initial state $$x_0$$ can be varied with the input controls.