# Probability of observing sequence Markov model

I have been trying to understand hidden Markov models with observational probability but I often find myself confused. I have discussed with my tutor for further help however, he is often rude and does not help and so I have decided to turn to the community.

I am trying to determine the probability of observing the following sequences: AABGA, ABBGT.

From what I understand, you would first need to find probabilities of the sequence occurring without observations and then begin looking for probabilities of the sequence with observational probability. I think I am often confused on questions like this because I do not know how I could check my answer to ensure I have obtained all the possible probabilities of the sequence. Would appreciate on insight into whether my approach was correct and if I have correctly obtained the probability of observing the sequences. Thanks in advance.

States with their initial probabilities

$$A(0.3)$$

$$A(0.4)$$

$$B(0.2)$$

$$G(0.0)$$

$$T(0.1)$$

Markov model - Updated based on suggestion:

AABGA

$$A,A,A,G,G = 0.3 * 0.7 * 0.1 * 0.5 * 0.2 = 0.21%$$

$$A,A,A,A,A = 0.3 * 0.7 * 0.1 * 0.3 * 0.5 = 0.315%$$

$$A,A,A,A,A = 0.3 * 0.7 * 0.1 * 0.3 * 0.1 = 0.063%$$

$$A,A,A,G,G = 0.4 * 0.5 * 0.1 * 0.5 * 0.2 = 0.2%$$

$$A,A,A,G,G = 0.4 * 0.1 * 0.1 * 0.5 * 0.2 = 0.04%$$

$$A,A,A,A,A = 0.4 * 0.1 * 0.1 * 0.3 * 0.5 = 0.06%$$

$$A,A,A,A,A = 0.4 * 0.1 * 0.1 * 0.3 * 0.1 = 0.012%$$

$$P(AABGA)$$ = 0.21% + 0.315% + 0.063% + 0.2% + 0.04% + 0.06% + 0.012% = $$0.9%$$

ABBGT

$$A,A,A,G,G = 0.4 * 0.1 * 0.1 * 0.5 * 0.2 = 0.04%$$

$$A,A,A,A,T = 0.4 * 0.1 * 0.1 * 0.3 * 0.5 = 0.06%$$

$$P(ABBGT)$$ = 0.04% + 0.06% = $$0.1%$$

• Looks like a hidden Markov model. Apr 11 at 8:15

It would appear from the added diagram that the underlying Markov chain has $$5$$ states $$\ 1,2,\dots,5\$$, with transition matrix $$\pmatrix{0.2&0.7&0&0.1&0\\ 0&0&0.5&0.5&0\\ 0.7&0&0.3&0&0\\ 0&0&0&0.2&0.8\\ 0.4&0.2&0.4&0&0}\ ,$$ and initial state probabilities $$\ \pmatrix{0.3&\color{red}{0.4}&0.1&0&0.2}\$$.
It's not clear what the emission probabilities are, however. Is $$\ P(A|1)=1.0\$$ or is it $$\ 0\$$, for instance? It can't be both, but you've given both as its value. The same inconsistency occurs for $$\ P(A|i)\$$ for all the other states. The labels on the diagram seem to suggest that the output is always $$\ A\$$ whenever the state is $$\ 1\$$ or $$\ 2\$$ and always $$\ T, G\$$ or $$\ B\$$ whenever the state is $$\ 3,4\$$ or $$\ 5\$$ respectively. But if that were the case, what would be the meaning of the quantities $$\ P(A|i), P(B|i)\$$ etc. given in the question?