An urn contains 6 green balls and an unknown number, which is ≤ 6, of blue balls. Three balls are drawn successively at random, and not replaced and are all found to be blue.
Determine the probability that a green ball will be drawn at the next draw.
Assuming that the a priori probability distribution of the blue balls was uniform, with equal probability for any number, this is a case for Bayesian analysis.
If F is the event that the fourth one would be blue and T the event that the first three were blue:
P(FT) = P(T&F) / P(T)
The observed case involves only situations where at least 3 blue balls were in the urn when the drawing started. The conditional probabilities, based on the number of blue balls originally are:
blue balls P(T&F) P(T)
3 0 3*2*1/(9*8*7)
4 4*3*2*1/(10*9*8*7) 4*3*2/(10*9*8)
5 5*4*3*2/(11*10*9*8) 5*4*3/(11*10*9)
6 6*5*4*3/(12*11*10*9) 6*5*4/(12*11*10)
(0+4*3*2*1/(10*9*8*7)+5*4*3*2/(11*10*9*8)+ 6*5*4*3/(12*11*10*9))/4 comes out to 29/2310 and (3*2*1/(9*8*7)+4*3*2/(10*9*8)+5*4*3/(11*10*9)+6*5*4/(12*11*10))/4 comes out to 303/6160. The ratio of those two fractions is 232/909 for the probability that the next ball will be blue, or the repeating decimal 0.2552255225522552255.... The complement of this is the probability that the next ball will be green, or 677/909 = 0.74477447744... .
Note that even if we considered cases with fewer blue balls at the beginning, we'd just be adding zero to each numerator, for P(F&T) and P(T), and the denominators would change in proportion, so the ratio of the two probability fractions would remain the same.
Computer verification:
FOR tr = 1 TO 10000000
bb = INT(RND(1) * 6) + 1
bbSave = bb
tb = 6 + bb
good = 1
FOR i = 1 TO 3
r = INT(RND(1) * tb) + 1
IF r > bb THEN good = 0: EXIT FOR
bb = bb  1: tb = tb  1
NEXT
IF good THEN
trCt = trCt + 1
r = INT(RND(1) * tb) + 1
IF r <= bb THEN hit = hit + 1
PRINT hit; trCt, hit / trCt
END IF
NEXT tr
produced as the last line:
83792 327884 .2555538
meaning that in 10 million overall trials, the 3blue scenario happened 327,884 times, of which the fourthblue happened 83,792 times, for an observed conditional probability of .2555538.
Edited on May 19, 2010, 1:40 pm
Edited on May 19, 2010, 1:43 pm

Posted by Charlie
on 20100519 13:29:27 