You have a jar that is filled with a hundred marbles, each of them either black or white, but you have no idea how many of each color there are. However, you have been told that all possible quantities of white marbles (from 0 to 100, both inclusive) are equally probable.
You randomly select 100 marbles from the jar one at a time, with replacement, and they are all white. What is the probability that the jar contains only white marbles?
The probability that all the marbles in the jar are white, given that all the marbles selected were white, is equal to the a priori probability that all the marbles in the jar would be white and (in this case, of course) that all the drawn marbles would be white, divided by the a priori probability overall that all the drawn marbles would be white.
The numerator is therefore 1/101, as that is the a priori probability that the allwhite jar would be chosen and all the drawn marbles would be white by that reason.
The denominator is the sum of the probabilities of drawing out all white marbles, over all the 1/101probable sets of contents of the jars.
If there are i white marbles out of 100, the probability of drawing out all white ones is (i/100)^100.
The following program evaluates the denominator as 0.01556549, and thus the conditional probability as 0.63608617, or 63.608617 %.
FOR i = 0 TO 100
t = t + (i / 100) ^ 100 / 101
NEXT
PRINT USING "#.########"; t
PRINT USING "#.########"; (1 / 101) / t

Posted by Charlie
on 20060518 13:36:43 