# Weather station brain teaser

I am living in a world where tomorrow will either rain or not rain. There are two independent weather stations (A,B) that can predict the chance of raining tomorrow with equal probability 3/5. They both say it will rain, what is the probability of it actually rain tomorrow?

My intuition is to look at the complementary, i.e. $$1-P(\text{not rain | A = rain and B = rain}) = \frac{21}{25}$$

However, using the same methodology, the chance of it not raining tomorrow is: $$1-P(\text{rain | A = rain and B = rain}) = \frac{16}{25}$$

Clearly they do not add up to 1!

Edit: corrected the probability to 3/5 ** Edit 2:

There seems to be a problem using this method. Say the probability of getting a right prediction is 1/2, so basically there is no predictability power. The using the original argument, the probability of raining is $1-\frac{1}{2}*\frac{1}{2} = \frac{3}{4}$ which is also non-sensical

-
So tomorrow will have a fifty-fifty chance to rain? – Shuhao Cao Apr 27 '13 at 20:04
Can you make the assumptions more precise? Are you assuming $A,B$ independant, $P(R|A)=P(R|B)=P(\neg R|\neg A)=P(\neg R|\neg B)=\frac35$ and beyond that nothing about $P(R),P(A),P(B)$ is known, and we are looking for $P(R|A,B)$? – Hagen von Eitzen Apr 28 '13 at 9:09
Yes I believe that is the assumption, the weather station has 3/5 probability of getting the weather correct tomorrow. The original question did not specify this. – tanvach Apr 30 '13 at 0:43

Firstly, I do not agree with comments which say that the assumption of independence is unreasonable. Of course if the weather stations were perfect, they would never be wrong and so of course they would be linked together by always giving the same correct prediction.

What is independent are the reasons for the stations being wrong 2/5th of the time. Suppose that each station's equipment actually predicts the weather perfectly, then at each station, a random integer is generated from 1 to 5, and if it is 1 or 2, the prediction is flipped.

Basically, the weather is a red herring here. You have here two agents that can answer a Yes/No question. They either lie or tell the truth. The probability is 3/5 that they tell the truth.

If you ask a question and they both give the same answer, what is the probability that they are telling the truth?

It doesn't matter whether both these agents say Yes or No, Just like it doesn't matter whether both weather stations predict rain or shine.

There are four possible outcomes: A and B both lie. A lies, B tells the truth. Vice versa. Or they both tell the truth.

The probability that one of them lies is 2/5, and so the probability that they both lie is just the product: 4/25. The probability that A lies and B does not lie is simply 2/5 times 3/5: 6/25, and the probability is the same for the reverse case: 6/25. Finally, the probability that they both tell the truth is 9/25. Note that the numerators had better add up to 25! And they do: 4 + 6 + 6 + 9 = 25.

So does that mean that if the weather stations agree, the probability is 9/25 that the weather prediction is true? No, it doesn't.

If the weather stations agree, they are telling you the same information! So how could the probability be lower? 9/25 is less than 3/5!

The trick here is that you don't know which way they agree: if they agree, you don't know whether they are both lying or both truthful. The only two pieces of information you can distinguish are: the answers are the same, or they differ. So we have to condense the four probabilities as follows:

The probabilities that they both lie (4/25) and that they both tell the truth (9/25) must be added together. That is to say, the probability is 13/25 that they give the same answer. And the probability that they differ is therefore 12/25.

Given that they have piped up with the same answer, the odds that they are telling the truth are 9/13, and that they are lying are 4/13.

The probability that they come up with the same answer is irrelevant: that is already a given which has happened, so its probability is 100%, so to speak.

9/13 is greater than 3/5, so having two unreliable stations is better than one, at least when they happen to agree. However, when they disagree, you might as well flip a coin to predict tomorrow's weather: one is saying rain, the other shine and there is no way to tell which is wrong.

Here is a helpful diagram. Dark area: both tell the truth. White area, they both tell a white lie. The other areas are irrelevant. In the relevant areas, there are 13 squares.

We can also run simple simulation of this. Lisp source code:

