wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> weather forecast
(Message started by: antkor on Dec 2nd, 2013, 12:00pm)

Title: weather forecast
Post by antkor on Dec 2nd, 2013, 12:00pm
Two independent sources predict the weather for tomorrow in your area. Historically, source A who has been accurate in exactly 4/5 of the cases predicts a sunny day, whereas source B who has been accurate in exactly 8/9 of the cases predicts rain.
Without any further information, which is the probability it will rain in your area tomorrow?

Title: Re: weather forecast
Post by towr on Dec 2nd, 2013, 1:03pm
[hide]In cases where they don't agree, B is right with probability [ 8/9 * (1-4/5) ] / [ 8/9 * (1-4/5)  +  (1-8/9) * 4/5] = 2/3 [/hide]

Title: Re: weather forecast
Post by jollytall on Dec 4th, 2013, 1:44pm
I always imagine this as an n dimension cube. Here we have 2 sources, so it is only a square.
4/5 times 8/9 both are right. 1/5 times 1/9 both are wrong. Here obviously none is the case.
A right and B wrong is 4/5 times 1/9=4/45.
A wrong and B right is 1/5 times 8/9=8/45.
So here B's forecast is 2 times more likely to be true, i.e. the probability is 2/3.

Title: Re: weather forecast
Post by Grimbal on Dec 5th, 2013, 12:43am
We are missing one crucial information: the à priori probability of rain.

It is possible that it never rains, and A and B fail to predict no rain with probabiliyt 1/5 resp. 1/9.  In that case, whatever they say, there will be no rain.

Similarily, in a region where it always rains, then it will rain regardless of A and B's prediction.

So, by changing the assumptions about the à priori distribution, you can make the probability of rain whatever you like.

It should also be specified whether A's and B's predictions are independent.  For instance, if A just copies B's prediction but sometimes fails to get the information in time, then of course, only B's prediction matters.

Edit: changed "sun" to "no rain".

Title: Re: weather forecast
Post by rmsgrey on Dec 5th, 2013, 6:33am
It depends on whether the historical cases in question are cases of like predictions, or of all predictions.

If A's been accurate 4/5 when predicting a sunny day, and B's been accurate 8/9 when predicting rain, then it doesn't matter what the a priori probability of rain is - only the independence of A's and B's predictions (the question does describe A and B as independent, which suggests that their predictions are independent of each other (but not the weather)).

Otherwise, you need the condition that the accuracy is independent of the forecast made to be able to neglect the a priori chance of rain.

If you don't assume that independence, the question then becomes one of what your default prior is for a situation where you have no data (and two known potential outcomes).

Title: Re: weather forecast
Post by Grimbal on Dec 12th, 2013, 2:49pm
I don't feel the success score for like predictions is more legitimate than success for like weather conditions.

Anf if it is the case, you could also go one step further and consider the like condition "A predicts no rain AND B predicts rain".  Except that you'll find out that A and B cannot be both right more than 1/2 of the time.

But let's take as a given that the probabilities 4/5 and 8/9 are the probability of success after a certain prediction.
  P(rain | A predicts rain) = P(no rain | A predicts no rain) = 4/5.

The next problem is what does "independent sources" mean?  You seem to use
 P(rain | A predicts no rain and B predicts rain) = P(rain | A predicts no rain) · P(rain | B predicts rain)
but that is the wrong way.  Independence says
 P(A predicts no rain and B predicts rain | rain) = P(A predicts no rain | rain) · P(B predicts rain | rain)


This being said, here is my answer to this problem:

We are interested in 6 events:
  R+ : there is rain, R- : there is no rain.
  A+ : A predicts rain, A- : A predicts no rain
  B+ : B predicts rain, B- : B predicts no rain

Let's define the probabilities:
  P(R+) = r
  P(A+ | R+) = p
  P(B+ | R+) = q
  P(A- | R-) = s
  P(B- | R-) = t

The success rate of 4/5 for A means:
  4/5 = P(R+ | A+) = P(R+ A+) / P(A+) = P(R+ A+) / (P(R+ A+) + P(R- A+))
This translates to
  pr/(pr + s(1-r)) = 4/5  and can be simplified to  pr = 4s(1-r)
similarly
  s(1-r)/(s(1-r)+(1-p)r) = 4/5, which simplifies to s(1-r) = 4(1-p)r
For B, the success rate of 8/9 means:
  qr = 8(1-t)(1-r)
  t(1-r) = 8(1-q)r

Let's compute
 P(R+ A- B+) = r(1-p)q
 P(R- A- B+) = (1-r)s(1-t)

We had  s(1-r) = 4(1-p)r  and  qr = 8(1-t)(1-r)

