Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have a markov chain transition matrix for 2 states. Specifically in my case, it is a transition matrix for a bacterial genome with 4 random variables being A,C,G and T. (The bases) If I want to calculate the probability of a random sequence like GATTACA occurring from the markov chain, how would I go about it?

I was thinking that I would have to do it by :

P(A|G) * P(T|A) * P(T|T) * P(A|T) * P(C|A) * P(A|C)

But I am not sure what to do with the first G. Do I take its probability as 1 or do I use the stationary distribution of transition matrix value for G?

share|cite|improve this question
Do you mean 4 states ACGT, not 4 random variables? – gt6989b Feb 28 '13 at 15:55
You would need either the initial distribution or the initial starting state. – gt6989b Feb 28 '13 at 15:56
@gt6989b I actually used the word states for them first, but I thought it might be confusing since I already said that markov chain was for 2 states. (Ti and Ti-1). – gaddaga Feb 28 '13 at 16:31
@gt6989b, can I use the stationary distribution matrix for P as the initial starting state? – gaddaga Feb 28 '13 at 16:32
@gaddaga The Markov chain has 4 states, not 2. Your 2 does not enumerate the states, in fact it is 1 + the length of the memory of the Markov process. – Did Feb 28 '13 at 16:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.