4 ms·
The mathematical term for this is a "Laplacian urn" and the probability is governed by https://en.wikipedia.org/wiki/Rule_of_succession https://en.wikipedia.org
by sxp 3y ago
The mathematical term for this is a "Laplacian urn" and the probability is governed by https://en.wikipedia.org/wiki/Rule_of_succession https://en.wikipedia.org/wiki/Rule_of_succession
In this specific case, P(redOnKthSample) = (numberOfRedSamples + 1) / (totalNumberOfSamples + 2) = (1+1)/(1+2) = 66% red.
On the second draw, if the ball is green, then you get P(redOnThirdSample) = (1 + 1) / ( 2 + 2) = 50%
- andreimatei1 3y agoThis answer should go to the top.
- da39a3ee 3y agoExcept it doesn’t give much intuition for why?
- feoren 3y agoI find it hard to remember a ton of different rules, so I just count configurations, and I'm right on these problems basically every time. You count configurations by enumerating all possible combinations of unknowns, then "score" them by likelihood. The configuration's probability is its score divided by the total score. Then take the weighted sum of your test value, with the weights being the configuration probabilities. There are 101 configurations (the different values of N). We know our first ball was red. So N == 0 has a score of 0 (it's impossible since we found a red), N == 6 has a score of 6 (there are six different ways we could draw a red), N == 100 has a score of 100. The sum of all the scores is 5050, so the probability that N == 100 is 100/5050 = 1.98%. The value we're interested in is p(2nd ball == red). In the N == 100 configuration, that's 100%: it contributes 100% * 1.98% to the final "score". In the N == 6 configuration, that's 5/99 (we already drew one red), so it contributes 5/99 * 6/5050 to the final score. Add up the final scores and you get 66.67%. As long as you can feasibly enumerate all possible configurations and score them accurately, this approach basically never fails.