P(R+ A- B+) = r(1-p)q
  = (1-p) qr = (1-p) 8(1-t)(1-r)
  = 2(1-r)/r 4(1-p)r (1-t) = 2(1-r)/r s(1-r) (1-t)
  = 2(1-r)/r P(R- A- B+)
this gives:
  P(R- A- B+)/P(R+ A- B+) = r/(2(1-r))

Now you can compute the probability of rain when A predicts no rain and B predicts rain:
  P(R+ | A- B+) = P(R+ A- B+) / (P(R+ A- B+) + P(R- A- B+))
  1 / P(R+ | A- B+) = 1 + P(R- A- B+)/P(R+ A- B+)
  = 1 + r/(2(1-r)) = (2-r)/(2-2r)

And you get your result:
  P(R+ | A- B+) = (2-2r)/(2-r)

I was amazed to discover that for the value r=0.5 it indeed gives a probability of 2/3 for rain.  But as I said earlier, it changes for other prior probabilities.


PS: the equations resolve for a given r to
  p = (20r-4)/(15r) = 4/15*(5r-1)/r
  s = (16-20r)/(15(1-r)) = 4/15*(4-5r)/(1-r)
  q = (72r-8)/(63r) = 8/63*(9r-1)/r
  t = (64-72r)/(63(1-r)) = 8/63*(8-9r)/(1-r)

Edit: changed "sun" to "no rain".

Title: Re: weather forecast
Post by rmsgrey on Dec 13th, 2013, 6:39am
I think you meant pr=4(1-s)(1-r)


Using your figures, I get constraints: 1/5<=r<=4/5 (the range over which A can be wrong 1/5 of the time for a specific prediction)

and a final answer ranging from 1/3 to 8/9

Counterintuitively, the more likely it is to rain in general, the less likely it is to rain under these specific circumstances.

Title: Re: weather forecast
Post by EdwardSmith on Jul 16th, 2014, 1:15pm
This question seem to me to be pretty simple.

We can assume 1 thing.
As both answers contradict each other, 1 person is wrong.
So all combinations of both being right or both being wrong can be ignored.

In every 45 estimations A will be wrong 9 times and B will be wrong 5 times.
Therefore the chance of rain is 9/14.

Title: Re: weather forecast
Post by dudiobugtron on Jul 16th, 2014, 7:21pm
I argue that, so far, everyone has interpreted the question incorrectly:

[hide]A predicts a sunny day - not that it won't rain.  There are many different whether possibilities, so 'sunny day' isn't the opposite of rain that everyone has been assuming it is - for example, it could be neither sunny nor raining.  In particular, it could be a sunny day and also rain.  So, I assert that A is not making a prediction about whether it will rain.

Also, the question asks "Without any further information, which is the probability it will rain in your area tomorrow?"
I assert that therefore it's not asking for us to work out the probability; merely to decide which probability (A's or B's) to use.

Combining these two intepretations, it is obvious that B's probability of 8/9ths is the best one to use, since B is the only one whose prediction is about whether it will rain.  So, without any further information, the probability it will rain tomorrow is actually 8/9.[/hide]

Title: Re: weather forecast
Post by rmsgrey on Jul 17th, 2014, 6:03am

on 07/16/14 at 13:15:45, EdwardSmith wrote:
This question seem to me to be pretty simple.

We can assume 1 thing.
As both answers contradict each other, 1 person is wrong.
So all combinations of both being right or both being wrong can be ignored.

In every 45 estimations A will be wrong 9 times and B will be wrong 5 times.
Therefore the chance of rain is 9/14.

If you actually break down those 45 estimations further, you get:

A and B are both right 32 times
A is wrong; B is right 8 times
A is right; B is wrong 4 times
A and B are both wrong 1 time

Of the twelve times they disagree, B is right twice as often, giving a 2/3 chance of rain.

Title: Re: weather forecast
Post by Grimbal on Jul 17th, 2014, 9:07am
I disagree with this kind of shortcut.

You are comparing a case where there there is rain and A is wrong with a case where there is no rain and B is wrong.  It is not comparable unless you assume no rain and rain are equally probable to begin with.
You also have to assume that A and B's success rates apply independently to each case, rain or not, and not globally.

And, well, how can A and B be independent sources if they watch the same weather?

Edit: changed "sun" to "no rain".

Title: Re: weather forecast
Post by towr on Jul 17th, 2014, 9:56am
Sunny and rainy aren't mutually exclusive states anyway.
I've been rained on in full sunshine.

Title: Re: weather forecast
Post by Grimbal on Jul 18th, 2014, 1:37am
And there can be rain at night.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board