Examples of Markov chains
This page contains examples of Markov chains in action.A game of snakes and ladders or any other game whose moves are determined entirely by dice is a Markov chain.
| Table of contents |
|
|
A very simple weather model
The probabilities of weather conditions, given the weather on the preceding day, can be represented by a transition matrix:
(P)i j is the probability that, if a given day is of type i, it will be followed by a day of type j.
Notice that the columns of P sum to 1: this is because P is a stochastic matrix.
Predicting the weather
The weather on day 0 is known to be sunny. This is represented by a vector in which the "sunny" entry is 100%, and the "rainy" entry is 0%:
The weather on day 2 can be predicted in the same way:
Steady state of the weather
In this example, predictions for the weather on more distant days are increasingly inaccurate and tend towards a steady state vector. This vector represents the probabilities of sunny and rainy weather on all days, and is independent of the initial weather.
The steady state vector is defined as:
Since the q is independent from initial conditions, it must be unchanged when transformed by P. This makes it an eigenvector (with eigenvalue 1), and means it can be derived from P. For the weather example:
