Entire problem: We have a Markov chain model with with 5 states: s, t, m, f, r
TPM follows:
P <- matrix(c(.84,.03,.01,.03,.03,
.11,.80,.15,.19,.09,
.01,.04,.70,.02,.05,
.04,.10,.07,.75,.00,
.00,.03,.07,.01,.83),
nrow=5
)
With matrix multiplication, the limiting distribution comes out to:
(0.1478365,0.4149259,0.09555939,0.2163813,0.1252968)
I am attempting to plot how P(Xn = s) changes as a function of time.
Given the initial distribution is P(X0 = i) = 1/5 i.e:
s t m f r
α = ( 1/5 1/5 1/5 1/5 1/5 )
I need to plot P(Xn = s) (on the y-axis) against n = 0, 1, 2, 3, 4, 5 (x-axis).