# HW1 (Due 9/18)

1. In a tropical island where temperature is rather stable throughout the year. Say the temperature (in degree Celicius) is random with a distribution (for simplicity we assume the temperature is discrete) of P(T=34)=0.05, P(T=33)=0.1, P(T=32)=0.25, P(T=31)=0.2, P(T=30)=0.1, P(T=29)=0.1, P(T=28)=0.1, P(T=27)=0.05, P(T=26)=0.05 for sunny days. And P(T=27)=0.1, P(T=26)=0.1, P(T=25)=0.2, P(T=24)=0.3, P(T=23)=0.2, P(T=22)=0.1 for rainy days. And if today is sunny, the probability of tomorrow to be sunny is 0.95. If today is rainy, the probability of tomorrow remaining rainy is only 0.2. (10 points)

1. If it is rainy today, what is the expected temperature tomorrow?

2. What is the expected temperature tomorrow (without knowing the weather today)? Hint: you need to find out the steady state probabilities of rainy and sunny days first (google detailed balance equation may help).

3. What is the probability that today is sunny if the temperature is higher than 24.5 C?

4. If today is rainy, what is the probability that the temperature tomorrow is below 25.5 C?

2. Extra credit (10 points): Write a program of your choice to estimate the probabilities in 1. using Monte Carlo simulation. Please submit your code and screenshot(s) running the code.