**T-61.5020 Statistical Natural Language Processing**

Exercises 5 -- Markov chains and Hidden Markov Models

Version 1.0

- 1.
- You have studied the changes of the weather. Every day 12am you have looked
at the sky and wrote down whether it is sunny (), cloudy () or
rainy (). From these observations you have calculated the following
transition probabilities:

Element stands for transition from state to state . E.g. the probability that it is sunny day after a cloudy one is .- a)
- Draw Markov chain for the weather.
- b)
- Today it is cloudy. What is the probability of the following sequence of five days: Tomorrow it rains, day after tomorrow is cloudy, and after it we have three sunny days.
- c)
- On average, how many successive sunny days there are?

- 2.
- You are on holidays in Hawaii when you begin to wonder what kind of
weather it would be in home. The local newspapers tell only the
temperature of the region. However, you can estimate the probability
, i.e. that it is
over 5 degrees of frost in a sunny day. And more:
- a)
- After three days the holiday ends and it is time to fly back.
You want to estimate what kind of weather it is when you come
back, in order to dress appropriately. The temperatures in the home
town were , and
. Calculate
the probabilities of the three weather types on the day of returning.
It is recommended to use the forward algorithm, brute force will be
very time consuming.
- b)
- In the airplane you speculate what kind of weather it has been in
home during the holidays. Find the most probable state sequence.
Viterbi algorithm uses the least number of calculations.

svirpioj[a]cis.hut.fi