Question 1196709: If you have a jar full of 400 marbles, with 4 colors distributed equally, how many marbles must you pick randomly to have > 90% chance of having at least one of each color?
Answer by math_helper(2461) (Show Source):
You can put this solution on YOUR website!
I don't see an easy path to computing the probability, but shown below is some information that may help another tutor figure it out(?)
I did a simulation using C code and used a true random number generator.
Here are the average number of selections needed to get one of each color for several runs of the simulation. Each run represents 100000 trials, where a single trial ends when at least one of each color has been selected:
1st run: 8.333
2nd run: 8.324
3rd run: 8.341
4th run: 8.337
-------
Added code to capture the distribution of picks. Here is a 5th run with the distribution shown (46 is the max number of picks for this run):
(Based on this emperical data, it seems 13 picks gives 90% confidence.)
Average number of selections: 8.351
Number of selections required, distribution:
0 0
1 0
2 0
3 0
4 9372
5 13912
6 14668
7 13126
8 11144
9 8773
10 6969
11 5327
12 4082
13 3102
14 2412
15 1703
16 1346
17 971
18 747
19 572
20 445
21 311
22 252
23 192
24 151
25 110
26 83
27 62
28 34
29 26
30 27
31 25
32 15
33 11
34 12
35 6
36 1
37 1
38 1
39 2
40 1
41 3
42 0
43 0
44 2
45 0
46 1
47 0
48 0
49 0
50 0
... all zero through index [99] (and none greater than 99 either)
|
|
|