1. ## Markov problem

Hi everyone, any help in how to work out this problem would be much appreciated...

If it is sunny today, there is a 80% chance it will be sunny tomorrow, and a 20% chance it will be rainy. If it is rainy today, there is a 40% chance it will be rainy tomorrow, and a 60% chance it will be sunny.

In n days, how many of them will be sunny and how many will be rainy?

2. This is an irreducible finite markov chain and
P= 0.8 0.2
0.6 0.4

If you solve the limiting distribution you get that in the limit P(sunny)=0.75 and P(rain)=0.25

therefore 0.75n days will be sunny and 0.25n days will be rainy.

3. Thanks jaco, could you go through the working so I can get my head round it?

4. you first have to get the limiting distributions which you can easily get by calculating P^n for n large enough and taking any row (all rows will be equal)
or solving the matrix [(P-I)|0] with last row substituted with 1's since probabilities must sum to 1.

in this case:
P-I=
-0.2 0.2
0.6 -0.6

(P-I)=
-0.2 0.6
0.2 -0.6

solve for:
-0.2 0.6 | 0
1 1 | 1

or -0.2x+0.6y=0 and x+y=1

you will get x=0.75 and y=0.25 if you solve the 2 equations.

let me know if you need more help

6. One further question... How long, on average, would a sequence of sunny days be? And how long would a sequence of rainy days be?

Is there a way of working this out?

7. i suppose you can calculate that empirically using sas or similar program

8. That's just a geometric distribution. The sequence of sunny days, is on average 5 days, and for rainy days, it's 5/3 days.