[Math] How to reword this problem illustrating a scenario that needs Bayes Theorem to solve

bayes-theoremprobability

Taken from Stat Trek, an example explaining Bayes Theorm http://stattrek.com/probability/bayes-theorem.aspx

Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Marie's wedding?

Can someone help reword this problem?. I don't particular understand what it means "When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time".

How can I assign the variables to fit this formula?

enter image description here

Best Answer

Let the probability that it actually rains be $R$. Our prior information about $R$ is based on the "past few years" and it tells us that it rains, on average, 5 days a year (let's say three non-leap years just to finesse the problem of leap days) so we know that: $$ P(R) = \frac{5}{365} = \frac{1}{73} \approx .0137 $$

Now let's talk about the weather forecaster's accuracy (or lack thereof). Let $P$ represent the probability that Mr. Sunshine accurately predicts rain. We know that his true positive rate (accurate prediction of presence of event) is 90%, so we know $P(P|R)$, the probability that his prediction of rain occurs when (given) it actually rains. We also know his false positive rate, the probability that the test (his prediction) indicates true when the phenomenon (rain) is false, $P(P|\overline{R})$ is 10%.

Lastly, poor Marie is in possession of a $P$, a prediction of rain. She wants to know $P(R|P)$, the probability that it will rain given the weather report. Now we can use Bayes Theorem: $$ \begin{align} P(R|P) &= \frac{P(R \cap P)}{P(P)}\\ P(R \cap P) &= P(P \cap R) = P(P|R)P(R)\\ P(P) &= P(P \cap R) + P(P \cap \overline{R})\\ P(P \cap \overline{R}) &= P(P|\overline{R})P(\overline{R}) \end{align} $$ So, fully spelled out in terms of the data we have, we need: $$ P(R|P) = \frac{P(P|R)P(R)}{P(P|R)P(R) + P(P|\overline{R})P(\overline{R})} $$ Which when we substitute values becomes $$ \begin{align} P(R|P) &=\frac{\frac{9}{10}\times \frac{1}{73}}{\left(\frac{9}{10}\times\frac{1}{73}\right)+\left(\frac{1}{10}\times \frac{72}{73}\right)}\\ &=\frac{\frac{9}{730}}{\frac{9}{730} + \frac{72}{730}}\\ &=\frac{9}{81} = \frac{1}{9} \approx 11.1\% \end{align} $$