Originally posted by: Muse
No, it's easier if you figure there's an infinite number of beans. It's doable either way, though. If infinite, you only have to consider the chance of each bean as you select it being the same flavor as one of the previous ones and readjust your odds until you get to the point where you've probably had a duplicate. Every time you pick a bean it has to be one of the 49 possible flavors.
No, you don't put any beans back in the vat. You eat it! Wasn't I clear on that?
I actually think it's something like this:
48/49 chance on the second bean that it isn't a duplicate.
On 3rd bean, the chance that you haven't a duplicate is 48x47/49x49 =.94
On 4th bean, it's 46x47x48/49x49x49 = .88
and so forth until
On 8th bean it's 0.5482
On the 9th bean it's 0.458
So, you have probably eaten at least two beans of the same flavor when you eat your 9th bean.
BTW, I love Jelly Belly's.
tsk tsk. Order of operations. But, I assumed you meant there should be parentheses in there
You meant
(48x47)/(49x49), right?
You used the best approach - using the complement of the probability...
As it didn't appear everyone understood your approach...
For anyone trying to work it the other way, from the matching end of things, then you'd have a lot of probabilities to add up: Just for 9 jellybeans, you'd need to add in the probability that 3 of them were the same, 4 of them were the same, that there were 2 pairs, etc. It'd be a pita that way.
So, instead, you calculated the probability that NONE match.
with 2 jellybeans, the probability that the second doesn't match the 1st is, as you said,
48/49 don't match. (and the complement, 1/49 is the probability that they match)
With 3 jellybeans, the probability of the second one not matching the first one is 48/49. The probability that the 3rd doesn't match the first 2 is 47/49. IF the assumption of a huuuuuge amount of jellybeans hadn't been made, then the 47/49 would be affected slightly (as would the 48/49) And, as we've all been taught, the probability of 2 independent events both happening is the product of the probabilities of each event happening, so, (48/49)*(47/49)
Now, grab a 4th jellybean. The probability that it's color doesn't match the first 3 is 46/49. So, the probability of picking 4 without a match is (48/49) * (47/49) * (46/49). However, the complement of this probability *isn't* the probability that exactly two match. It's the probability that at least 2 match - which is why your way is much easier than calculating all the possibilities for a match.
So, the probability of selecting 9 jellybeans w/o a match is
48/49*47/49*46/49*45/49*44/49*43/49*42/49*41/49 = (as you said) .457820336
Note: *I* don't need parenthesis when writing the calculation that way
The complement of that gives a 54% probability *of at least 1 pair* (could be 3 of a kind, or 4 of a kind, or 2 pairs, or 3 pairs, or 2 pairs and 3 of a kind, or...)
NOW, using your bag of jellybeans, 1.814 kg and about 35 jellybeans = 40 grams, I'll see how it works out...
1814 grams times 35jb/40gram = approximately 1587 jellybeans
divided by 49 = 32.4 of each color... I'll round off since you said the same amount of jellybeans per color Someone else can handle the random distribution of 49 flavors of jellybeans over 1587 jellybeans...
32 of each jellybean... So, we'll assume 1568 jellybeans
Probability that the 2nd picked doesn't match the first is
(there are 31 matching (one of that color was already picked), 1567 remaining)
1536/1567 (which is approximately 48/49 for comparison's sake)
probability that the 3rd doesn't match the first two (there are 62matching out of 1566 remaining - 1504 don't match)
1504/1566
probability that the 4th doesn't match the first two (there are 93 matching out of 1565 remaining, thus 1472 don't match out of the remaining 1565 jellybeans)
1472/1567
The probability of picking 9 in a row without a match is
1536/1567 * 1504/1566 * 1472/1565 *. . .* 1312/1560
= .468
So, there's a 53.15% probability that at least 2 will match after 9 jellybeans starting with the bag you purchased. The assumption made the math easier, but the result was the same.
(incidentally, the probability after 8 was about 45%)
----how's that for being bored?!