In: Math
Using the weather Markov chain simulate the weather over 10 days by flipping a coin to determine the chances of sunny or cloudy weather the next day according to the Markov chain's transition probabilities. If currently sunny, flip once and a head means sunny the next day and a tail means cloudy the next day. If currently cloudy flip twice and when either flip is a head it is sunny the next day and when both flips are tails it is cloudy the next day. To start, assume that the previous day was sunny. what fraction of the 10 days was sunny?