I'm studying statistics and I'm trying to understand markov chain topic. I'm using the package "markovchain" in R to obtain the stationary distribution.
From this transition matrix $M$:

  A    B
A 0.97 0.03
B 0.05 0.95

using the "steadyStates" function I get this:

A     B
0.625 0.375

After a few try a noticed that I can obtain the same result if I do this: M^200

So, what I did was to compute 200 matrices using powers from 1 to 200 to show how each element in the matrix changes after every iteration (e.g. how 0.97 becomes 0.625 and 0.03 becomes 0.375). Then I plotted these 4 vectors (with 200 entries each) in 4 separate plots (I'm attaching the two types of plot I got here below).

My questions are:
Does it makes any sense to plot these values?
Can I get some insight from them? For example, can I interpret these plots like some sort of a "elbow method"? Or maybe something like: after 50 iteration I have a good approximation of the final values...
If I use two or more matrices can I say: matrix one "converges" before matrix two, three, etc.?

Thank you for your time.

enter image description here enter image description here

  • $\begingroup$ Add 'self-study' tag. $\endgroup$ – user158565 Aug 1 at 15:44
  • $\begingroup$ Have you noticed these are perfect exponential plots? See stats.stackexchange.com/questions/191730 for a sketch of the underlying theory. $\endgroup$ – whuber Aug 1 at 19:28
  • $\begingroup$ Ok, thanks. I honestly don't understand a lot of that reference but I guess I did something like plotting x, x^2, x^3, etc... $\endgroup$ – Paolo Aug 2 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.