# Two Conditional Probability

In a city, every day is either cloudy or sunny (not both). If it's sunny on any given day, then the probability that the next day will be sunny is $\frac 34$. If it's cloudy on any given day, then the probability that the next day will be cloudy is $\frac 23$.

a) In the long run, what fraction of days are sunny?
b) Given that a consecutive Saturday and Sunday had the same weather in the city, what is the probability that the weather was sunny?

For part a, I was thinking that the answer would be $(\frac{3}{4}+ \frac{1}{3})/2$ to get $\frac{13}{24}$ because the probability if it is sunny followed by another sunny day is $\frac34$ and the probability that it is cloudy followed by a sunny day is $\frac13$.

For part b, I'm thinking of using casework, but I'm not sure.

Let's denote the given probabilities as $p_{s\mid s}=3/4$ and $p_{c\mid c}=2/3$. Then also $p_{s\mid c}=1/3$, which is the probability that a day is sunny if it follows a cloudy day.

For part (a)

Let's denote the equilibrium probability of that a day is sunny as $p_s$. At equilibrium this is a constant from day to day; so we want to solve $p_s= p_{s\mid s}\,p_s +p_{s\mid c}\,(1-p_s)$ for $p_s$.

$$p_s = \tfrac 3 4 p_s +\tfrac 1 3(1-p_s)$$

For part (b) use this equilibrium constant as the probability that Saturday was sunny, and work out $p_w$: the probability that the weekend was sunny given that both days had the same weather.

$$p_{w} = \frac{p_{s\mid s} p_s}{p_{s\mid s}p_s+p_{c\mid c}(1-p_s)}$$

The tansition-matrix is $$P=\begin{pmatrix} & S_2 & C_2 \\ S_1&\frac{3}{4} & \frac{1}{4} \\ C_1 & \frac{1}{3} & \frac{2}{3} \end{pmatrix}$$

$C_1$: Cloudy on a given day.

$S_2$: Sunny on the consecutive day.

To get the steady-state distribution one has to solve the following equation:

$\begin{pmatrix} S & C \end{pmatrix}\cdot P=\begin{pmatrix} S & C \end{pmatrix}$

Thus the equation system is

$\frac{3}{4}\cdot S+\frac{1}{3}\cdot C=S$

$\frac{1}{2}\cdot S+\frac{2}{3}\cdot C=C$

Can you proceed from here ?

• Sorry I don't know much about matrices or calc.. – user228320 May 15 '15 at 20:21
• At the moment I don´t see another way to calculate the long run fraction. Maybe you should google the terms "transition matrix" and "steady state distribution". But maybe someone else has another way of calculation. – callculus May 15 '15 at 20:28
• @calculus Go back to first principles. At equilibrium the probability that any day is sunny is equal to the probability that the previous day was sunny, then use the Law of Total Probability. $$P(S_{Eq}) = P(S_2\mid S_1)\,P(S_{Eq})+(1-P(C_2\mid C_1))\,(1-P(S_{Eq}))$$ – Graham Kemp May 16 '15 at 0:29
• @GrahamKemp Yes, this is another clever way. I was on an another track. – callculus May 16 '15 at 10:55