1. Consider a Hidden Markov Model with two states, Sunny (S) and Rainy (R), representing the weather.
Each day, a person dresses according to the weather: they wear a coat on rainy days and sunglasses on sunny
days.
The transition probabilities between the states and the emission probabilities of the observations are as
follows:
• Transition Probabilities:
P(S | S) = 0.8, P(R | S) = 0.2
P(S | R) = 0.4, P(R |R) = 0.6
• Emission Probabilities:
P(Coat | R) = 0.9, P(Sunglasses | R) = 0.1
P(Coat | S) = 0.1, P(Sunglasses | S) = 0.9
• Initial Probabilities:
P(S) = 0.6, P(R) = 0.4
Calculate the probability of the observation sequence [Sunglasses, Coat], using the Forward algorithm.
Solution:
The concept used is the Forward Algorithm, one of the core algorithms for Hidden Markov Models (HMM). It
calculates the probability of observing a specific sequence of outputs given the model parameters.
The observation sequence is O=(O1,O2)=(Sunglasses,Coat). The length of the sequence is T=2.
HMM Parameters
State → Sunny (0.8, → Rainy (0.2, Emission Emission
Initial π
(Hidden) 0.4) 0.6) b(Coat) b(Sunglasses)
S (Sunny) 0.6 PS→S=0.8 PS→R=0.2 0.1 0.9
R (Rainy) 0.4 PR→S=0.4 PR→R=0.6 0.9 0.1
Forward Algorithm Calculation
Step 1: Initialization (t=1)
Step 2: Recursion (t=2)
Step 3: Termination