[Math] Finding chance of rain with Bayesian statistics

bayesianprobabilitystatistics

I know the following based on weather statistics from a specific location:
– 60% of all rainy days start out cloudy in the morning.
– 50% of all mornings are cloudy
– In june, it rains, on average 9 out of 30 days (30%).

Its a day in June and I look at out the window in the morning and I see that it is cloudy. What is the change, based on what I know, that it's gonna rain today?

B: It rains, A: it is cloudy

$P(B|A) = \frac{P(A \cap B)}{P(A)} \Leftrightarrow P(A \cap B) = P(B|A) * P(A)$

So, $P(A \cap B) = 0.6 * 0.5 = 0.3$

$P(B \cap A) = P(A|B) * P(B) \Leftrightarrow P(B) = \frac{P(B \cap A)}{P(A|B)}$

Then, $P(B) = \frac{0.3}{1} = 0.3$, because it's always cloudy given that it rains, right?

I don't know what the right answer is or how I can include the information about the 30% chance of rain in june. Any help appreciated, thank you

Best Answer

A: It is cloudy B: It rains

$$P(B|A) = \frac{P(A|B)P(B)}{P(A)} = \frac{0.6*0.3}{0.5} = 36\%$$

$P(B|A)$: probability that it will rain, given that is cloudy. We need to find this.

$P(A|B)$: probability that is cloudy in the morning, given that it will rain. This is 60%,as given in the first fact.

$P(B)$: Probability that it will rain. Given to be 30% in June.

$P(A)$: Probability that is cloudy. 50%

Related Question