Stochastic matrix
In mathematics, a stochastic matrix is a square matrix used to describe the transitions of a Markov chain. Each of its entries is a nonnegative real number representing a probability. It is also called a probability matrix, transition matrix, substitution matrix, or Markov matrix. The stochastic matrix was first developed by Andrey Markov at the beginning of the 20th century, and has found use throughout a wide variety of scientific fields, including probability theory, statistics, mathematical finance and linear algebra, as well as computer science and population genetics. There are several different definitions and types of stochastic matrices:
- A right stochastic matrix is a square matrix of nonnegative real numbers, with each row summing to 1.
- A left stochastic matrix is a square matrix of nonnegative real numbers, with each column summing to 1.
- A doubly stochastic matrix is a square matrix of nonnegative real numbers with each row and column summing to 1.
- A substochastic matrix is a real square matrix whose row sums are all
This article uses the right/row stochastic matrix convention.
History
The stochastic matrix was developed alongside the Markov chain by Andrey Markov, a Russian mathematician and professor at St. Petersburg University who first published on the topic in 1906. His initial intended uses were for linguistic analysis and other mathematical subjects like card shuffling, but both Markov chains and matrices rapidly found use in other fields.Stochastic matrices were further developed by scholars such as Andrey Kolmogorov, who expanded their possibilities by allowing for continuous-time Markov processes. By the 1950s, articles using stochastic matrices had appeared in the fields of econometrics and circuit theory. In the 1960s, stochastic matrices appeared in an even wider variety of scientific works, from behavioral science to geology to residential planning. In addition, much mathematical work was also done through these decades to improve the range of uses and functionality of the stochastic matrix and Markovian processes more generally.
From the 1970s to present, stochastic matrices have found use in almost every field that requires formal analysis, from structural science to medical diagnosis to personnel management. In addition, stochastic matrices have found wide use in land change modeling, usually under the term Markov matrix.
Definition and properties
A stochastic matrix describes a Markov chain over a finite state space with cardinality.If the probability of moving from to in one time step is, the stochastic matrix is given by using as the -th row and -th column element, e.g.,
Since the total of transition probability from a state to all other states must be 1,
thus this matrix is a right stochastic matrix.
The above elementwise sum across each row of may be more concisely written as, where is the -dimensional column vector of all ones. Using this, it can be seen that the product of two right stochastic matrices and is also right stochastic:. In general, the -th power of a right stochastic matrix is also right stochastic. The probability of transitioning from to in two steps is then given by the -th element of the square of :
In general, the probability transition of going from any state to another state in a finite Markov chain given by the matrix in steps is given by.
An initial probability distribution of states, specifying where the system might be initially and with what probabilities, is given as a row vector.
A stationary probability vector is defined as a distribution, written as a row vector, that does not change under application of the transition matrix; that is, it is defined as a probability distribution on the set
Example: Cat and mouse
Suppose there is a timer and a row of five adjacent boxes. At time zero, a cat is in the first box, and a mouse is in the fifth box. The cat and the mouse both jump to a random adjacent box when the timer advances. For example, if the cat is in the second box and the mouse is in the fourth, the probability that the cat will be in the first box and the mouse in the fifth after the timer advances is one fourth. If the cat is in the first box and the mouse is in the fifth, the probability that the cat will be in box two and the mouse will be in box four after the timer advances is one. The cat eats the mouse if both end up in the same box, at which time the game ends. Let the random variable K be the time the mouse stays in the game.The Markov chain that represents this game contains the following five states specified by the combination of positions. Note that while a naive enumeration of states would list 25 states, many are impossible either because the mouse can never have a lower index than the cat, or because the sum of the two indices will always have even parity. In addition, the 3 possible states that lead to the mouse's death are combined into one:
- State 1:
- State 2:
- State 3:
- State 4:
- State 5: game over:, &.
Long-term averages
No matter what the initial state, the cat will eventually catch the mouse and a stationary state π = is approached as a limit. To compute the long-term average or expected value of a stochastic variable, for each state and time there is a contribution of. Survival can be treated as a binary variable with for a surviving state and for the terminated state. The states with do not contribute to the long-term average.Phase-type representation
As State 5 is an absorbing state, the distribution of time to absorption is discrete phase-type distributed. Suppose the system starts in state 2, represented by the vector. The states where the mouse has perished don't contribute to the survival average so state five can be ignored. The initial state and transition matrix can be reduced to,and
where is the identity matrix, and represents a column matrix of all ones that acts as a sum over states.
Since each state is occupied for one step of time the expected time of the mouse's survival is just the sum of the probability of occupation over all surviving states and steps in time,
Higher order moments are given by