This is a “one-dimensional” demonstration of properties of the absorbing Markov Chain.

Andy Long
Spring, 2018

This matrix (mat) is an absorbing markov chain: there are two states, and state 1 transitions to itself with probability 1, whereas state 2 transitions to itself with probability q (and to state 1 with probability r, which, in this case, is 1-q, but pay no attention to that at the moment...)

What we know is that to see what happens to an initial distribution of states after many (n) trials, we simply raise the matrix to that many powers, (M^n)....

mat={{1,0},{r,q}};
MatrixForm[mat]
MatrixForm[mat.mat]
mat2the9th=mat.mat.mat.mat.mat.mat.mat.mat.mat.mat;
MatrixForm[Expand[mat2the9th]]

If we want to know what happens asymptotically, we would compute (M^∞):

mat2theInfinity={{1,0},{r/(1-q),0}};
MatrixForm[mat2theInfinity]