Markov chains vs. HMM

Markov chains makes sense to me, I can use them to model probabilistic state changes in real life problems. Then comes the HMM. HMMs are said to be more suitable to model many problems than MCs. However, the problems people mention are somewhat complex to understand such as speech processing. So my question is can you describe a "real and simple" problem for which HMM is better suited than MC? and explain why? thanks

Speech recognition isn't as complex of an example as you think.

First, imagine creating a Markov Chain (MC) that does text recognition. Your program reads a bunch of (perfect, without errors) text and calculate states (words) and state changes (next words). Sounds like you've gotten this down. You could now generate text, or given some text predict the next word using the states and transition probabilities of your MC.

Now imagine that you want to use your MC with speech. You'll simply have people read text that's similar to your MC and you're set, right? Well... Except that they're going to pronounce the words differently: where the written text says "potato", you'll actually hear "po-TAY-toh" and "po-TAH-toh" and "pu-TAY-to", etc. And vice-versa: the text "ate" and "eight" represent two different states, but are (usually) pronounced the same.

Your algorithm no longer sees the underlying states (words), it sees a probabilistic distribution of pronunciations for each word. Your original MC is hidden behind the pronunciations, and now your model needs to be two-layered.

So you could get lots of people to read aloud the text that you used for your original training, you could get a distribution for the pronunciations for each word, and then combine your original model with the pronunciation model and you have a Hidden Markov Model (an HMM).

Most real-world problems will be like this, since the real world tends to be noisy. You won't actually know what state something is in. Instead, you'll get a variety of indicators for each state: sometimes the same indicator for different states ("ate" and "eight") and sometimes different indicators for the same state ("pu-TAY-toe" and "pah-tah-TOE"). Hence, HMMs are more suitable for real-world problems.

[Two side notes: 1) actual speech recognition works at the phoneme level, not word level, and 2) I believe that HMMs were the king of the hill for speech recognition, but have recently been dethroned by deep neural networks.]

Very basically, an HMM is a Markov model in which the state is not fully observable, rather it is only observed indirectly via some noisy observations. The Markov model part is a simple way of imposing temporal dependencies in the state. Correspondingly, problems in which HMMs are useful are those where the state follows a Markov model, but you don't observe the state directly.

There are various things you can do with an HMM. One useful thing you can do is as follows -- given a set of noisy observations up to the present time, perhaps you want to know what the most likely present state of the system is. To do this, you would appropriately combine the Markov chain structure with the observations to infer the state. Similarly, you can extend this to infer the whole sequence of states from the sequence of observations (this is standard).

In science and engineering, this model gets used all the time. For example, perhaps you are recording video of a simple animal like c. elegans (a worm), and it only has some small number of discrete behavioral states. From the video, you want to label each frame with the behavioral state of the animal. From a single frame, the labelling algorithm has some error/noise. However, there are also temporal dependencies that you can model with a Markov chain...If in one frame the animal was in one state, it is likely to be in the same state for the next frame (and perhaps some states only permit transitions to certain other states). Basically, by combining your noisy single-frame observations with the structure of the transitions (by the HMM), you can get a well-smoothed and better constrained sequence of state estimates.

HMM is a mixture model. Just like mixture of Gaussian Model. The reason we use it in addition to Markov Chain, is it is more complex to capture the patterns of data.

Similar to if we use single Gaussian to model a contentious variable OR we use mixture of Gaussian to model a continuous variable.

I would use a continuous variable to demo this idea: suppose we have this data

It is better to model it with 2 Gaussian and with different proportion. Which is "equivalent" in discrete case: we build a HMM with 2 hidden states.