# Basic Bayesian conditional probability problem

I'm trying to solve a basic Bayesian conditional probability problem about rain. It is as follows:

In a certain place it rains on one third of the days. The local evening newspaper attempts to predict whether or not it will rain the following day. Three quarters of rainy days and three fifths of dry days are correctly predicted by the previous evening’s paper. Given that this evening’s paper predicts rain, what is the probability that it will actually rain tomorrow?

From what I can tell the correct answer is roughly 38% (give or take), but an answer online gives it as 0.48. Which one is correct?

I believe the error in the posted solution comes from thinking that $P(P|\bar R) = \frac{2}{5}$ instead of $P(P|\bar R) = \frac{3}{5}$ which I believe is given in the question.

I believe the error in the posted solution comes from thinking that $P(P|\bar R) = \frac{2}{5}$ instead of $P(P|\bar R) = \frac{3}{5}$ which I believe is given in the question.

Nope, it is not an error.   $3/5$ is the probability that the prediction is correct for a dry day.   This is not what you want to use.

Three quarters of rainy days and three fifths of dry days are correctly predicted by the previous evening’s paper.

So, since the event $P$ is "predicted rain" then $\mathsf P(P\mid \bar R) = 2/5$ ... the probability that the prediction is incorrect for a given dry day.

Thus leading to $\mathsf P(R\mid P) = 0.48$

PS: Develop an aversion for using $P$ to label events, especially when you donut use a different font to represent the the probability function as $P$.

More over, whatever label you choose, you should be clear on what this means respective to the information provided and sought.   Be careful; the easiest person for anyone to confuse is theirself.

The question provides the probabilities for correct prediction given rainfall-states. $~\mathsf P(C\mid R)=3/4, \mathsf P(C\mid\bar R)=3/5$, and also the probability for rainfall: $\mathsf P(R)=1/3$

The question then asks for the probability for rainfall given a pediction of rain.   So, having used $C$ to stand for "correct prediction", I must express the what is sought in terms of this.   So, since a prediction of rain may be correct or incorrect, what is being sought is:\begin{align}\mathsf P(R\mid (R\cap C)\cup(\bar R\cap \bar C)) ~&=~\dfrac{\mathsf P(C\mid R)\mathsf P(R)}{\mathsf P(C\mid R)\mathsf P(R)+\mathsf P(\bar C\mid \bar R)\mathsf P(\bar R)} \\ &=~ \dfrac{\tfrac 34\tfrac 13}{\tfrac 34\tfrac 13+(1-\tfrac 35)(1-\tfrac 13)}\\ &= \dfrac{15}{31} \\ &\approxeq 0.4839\end{align}

Alternatively one might have looked at what was sought and used $P$ for a prediction of rainfall, as long as what was provided is expressed in terms of this.   $~\mathsf P(P\mid R)=3/4, \mathsf P(\bar P\mid\bar R)=3/5$,   Consistency is the key.

\begin{align}\mathsf P(R\mid P) ~&=~\dfrac{\mathsf P(P\mid R)\mathsf P(R)}{\mathsf P(P\mid R)\mathsf P(R)+\mathsf P(P\mid \bar R)\mathsf P(\bar R)} \\ &=~ \dfrac{\tfrac 34\tfrac 13}{\tfrac 34\tfrac 13+(1-\tfrac 35)(1-\tfrac 13)}\\ &= \dfrac{15}{31} \\ &\approxeq 0.4839\end{align}

• I said that the error is thinking that it's 2/5 instead of 3/5. So we're in agreement. Oct 16, 2017 at 23:55
• I said that it is not an error, so it is not an agreement. $\mathsf P(P\mid\bar R)$ is $2/5$. Oct 16, 2017 at 23:56
• Oh wait, yeah I disagree. It's definitely not 0.48. See Eric's answer. You meant to put $Pr(\bar P | \bar R) = 2/5$ instead of $Pr(P | \bar R) = 2/5)$ since $1 - Pr(A | B) = Pr(\bar A | B)$. $\bar P$ is used to denote an incorrect prediction. Oct 16, 2017 at 23:59
• Actually, you're right if we define $P$ that way. My confusion stems from the ambiguity of what the event $P$ actually is. The question seems to suggest that $P$ isn't predicting rain since the paper actually predicts dry days as well: "Three quarters of rainy days and three fifths of dry days are correctly predicted by the previous evening’s paper" but I guess you can just shove $3/5 = P(\bar P | \bar R)$. At that point we're debating language so imo the question is ambiguous. Oct 17, 2017 at 0:39
• The question isn't ambiguous; it provides probabilities for correct prediction given the rain-states, but asks for probability of rain given a prediction of rain. The ambiguity is introduced by you not being clearon what your label $P$ means respective to these events. You have to be careful; the easiest person for anyone to confuse is theirself. Oct 17, 2017 at 1:37

You can try to solve the problem algebraically; here's a good way to check your work.

Imagine that there are sixty days which are perfectly representative of the probabilities given.

So on 20 of those days there is rain, and on 40 there is no rain.

On the 20 days that there is rain, 15 of them are predicted as rain and 5 are predicted as no rain.

On the 40 days that there is no rain, 24 of them are predicted as no rain, and 16 of them are predicted as rain.

Now we are given that the paper predicts rain. So we discard the 5 days where the paper predicts incorrectly that there is no rain, and we discard the 24 days that the paper correctly predicts that there is no rain.

That leaves us 15 days of correct predictions of rain, and 16 incorrect predictions of rain.

Therefore the probability that the prediction is correct is 15 out of 16 + 15 = 29, which is around 48%.

What can we deduce from this? If the paper predicts rain tomorrow, odds are pretty good that it is going to be sunny! You should ignore this paper's predictions of rain. The paper could do a better job by printing every day "it will be sunny tomorrow" -- that is accurate 66% of the time!

I was once in a restaurant on Maui that had tomorrow's forecast painted on the wall; it said sunny in the morning, light winds, rain in the early evening on the windward side of the island. It was accurate every day I was there. Predictive models can be really crappy compared to just guessing that the typical behaviour is typical.

Question: why did I pick 60 as the number of representative days?

• This is a really nice way of looking at it that doesn't involve loads of fractions. Thanks! Oct 16, 2017 at 23:27
• @JeremiahCummings: You're welcome. I work with Bayesian probabilities for a living these days and I still go back to actually visualizing the populations involved to check my work. You might find this article I wrote a while back amusing. blogs.msdn.microsoft.com/ericlippert/2010/07/01/murky-research Oct 16, 2017 at 23:33
• @JeremiahCummings: Hah, I made the same mistake you did and swapped 3/5 for 2/5! We both should be more careful reading the question. I've updated the answer so that it is now correct. Oct 17, 2017 at 14:21

The online answer is right. The error on your work that stands out to me is that you used P as if it were the occasion of the paper being right, but no, it should be used as the occasion of the paper predicting that it will rain.

So, you correctly identified where the disagreement is!