Suppose that we have two models for a 2-state HMM and both have two output symbols: $A$ and $B$.

Model 1:

  • Transition probabilities: $a_{11}=0.6$, $a_{12}=0.4$, $a_{21}=0.0$, $๐‘Ž_{22}=1.0$.
  • Output probabilities: $๐‘_1(๐ด)=0.45$, $๐‘_1(๐ต)=0.55$, $๐‘_2(๐ด)=0.5$, $๐‘_2(๐ต)=0.5$.
  • Initial probabilities: $๐œ‹_1=0.4$, $๐œ‹_2=0.6$.

Model 2:

  • Transition probabilities: $a_{11}=0.2$, $a_{12}=0.8$, $a_{21}=0.0$, $๐‘Ž_{22}=1.0$.
  • Output probabilities: $๐‘_1(๐ด)=0.2$, $๐‘_1(๐ต)=0.8$, $๐‘_2(๐ด)=0.6$, $๐‘_2(๐ต)=0.4$.
  • Initial probabilities: $๐œ‹_1=0.7$, $๐œ‹_2=0.3$.

Which model is more likely to produce the observation sequence $\{A, B, A\}$?

  • $\begingroup$ This seems doable, if a bit tedious. What's your problem? $\endgroup$ – Gijs Apr 23 at 14:41
  • $\begingroup$ I am new to Markov Chains and I want to know how can I produce the probability of the sequence in both the models. $\endgroup$ – Ali J. Apr 23 at 14:57

You can answer this samll problem with the basic version of forward algorithm, described in the famous tutorial paper A tutorial on hidden Markov models and selected applications in speech recognition by Lawrence Rabiner. The interesting part of the paper for you is on page 6 :

enter image description here

Using an old code i had on my computer I get : $$p({A, B, A}|\mathrm{Model} 1) \approx 0.1291, $$ while $$p({A, B, A}|\mathrm{Model} 2) \approx 0.0817. $$

Thus Model 1 is more likely to generate this sequence.


Your Answer

By clicking โ€œPost Your Answerโ€, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.