This is my second time posting the question as I failed to do so the first time, because I did not know the proper way. My apologies.
Suppose that whether or not it rains today depends on weather conditions through the previous teo days. If it has rained for the past two days, then it will rain today with probability 0.7. If it did not rain for any of the past two days, then it will rain today with probability 0.4. In any other case the weather today will, with probability 0.5, be the same as the weather yesterday. Describe the weather condition over time with a Markov chain.
Suppose that it rained today and yesterday. Calculate the expected number of days until it rains three consecutive days for the first time in the future.
I have found 4 different states that I named RR(0), RN(2), NR(1), and NN(3). R stands for when it rains and N is for when it does not.
As the question asks, I have tried finding the possible ways of three consecutive days being rainy. At time n, we are given it was rainy today and yesterday, meaning we are in State 0.
1-) First possibility is when it rains tomorrow, which gives us RRR (we got the three consecutive days)
2-) Second possibility is when we go from 0 to 2, from 2 to 1, from 1 to 0, and stay in 0 one day. That follows as : RRNRRR (In 4 days we can get rain for 3 consecutive days)
3-) Third is when we go from 0 to 2, from 2 to 3, from 3 to 1, from 1 to 0, and stay in 0 one day. That follows as: RRNNRRR.
To conclude what I have in mind about the question, wherever we go, when we get to State 0, we need to stay there one more day to get three consecutive rainy days. That means the minimum # of days to get rain for three consecutive days is one day. However, after this point, I am not able to proceed with the question.
Any help would be appreciated, thank you!!
Edit: I think the maximum # of days is just a random number, which leads me to the expectation of the sum of a random number of geometric random variable, but still I can't go any further beyond that. Thank you!