;; 3/5 probability
(defun tell-truth ()
(< (random 5) 3))

(defun monte-carlo ()
(loop repeat 1000000
for a = (tell-truth)
for b = (tell-truth)
with same-count = 0
with truth-count = 0
when (eq a b) do    ;; count whenever A and B give the same answer
(incf same-count)
when (and a (eq a b)) do ;; count whenever A tells truth and B agrees
(incf truth-count)
finally (return (/ truth-count same-count 1.0))))


Interactive results:

;; Loading file weather.lisp ...
[1]> (monte-carlo)
0.69255465
[2]> (monte-carlo)
0.6924692
[3]> (monte-carlo)
0.691567
[4]> (monte-carlo)
0.6913452


The decimal value of 9/13 is approximately 0.6923077.

-
Thanks for a great explanation. I'm going to digest the argument though this seems correct. – tanvach May 3 '13 at 17:07
I'm adding a simple Monte Carlo simulation to verify the result. – Kaz May 3 '13 at 20:33
At first I thought this was a nice explanation, then I tried to expand $P(\text{rain | A = rain and B = rain})$ and I couldn't get rid of the $P(\text{rain})$ factor. Then I thought: what if $P(\text{rain}) = 0$? Even if $A = rain and B = rain$, it won't rain! And the probability cannot be 9/13. I wonder if there is no fallacy in the idea that the whether is a simple yes/no question: a question has an answer that is fixed BEFORE your agents answer while the weather remains random after predictions are done. – Didier L May 4 '13 at 1:00
In fact, to make it even more simple : knowing that station A said it will rain, what is the probability that it will be the case? You cannot know. The same applies for disease tests : quite often the number of false positives is larger than the number of true positives since only a very small percentage of the population is infected – Didier L May 4 '13 at 1:42
If station A says that it will rain and we know that the probability is 3/5 that station A's report is reliable, then the probability that it will rain is 3/5. It doesn't matter whether this is a "Yes" answer to "Will it rain?" or whether it is a spontaneously generated weather report. – Kaz May 4 '13 at 1:50

The assumption of independence is very unreasonable, so if we make it we are not talking about real weather. But as long as we remember this is just a puzzle, we can go on.

Edit: (The next sentence is no longer relevant, previously it said probability $2/3$, probably because of the language of odds.) In your calculation, there is no $2/3$ probability anywhere.

You are assuming that if the first weather station says it will rain, then with probability $3/5$ it will rain. So if both predict rain, the probability both are wrong is $(2/5)^2$. This gives the $1-(2/5)^2$ of the first calculation.

The second calculation is not correct, for the probability it will rain, given the predictions, is the probability that at least one station is right.

-
You are right regarding the probability of raining, that is now corrected. – tanvach Apr 27 '13 at 20:41
Final exponent 2, not 3 ? – DJohnM Apr 27 '13 at 20:51
@User58220: Yes, thanks for the typo mention. – André Nicolas Apr 27 '13 at 20:53
The last probability is actually P(not rain | A = not rain and B = not rain), so that is why they dont add up to one. However, I am still stumped about not using complementary, i.e. adding up the probability combinations. When I do that, there will be a term that says P(not rain|A=rain)*P(rain|B = rain), which is, I think, nonsensical. – tanvach Apr 27 '13 at 21:33
Puzzles about conditional probability can usually be resolved if we write $\frac{\Pr(A\cap B)}{\Pr(B)}$ in place of $\Pr(A|B)$. – André Nicolas Apr 27 '13 at 21:39

After a couple months of thinking, a friend of mine have pointed out that the question lacks one piece of information: the unconditional probability distribution of rain $P(rain)$. The logic is that, if one is to live in an area that is certain to rain everyday, the probability of raining is always 1. Then Kaz's analysis will give the wrong answer (9/13). In fact, the probability of correctly predicting the rain should be:

$$\frac{P(rain)(3/5)^2}{P(rain)(3/5)^2+(1-P(rain))(2/5)^2}$$

Kaz's answer is correct if the probability distribution of raining is uniform. Cheers.

-