Markov Chain
Study guides: Exam MAS-I, Exam ACIA-CAPSTONE
A Markov Chain is a stochastic process \{X_n, n = 0, 1, 2, \ldots\} with a finite or countable set of states in which, given the present state, the next state is independent of the past states. If the chain is in state i at time n, the probability that it is in state j at time n + 1 is
P(X_{n+1} = j \mid X_n = i, X_{n-1} = i_{n-1}, \ldots, X_0 = i_0) = P_{ij}
i_0, \ldots, i_{n-1}are the states the chain occupied at times0, \ldots, n-1.P_{ij}is the transition probability from stateito statej, and it does not depend onn.P_{ij} \ge 0, and\sum_j P_{ij} = 1for every statei.
The transition probabilities form the transition probability matrix \mathbf{P}, whose row i is the distribution of the next state when the chain is in state i. Each row sums to 1 because from state i the chain must move to some state.
Because only the present state matters, two paths of the chain that are in the same state at the same time have the same probabilities for every later step. A chain observed partway through therefore restarts from its current state. When the probabilities of the next step depend on more of the history than the current state, the process becomes a Markov chain once each state records that history.
Each day a commuter either drives (state 1) or takes the train (state 2). After a day of driving she drives the next day with probability 0.7, and after a day on the train she takes the train the next day with probability 0.6. What is the transition probability matrix?
- Row 1 is the distribution of tomorrow's state after a day of driving:
P_{11} = 0.7, and its complement isP_{12} = 1 - 0.7 = 0.3.- Row 2 is the distribution after a day on the train:
P_{22} = 0.6andP_{21} = 1 - 0.6 = 0.4.- The transition probability matrix is therefore
\mathbf{P} = \begin{bmatrix} 0.7 & 0.3 \\ 0.4 & 0.6 \end{bmatrix}
Multi-step transition probabilities
The probability that a chain now in state i is in state j after n steps is
P_{ij}^{n} = (\mathbf{P}^n)_{ij}
(\mathbf{P}^n)_{ij}is the entry in rowiand columnjof thenth power of\mathbf{P}.
This follows from the Chapman-Kolmogorov equations. Row i of \mathbf{P}^n is the distribution of the state n steps after the chain is in state i. Each entry P_{ij}^{n} is the sum, over every path of intermediate states from i to j, of the product of the transition probabilities along the path.
The commuter took the train today. What is the probability that she drives two days from now?
- She can drive tomorrow and again the day after, with probability
P_{21}P_{11} = 0.4 \times 0.7 = 0.28.- She can take the train tomorrow and drive the day after, with probability
P_{22}P_{21} = 0.6 \times 0.4 = 0.24.- The probability is the sum over the two paths,
P_{21}^{2} = 0.28 + 0.24 = 0.52.
Long-run probabilities
For an irreducible, aperiodic chain with finitely many states, the long-run probability \pi_j of state j is the solution of
\pi_j = \sum_i \pi_i P_{ij}
\sum_j \pi_j = 1.
The probabilities \pi_j form the stationary distribution of the chain. Each \pi_j is the long-run proportion of time the chain spends in state j, and it is also the limit of P_{ij}^{n} as n \to \infty for every starting state i.
In the long run, on what proportion of days does the commuter drive?
- The balance equation for state 1 is
\pi_1 = 0.7\,\pi_1 + 0.4\,\pi_2, so0.3\,\pi_1 = 0.4\,\pi_2.- With
\pi_1 + \pi_2 = 1,\pi_1 = \frac{0.4}{0.3 + 0.4} = \frac{4}{7}.- She drives on
\frac{4}{7} = 0.571of days in the long run.
Using one path for a multi-step probability A multi-step transition probability sums over every path of intermediate states. For the commuter on the train today, the path through driving tomorrow gives only
0.28, but the probability of driving in two days is0.28 + 0.24 = 0.52.
Practice questions
- SOA Exam ALTAM Sample Question 16
- CAS Exam MAS-I Fall 2018, Question 9
- CAS Exam MAS-I Fall 2018, Question 10
- CAS Exam MAS-I Fall 2018, Question 11
- CAS Exam MAS-I Spring 2018, Question 10
- CAS Exam MAS-I Spring 2018, Question 11
- CAS Exam MAS-I Fall 2019, Question 8
- CAS Exam MAS-I Fall 2019, Question 9
- CAS Exam MAS-I Fall 2019, Question 10
- CAS Exam MAS-I Spring 2019, Question 8
- CAS Exam MAS-I Spring 2019, Question 9
- CAS Exam MAS-I Spring 2019, Question 10
- Exam MAS-I Practice Question 16
- Exam MAS-I Practice Question 17
- Exam MAS-I Practice Question 18
- Exam MAS-I Practice Question 19
- Exam MAS-I Practice Question 20
- Exam MAS-I Practice Question 21
- CAS Exam MAS-II Fall 2018, Question 16
- CAS Exam MAS-II Fall 2018, Question 17
- CAS Exam MAS-II Fall 2018, Question 18
- CAS Exam MAS-II Fall 2018, Question 19
- CAS Exam MAS-II Fall 2018, Question 20
- CAS Exam MAS-II Fall 2018, Question 30
- CAS Exam MAS-II Fall 2018, Question 34
- CAS Exam MAS-II Fall 2019, Question 29
- CAS Exam MAS-II Fall 2019, Question 33
- CAS Exam MAS-II Fall 2019, Question 34
- CAS Exam MAS-II Fall 2019, Question 36