I am a bit confused as I need to calculate the Markov-Chain transition probabilites for 3 variables.
Example data, let's assume a sequence of letters at specific and progressively-constant time steps:
Q
Q
E
Q
C
C
E
What are my transitional probabilities?
My (wrong) understanding is:
P(Q|Q) = 1
P(Q|E) = 1
P(Q|C) = 0
P(E|E) = 0
P(E|C) = 1
P(E|Q) = 1
P(C|C) = 1
P(C|E) = 0
P(C|Q) = 1
And therefore my (wrong) transition matrix will be:
Q E C
Q 1 1 1
E 1 0 0
C 0 1 1
note row sums are not = 1
What am I missing? The same approach works with 2 variables and here it seems that I need to divide each row by the number of probabilities > 0 to make the row sums =1.
Thanks