A Hidden Markov Model describes a system that moves through a sequence of hidden states you never observe directly. What you do observe are emissions — noisy signals produced by whichever state the system is in.
Two assumptions make it tractable. The Markov property: the next state depends only on the current state, not the whole history. Output independence: the current observation depends only on the current state. Everything else — forward, Viterbi, Baum-Welch — is bookkeeping over those two assumptions.
The whole model is three tables: λ = (A, B, π).
That single recursion — sum over where you could have come from, multiply by how likely this observation is here — is the engine of the forward algorithm. Swap the sum for a max and you get Viterbi.
aij = P(state j at t+1 | state i at t). Rows sum to 1. Encodes the system’s dynamics — how sticky or jumpy the states are.
bj(o) = P(observation o | state j). The noisy sensor. Can be discrete counts or a continuous density (e.g. a Gaussian per state).
πi = P(state i at t=1). Where the chain is likely to start before any evidence arrives.
States × time grid. Every path through it is one candidate state sequence. Dynamic programming reuses sub-paths instead of enumerating NT of them.