Thread Rating:
I know how to calculate the odds for matches per draw using a COMBIN function for keno but how do I figure out how many draws I would need to conduct to draw all 80 numbers, assuming the numbers go back in the hopper and subsequent drawings could (likely will) have duplicates?
I assume its a 1/80 for each number but i can't wrap my head around the duplicates in different drawings and how many drawings I would need to draw every # at least once.
thanks!
It's not an easy problem until you've done many similar ones, and I calculated it using an absorbing Markov matrix.
Also, for calculating keno probabilities, I recommend using the hypergeometric distribution function. It's much easier than using Combin once you know how to use it.
For the odds i'm using =1/(COMBIN(E4,C4)*COMBIN(A4-E4,E4-C4)/COMBIN(A4,E4)) where E4 is the number of balls drawn, C4 is the number of correct picks and A4 is the number of balls in the hopper.
I'll take a gander at the Hypergeo as well - thanks again for the help!
Quote: CrystalMathAssuming you draw 20 numbers each game, then they go back in the hopper, I calculate it will take 17.8604 games on average to hit all 80 numbers.
It's not an easy problem until you've done many similar ones, and I calculated it using an absorbing Markov matrix.
Also, for calculating keno probabilities, I recommend using the hypergeometric distribution function. It's much easier than using Combin once you know how to use it.
Hypgeomdist? Or something like that. Yup, once I figured how it worked, it was like holy sh** bbq 1337ness. Ah, I haven’t messed around with Excel in a while, good times.
I agreeQuote: CrystalMathAssuming you draw 20 numbers each game, then they go back in the hopper, I calculate it will take 17.8604 games on average to hit all 80 numbers.
I set this up in Excell too
used just combin() as I wanted to do it different from you (your method is easier to populate the transition matrix)
me too. using a Markov chain approach and making an absorbing transition matrixQuote: CrystalMathIt's not an easy problem until you've done many similar ones, and I calculated it using an absorbing Markov matrix.
here is my Excel in Google
https://goo.gl/HDYz1j
BruceZ did some R code for these type of coupon collector problems
where you choose more than 1 coupon at a time
It has some small errors in it as choose(a,b) returns very small numbers without using a more accurate method.
the sumproduct still works for the average too.
average
17.86042226
median
17
mode
16
here is the distribution also
draw X | by X | on X | 1 in |
---|---|---|---|
1 | 0 | 0 | . |
2 | 0 | 0 | . |
3 | 0 | 0 | . |
4 | 1.31E-29 | 1.30772E-29 | 76,468,711,070,730,500,000,000,000,000.00 |
5 | 1.25E-15 | 1.2547E-15 | 797,000,608,031,493.00 |
6 | 3.57E-10 | 3.56594E-10 | 2,804,312,648.77 |
7 | 4.37E-07 | 4.36381E-07 | 2,291,577.58 |
8 | 3.79E-05 | 3.74718E-05 | 26,686.70 |
9 | 0.000729921 | 0.000692013 | 1,445.06 |
10 | 0.005540174 | 0.004810253 | 207.89 |
11 | 0.022938371305 | 0.017398197 | 57.48 |
12 | 0.063113946401 | 0.040175575 | 24.89 |
13 | 0.130914208573 | 0.067800262 | 14.75 |
14 | 0.222554893148 | 0.091640685 | 10.91 |
15 | 0.328232143888 | 0.105677251 | 9.46 |
16 | 0.436906493373 | 0.108674349 | 9.20 |
17 | 0.539741074697 | 0.102834581 | 9.72 |
18 | 0.631312407024 | 0.091571332 | 10.92 |
19 | 0.709298326546 | 0.07798592 | 12.82 |
20 | 0.773569167179 | 0.064270841 | 15.56 |
21 | 0.825268059849 | 0.051698893 | 19.34 |
22 | 0.866114412236 | 0.040846352 | 24.48 |
23 | 0.897959623778 | 0.031845212 | 31.40 |
24 | 0.922542977323 | 0.024583354 | 40.68 |
25 | 0.941381427061 | 0.01883845 | 53.08 |
26 | 0.955738723643 | 0.014357297 | 69.65 |
27 | 0.966636302688 | 0.010897579 | 91.76 |
28 | 0.974882773303 | 0.008246471 | 121.26 |
29 | 0.981108965529 | 0.006226192 | 160.61 |
30 | 0.985801886227 | 0.004692921 | 213.09 |
31 | 0.989334665285 | 0.003532779 | 283.06 |
32 | 0.991991602010 | 0.002656937 | 376.37 |
33 | 0.993988431694 | 0.00199683 | 500.79 |
34 | 0.995488369368 | 0.001499938 | 666.69 |
35 | 0.996614621086 | 0.001126252 | 887.90 |
36 | 0.997460037820 | 0.000845417 | 1,182.85 |
37 | 0.998094508380 | 0.000634471 | 1,576.12 |
38 | 0.998570589948 | 0.000476082 | 2,100.48 |
39 | 0.998927779242 | 0.000357189 | 2,799.64 |
40 | 0.999195742994 | 0.000267964 | 3,731.85 |
41 | 0.999396756024 | 0.000201013 | 4,974.80 |
42 | 0.999547538325 | 0.000150782 | 6,632.08 |
43 | 0.999660637671 | 0.000113099 | 8,841.78 |
44 | 0.999745469250 | 8.48316E-05 | 11,788.06 |
45 | 0.999809096894 | 6.36276E-05 | 15,716.44 |
46 | 0.999856819846 | 4.7723E-05 | 20,954.28 |
47 | 0.999892613302 | 3.57935E-05 | 27,938.07 |
48 | 0.999919459090 | 2.68458E-05 | 37,249.79 |
49 | 0.999939593821 | 2.01347E-05 | 49,665.43 |
50 | 0.999954695088 | 1.51013E-05 | 66,219.61 |
51 | 0.999966021160 | 1.13261E-05 | 88,291.86 |
52 | 0.999974515783 | 8.49462E-06 | 117,721.53 |
53 | 0.999980886788 | 6.37101E-06 | 156,961.11 |
54 | 0.999985665064 | 4.77828E-06 | 209,280.50 |
55 | 0.999989248783 | 3.58372E-06 | 279,039.73 |
56 | 0.999991936578 | 2.6878E-06 | 372,052.18 |
57 | 0.999993952429 | 2.01585E-06 | 496,068.41 |
58 | 0.999995464319 | 1.51189E-06 | 661,423.78 |
59 | 0.999996598238 | 1.13392E-06 | 881,897.21 |
60 | 0.999997448677 | 8.50439E-07 | 1,175,863.29 |
61 | 0.999998086508 | 6.37831E-07 | 1,567,813.42 |
62 | 0.999998564880 | 4.78372E-07 | 2,090,423.35 |
63 | 0.999998923660 | 3.5878E-07 | 2,787,223.37 |
64 | 0.999999192745 | 2.69085E-07 | 3,716,297.82 |
65 | 0.999999394559 | 2.01814E-07 | 4,955,057.63 |
66 | 0.999999545919 | 1.5136E-07 | 6,606,765.33 |
67 | 0.999999659439 | 1.1352E-07 | 8,809,020.43 |
68 | 0.999999744579 | 8.514E-08 | 11,745,360.59 |
69 | 0.999999808435 | 6.3856E-08 | 15,660,235.52 |
70 | 0.999999856326 | 4.7891E-08 | 20,880,750.06 |
71 | 0.999999892244 | 3.5918E-08 | 27,841,193.82 |
72 | 0.999999919183 | 2.6939E-08 | 37,120,902.74 |
73 | 0.999999939387 | 2.0204E-08 | 49,495,149.41 |
74 | 0.999999954541 | 1.5154E-08 | 65,989,178.02 |
75 | 0.999999965905 | 1.1364E-08 | 87,997,184.37 |
76 | 0.999999974429 | 8.524E-09 | 117,315,813.33 |
77 | 0.999999980822 | 6.393E-09 | 156,421,085.12 |
78 | 0.999999985616 | 4.794E-09 | 208,594,077.03 |
79 | 0.999999989212 | 3.596E-09 | 278,086,767.54 |
80 | 0.999999991909 | 2.697E-09 | 370,782,341.45 |
81 | 0.999999993932 | 2.023E-09 | 494,315,375.71 |
82 | 0.999999995449 | 1.517E-09 | 659,195,794.15 |
83 | 0.999999996587 | 1.138E-09 | 878,734,600.87 |
84 | 0.999999997440 | 8.53E-10 | 1,172,332,937.11 |
85 | 0.999999998080 | 6.4E-10 | 1,562,500,141.77 |
86 | 0.999999998560 | 4.8E-10 | 2,083,333,160.96 |
87 | 0.999999998920 | 3.6E-10 | 2,777,777,547.94 |
88 | 0.999999999190 | 2.7E-10 | 3,703,703,397.26 |
89 | 0.999999999393 | 2.03E-10 | 4,926,109,583.27 |
90 | 0.999999999544 | 1.51E-10 | 6,622,516,982.18 |
91 | 0.999999999658 | 1.14E-10 | 8,771,927,390.21 |
92 | 0.999999999744 | 8.6E-11 | 11,627,909,016.87 |
93 | 0.999999999808 | 6.4E-11 | 15,624,993,286.17 |
94 | 0.999999999856 | 4.79999E-11 | 20,833,360,521.67 |
95 | 0.999999999892 | 3.6E-11 | 27,777,792,612.51 |
96 | 0.999999999919 | 2.70001E-11 | 37,036,942,596.44 |
97 | 0.999999999939 | 2E-11 | 49,999,995,862.98 |
98 | 0.999999999954 | 1.5E-11 | 66,666,661,150.64 |
99 | 0.999999999966 | 1.2E-11 | 83,333,634,834.68 |
100 | 0.999999999977 | 1.1E-11 | 90,909,266,895.52 |
R code used (I corrected the -values in Excel)
Tmax = 100
Ncoupons = 80
r = 20
require(Rmpfr)
prob = rep(0,Tmax)
for (T in ceiling(Ncoupons/r):Tmax) {
k = 0:Ncoupons
prob[T] = as.double(sum((-1)^k*choose(Ncoupons,k)*(chooseZ(Ncoupons - k,r)/chooseZ(Ncoupons,r))^T))
}
#prob
prob = as.matrix(prob)
#rownames(prob) = paste("t=",T," ",sep="")
colnames(prob) = "Probability"
cat("\n")
print(formatC(prob, digits=12),quote=FALSE)
this would be a fun project to convert the transition matrix in Excel into R
Sally
I was looking to see how many times I would have to pick 10 numbers from 99 before i would get all 99 (assuming the 10 go back into the pool after each set of picks).
The more interesting and equally difficult issue is if I have a card with all 99 numbers and i pick 10 at a time - how many draws would I expect to conduct before I got a match for all the numbers on my card - with duplication?
Is it the same as just drawing the numbers or is matching them per drawing another layer?
Doing the hypergeo on the odds (99 choices with 10 chosen) it is a 1 in 2 that i would match 1 number out of ten drawn from 99. So does that mean I could expect to match all 99 after 198 drawings? I'm thinking I have to account for the duplicates and I am not....
Thanks!
Markov chains are difficult at first to understand.Quote: AlexDinNYCSally thank you so much for the excel and the explanation. Most of this is way over my head lol
The R code is easier to many as it is just the sum of many calculations (called inclusion exclusion)
of course, when a computer calculates for you(or an online program)
the R code that has small -values where the values should be small positive numbers.
I have to look into that
this is the coupon collecting problem with 99 coupons and select 10 at a time without replacement for each selection.Quote: AlexDinNYCI was looking to see how many times I would have to pick 10 numbers from 99 before i would get all 99 (assuming the 10 go back into the pool after each set of picks).
Then all 99 are available for next draw.
on average I get using the R codeQuote: AlexDinNYCThe more interesting and equally difficult issue is if I have a card with all 99 numbers and i pick 10 at a time - how many draws would I expect to conduct before I got a match for all the numbers on my card - with duplication?
about 49.3 draws on average
here is the distribution
10 thru 16 are very small values (I made at 0) just for the average calculation (sumproduct)
draw X | by X | on X |
---|---|---|
1 | 0 | 0 |
2 | 0 | 0 |
3 | 0 | 0 |
4 | 0 | 0 |
5 | 0 | 0 |
6 | 0 | 0 |
7 | 0 | 0 |
8 | 0 | 0 |
9 | 0 | 0 |
10 | 0.00E+00 | 0 |
11 | 0.00E+00 | 0 |
12 | 0.00E+00 | 0 |
13 | 0.00E+00 | 0 |
14 | 0.00E+00 | 0 |
15 | 0.00E+00 | 0 |
16 | 0.00E+00 | 0 |
17 | 8.99E-11 | 8.99187E-11 |
18 | 2.07E-09 | 1.9811E-09 |
19 | 2.71E-08 | 2.5013E-08 |
20 | 2.41E-07 | 2.13718E-07 |
21 | 1.56E-06 | 1.32202E-06 |
22 | 7.82E-06 | 6.25549E-06 |
23 | 3.15E-05 | 2.36523E-05 |
24 | 0.000105487 | 7.40166E-05 |
25 | 0.000302747 | 0.00019726 |
26 | 0.000761109 | 0.000458362 |
27 | 0.001707986 | 0.000946876 |
28 | 0.003475491 | 0.001767505 |
29 | 0.006497893 | 0.003022402 |
30 | 0.011287441 | 0.004789548 |
31 | 0.018390765 | 0.007103324 |
32 | 0.028333496 | 0.009942731 |
33 | 0.041563518 | 0.013230022 |
34 | 0.058402884 | 0.016839366 |
35 | 0.07901558 | 0.020612696 |
36 | 0.103394334 | 0.024378754 |
37 | 0.131365846 | 0.027971512 |
38 | 0.162611023 | 0.031245177 |
39 | 0.196695323 | 0.0340843 |
40 | 0.23310406 | 0.036408737 |
41 | 0.271278145 | 0.038174085 |
42 | 0.310646842 | 0.039368697 |
43 | 0.350655358 | 0.040008515 |
44 | 0.390786209 | 0.040130851 |
45 | 0.43057423 | 0.039788021 |
46 | 0.469615683 | 0.039041454 |
47 | 0.507572346 | 0.037956662 |
48 | 0.544171569 | 0.036599223 |
49 | 0.579203358 | 0.03503179 |
50 | 0.612515405 | 0.033312046 |
51 | 0.644006875 | 0.03149147 |
52 | 0.673621611 | 0.029614736 |
53 | 0.701341228 | 0.027719617 |
54 | 0.727178455 | 0.025837227 |
55 | 0.75117096 | 0.023992504 |
56 | 0.773375781 | 0.022204821 |
57 | 0.793864449 | 0.020488669 |
58 | 0.812718791 | 0.018854341 |
59 | 0.830027396 | 0.017308605 |
60 | 0.84588271 | 0.015855314 |
61 | 0.860378677 | 0.014495967 |
62 | 0.873608873 | 0.013230196 |
63 | 0.885665067 | 0.012056193 |
64 | 0.896636132 | 0.010971066 |
65 | 0.906607269 | 0.009971136 |
66 | 0.915659461 | 0.009052193 |
67 | 0.923869145 | 0.008209683 |
68 | 0.931308024 | 0.007438879 |
69 | 0.93804302 | 0.006734996 |
70 | 0.944136313 | 0.006093294 |
71 | 0.949645458 | 0.005509144 |
72 | 0.954623545 | 0.004978088 |
73 | 0.959119411 | 0.004495866 |
74 | 0.963177858 | 0.004058447 |
75 | 0.966839898 | 0.00366204 |
76 | 0.970142999 | 0.0033031 |
77 | 0.973121329 | 0.00297833 |
78 | 0.975806001 | 0.002684673 |
79 | 0.978225308 | 0.002419307 |
80 | 0.980404942 | 0.002179635 |
81 | 0.982368215 | 0.001963273 |
82 | 0.984136252 | 0.001768037 |
83 | 0.985728187 | 0.001591934 |
84 | 0.987161329 | 0.001433143 |
85 | 0.988451334 | 0.001290005 |
86 | 0.989612349 | 0.001161014 |
87 | 0.990657149 | 0.001044801 |
88 | 0.991597272 | 0.000940122 |
89 | 0.992443125 | 0.000845853 |
90 | 0.993204098 | 0.000760973 |
91 | 0.993888656 | 0.000684559 |
92 | 0.994504432 | 0.000615776 |
93 | 0.995058304 | 0.000553871 |
94 | 0.995556466 | 0.000498163 |
95 | 0.996004502 | 0.000448036 |
96 | 0.996407437 | 0.000402935 |
97 | 0.996769796 | 0.00036236 |
98 | 0.997095655 | 0.000325859 |
99 | 0.997388681 | 0.000293026 |
100 | 0.997652174 | 0.000263493 |
101 | 0.997889104 | 0.000236931 |
102 | 0.998102146 | 0.000213041 |
103 | 0.998293703 | 0.000191557 |
104 | 0.998465938 | 0.000172236 |
105 | 0.998620799 | 0.000154861 |
106 | 0.998760036 | 0.000139237 |
107 | 0.998885223 | 0.000125187 |
108 | 0.998997777 | 0.000112554 |
109 | 0.999098971 | 0.000101194 |
110 | 0.999189952 | 9.09805E-05 |
111 | 0.999271748 | 8.17968E-05 |
112 | 0.999345288 | 7.35396E-05 |
113 | 0.999411403 | 6.61154E-05 |
114 | 0.999470844 | 5.94404E-05 |
115 | 0.999524283 | 5.3439E-05 |
116 | 0.999572326 | 4.80432E-05 |
117 | 0.999615518 | 4.31921E-05 |
118 | 0.999654349 | 3.88307E-05 |
119 | 0.999689258 | 3.49095E-05 |
120 | 0.999720643 | 3.13842E-05 |
121 | 0.999748857 | 2.82148E-05 |
122 | 0.999774223 | 2.53655E-05 |
123 | 0.999797027 | 2.28038E-05 |
124 | 0.999817527 | 2.05007E-05 |
125 | 0.999835958 | 1.84303E-05 |
126 | 0.999852526 | 1.65689E-05 |
127 | 0.999867422 | 1.48955E-05 |
128 | 0.999880813 | 1.3391E-05 |
129 | 0.999892852 | 1.20385E-05 |
130 | 0.999903674 | 1.08226E-05 |
131 | 0.999913404 | 9.72952E-06 |
132 | 0.99992215 | 8.74681E-06 |
133 | 0.999930014 | 7.86335E-06 |
134 | 0.999937083 | 7.06912E-06 |
135 | 0.999943438 | 6.35511E-06 |
136 | 0.999949151 | 5.7132E-06 |
137 | 0.999954287 | 5.13614E-06 |
138 | 0.999958905 | 4.61735E-06 |
139 | 0.999963056 | 4.15097E-06 |
140 | 0.999966787 | 3.73169E-06 |
141 | 0.999970142 | 3.35477E-06 |
142 | 0.999973158 | 3.01591E-06 |
143 | 0.999975869 | 2.71128E-06 |
144 | 0.999978307 | 2.43742E-06 |
145 | 0.999980498 | 2.19122E-06 |
146 | 0.999982468 | 1.96989E-06 |
147 | 0.999984239 | 1.77091E-06 |
148 | 0.999985831 | 1.59203E-06 |
149 | 0.999987262 | 1.43122E-06 |
150 | 0.999988549 | 1.28666E-06 |
151 | 0.999989705 | 1.15669E-06 |
152 | 0.999990745 | 1.03985E-06 |
153 | 0.99999168 | 9.34821E-07 |
154 | 0.99999252 | 8.40395E-07 |
155 | 0.999993276 | 7.55507E-07 |
156 | 0.999993955 | 6.79193E-07 |
157 | 0.999994566 | 6.10589E-07 |
158 | 0.999995115 | 5.48913E-07 |
159 | 0.999995608 | 4.93468E-07 |
160 | 0.999996052 | 4.43622E-07 |
161 | 0.999996451 | 3.98812E-07 |
162 | 0.999996809 | 3.58529E-07 |
163 | 0.999997131 | 3.22313E-07 |
164 | 0.999997421 | 2.89757E-07 |
165 | 0.999997682 | 2.60488E-07 |
166 | 0.999997916 | 2.34177E-07 |
167 | 0.999998126 | 2.10522E-07 |
168 | 0.999998316 | 1.89257E-07 |
169 | 0.999998486 | 1.70141E-07 |
170 | 0.999998639 | 1.52955E-07 |
171 | 0.999998776 | 1.37504E-07 |
172 | 0.9999989 | 1.23616E-07 |
173 | 0.999999011 | 1.11129E-07 |
174 | 0.999999111 | 9.9904E-08 |
175 | 0.999999201 | 8.9812E-08 |
176 | 0.999999281 | 8.0741E-08 |
177 | 0.999999354 | 7.2585E-08 |
178 | 0.999999419 | 6.5253E-08 |
179 | 0.999999478 | 5.8662E-08 |
180 | 0.999999531 | 5.2736E-08 |
181 | 0.999999578 | 4.741E-08 |
182 | 0.999999621 | 4.262E-08 |
183 | 0.999999659 | 3.8316E-08 |
184 | 0.999999693 | 3.4445E-08 |
185 | 0.999999724 | 3.0966E-08 |
186 | 0.999999752 | 2.7839E-08 |
187 | 0.999999777 | 2.5026E-08 |
188 | 0.9999998 | 2.2498E-08 |
189 | 0.99999982 | 2.0226E-08 |
190 | 0.999999838 | 1.8183E-08 |
191 | 0.999999855 | 1.6346E-08 |
192 | 0.999999869 | 1.4695E-08 |
193 | 0.999999882 | 1.321E-08 |
194 | 0.999999894 | 1.1877E-08 |
195 | 0.999999905 | 1.0676E-08 |
196 | 0.999999915 | 9.598E-09 |
197 | 0.999999923 | 8.629E-09 |
198 | 0.999999931 | 7.757E-09 |
199 | 0.999999938 | 6.974E-09 |
200 | 0.999999944 | 6.269E-09 |
should be the same as each of the 10 draws is without replacementQuote: AlexDinNYCIs it the same as just drawing the numbers or is matching them per drawing another layer?
time for a break now.Quote: AlexDinNYCDoing the hypergeo on the odds (99 choices with 10 chosen) it is a 1 in 2 that i would match 1 number out of ten drawn from 99. So does that mean I could expect to match all 99 after 198 drawings? I'm thinking I have to account for the duplicates and I am not....
I was coding in R and javascript with a 4 day headache.
women NCAAB tonight
UConn vs Notre Dame!
Sally
you are welcome.Quote: AlexDinNYCOnce again a very big thank you :)
I finished some R code so one can run these type of calculations online.
it can be found here
https://sites.google.com/view/krapstuff/coupon-collecting/baseball-card-collector-problem
It is a Markov chain solution and it uses a simple hypergeometric formula to populate the transition matrix. (I think I said that correctly). actually I used choose(), but that is for extra credit.
(I have yet to add anything to stop large values or negative numbers one may input.
so try to be nice as it is your machine)
results
Keno
avg draws
17.860422
your 99, 10 at a time
avg draws
49.33094
also included at no extra charge
the probability distribution matrix and mean wait time matrix too
well, the code did it!
> coupons.r(80,20,60) #Keno numbers 20 at a time (r=20)
Time difference of 0.1574485 secs
draw Prob on X cumulative
[1,] 3 0 0
[2,] 4 1.307724409e-29 1.307724409e-29
[3,] 5 1.254704187e-15 1.254704187e-15
[4,] 6 3.565936203e-10 3.56594875e-10
[5,] 7 4.363806011e-07 4.367371959e-07
[6,] 8 3.747184596e-05 3.790858316e-05
[7,] 9 0.0006920127152 0.0007299212983
[8,] 10 0.004810252733 0.005540174032
[9,] 11 0.01739819727 0.02293837131
[10,] 12 0.0401755751 0.0631139464
[11,] 13 0.06780026217 0.1309142086
[12,] 14 0.09164068458 0.2225548931
[13,] 15 0.1056772507 0.3282321439
[14,] 16 0.1086743495 0.4369064934
[15,] 17 0.1028345813 0.5397410747
[16,] 18 0.09157133233 0.631312407
[17,] 19 0.07798591952 0.7092983265
[18,] 20 0.06427084063 0.7735691672
[19,] 21 0.05169889267 0.8252680598
[20,] 22 0.04084635239 0.8661144122
[21,] 23 0.03184521154 0.8979596238
[22,] 24 0.02458335354 0.9225429773
[23,] 25 0.01883844974 0.9413814271
[24,] 26 0.01435729658 0.9557387236
[25,] 27 0.01089757905 0.9666363027
[26,] 28 0.008246470615 0.9748827733
[27,] 29 0.006226192226 0.9811089655
[28,] 30 0.004692920698 0.9858018862
[29,] 31 0.003532779059 0.9893346653
[30,] 32 0.002656936725 0.991991602
[31,] 33 0.001996829683 0.9939884317
[32,] 34 0.001499937674 0.9954883694
[33,] 35 0.001126251719 0.9966146211
[34,] 36 0.0008454167342 0.9974600378
[35,] 37 0.0006344705596 0.9980945084
[36,] 38 0.0004760815678 0.9985705899
[37,] 39 0.0003571892942 0.9989277792
[38,] 40 0.0002679637525 0.999195743
[39,] 41 0.0002010130293 0.999396756
[40,] 42 0.0001507823008 0.9995475383
[41,] 43 0.000113099346 0.9996606377
[42,] 44 8.48315791e-05 0.9997454692
[43,] 45 6.362764444e-05 0.9998090969
[44,] 46 4.77229516e-05 0.9998568198
[45,] 47 3.579345625e-05 0.9998926133
[46,] 48 2.684578819e-05 0.9999194591
[47,] 49 2.0134731e-05 0.9999395938
[48,] 50 1.510126662e-05 0.9999546951
[49,] 51 1.132607229e-05 0.9999660212
[50,] 52 8.494622728e-06 0.9999745158
[51,] 53 6.371005423e-06 0.9999808868
[52,] 54 4.778275563e-06 0.9999856651
[53,] 55 3.583718713e-06 0.9999892488
[54,] 56 2.687795779e-06 0.9999919366
[55,] 57 2.015850612e-06 0.9999939524
[56,] 58 1.511890075e-06 0.9999954643
[57,] 59 1.133918741e-06 0.9999965982
[58,] 60 8.504397197e-07 0.9999974487
avg draws
0 17.860422
1 17.816656
2 17.772336
3 17.727448
4 17.681976
5 17.635907
6 17.589223
7 17.541908
8 17.493945
9 17.445316
10 17.396002
11 17.345984
12 17.295240
13 17.243751
14 17.191493
15 17.138443
16 17.084577
17 17.029869
18 16.974293
19 16.917820
20 16.860422
21 16.802067
22 16.742723
23 16.682356
24 16.620930
25 16.558407
26 16.494747
27 16.429909
28 16.363846
29 16.296514
30 16.227861
31 16.157835
32 16.086380
33 16.013437
34 15.938941
35 15.862826
36 15.785020
37 15.705445
38 15.624019
39 15.540655
40 15.455258
41 15.367726
42 15.277949
43 15.185810
44 15.091180
45 14.993922
46 14.893885
47 14.790906
48 14.684806
49 14.575391
50 14.462446
51 14.345736
52 14.225002
53 14.099956
54 13.970278
55 13.835613
56 13.695562
57 13.549675
58 13.397444
59 13.238295
60 13.071567
61 12.896502
62 12.712224
63 12.517707
64 12.311749
65 12.092918
66 11.859499
67 11.609406
68 11.340076
69 11.048302
70 10.730003
71 10.379874
72 9.990841
73 9.553179
74 9.052995
75 8.469455
76 7.769190
77 6.893665
78 5.726619
79 4.000000
> coupons.r(99,10,200) #10 at a time (r=10)
Time difference of 1.206498 secs
draw Prob on X cumulative
[1,] 8 0 0
[2,] 9 0 0
[3,] 10 1.259251356e-38 1.259251356e-38
[4,] 11 4.004930954e-29 4.004930956e-29
[5,] 12 1.409397915e-23 1.40940192e-23
[6,] 13 1.252485574e-19 1.252626514e-19
[7,] 14 1.272579592e-16 1.273832218e-16
[8,] 15 3.021991432e-14 3.034729754e-14
[9,] 16 2.522336965e-12 2.552684263e-12
[10,] 17 9.581957937e-11 9.837226364e-11
[11,] 18 1.974426878e-09 2.072799142e-09
[12,] 19 2.501159242e-08 2.708439156e-08
[13,] 20 2.137172209e-07 2.408016125e-07
[14,] 21 1.322022544e-06 1.562824156e-06
[15,] 22 6.25548924e-06 7.818313397e-06
[16,] 23 2.365231098e-05 3.147062437e-05
[17,] 24 7.401656432e-05 0.0001054871887
[18,] 25 0.0001972603028 0.0003027474914
[19,] 26 0.0004583616628 0.0007611091542
[20,] 27 0.0009468764099 0.001707985564
[21,] 28 0.001767505032 0.003475490597
[22,] 29 0.003022402466 0.006497893063
[23,] 30 0.004789547857 0.01128744092
[24,] 31 0.007103324016 0.01839076494
[25,] 32 0.009942731259 0.02833349619
[26,] 33 0.01323002183 0.04156351802
[27,] 34 0.01683936576 0.05840288378
[28,] 35 0.02061269637 0.07901558015
[29,] 36 0.02437875422 0.1033943344
[30,] 37 0.0279715118 0.1313658462
[31,] 38 0.03124517665 0.1626110228
[32,] 39 0.03408430001 0.1966953228
[33,] 40 0.03640873734 0.2331040602
[34,] 41 0.03817408521 0.2712781454
[35,] 42 0.0393686971 0.3106468425
[36,] 43 0.04000851513 0.3506553576
[37,] 44 0.0401308514 0.390786209
[38,] 45 0.03978802072 0.4305742297
[39,] 46 0.03904145359 0.4696156833
[40,] 47 0.03795666217 0.5075723455
[41,] 48 0.03659922315 0.5441715686
[42,] 49 0.03503178959 0.5792033582
[43,] 50 0.03331204629 0.6125154045
[44,] 51 0.03149147004 0.6440068746
[45,] 52 0.02961473643 0.673621611
[46,] 53 0.02771961716 0.7013412282
[47,] 54 0.02583722733 0.7271784555
[48,] 55 0.02399250405 0.7511709595
[49,] 56 0.02220482128 0.7733757808
[50,] 57 0.02048866862 0.7938644494
[51,] 58 0.01885434126 0.8127187907
[52,] 59 0.01730860512 0.8300273958
[53,] 60 0.01585531415 0.84588271
[54,] 61 0.01449596686 0.8603786768
[55,] 62 0.01323019634 0.8736088732
[56,] 63 0.0120561934 0.8856650666
[57,] 64 0.0109710655 0.8966361321
[58,] 65 0.009971136433 0.9066072685
[59,] 66 0.009052192754 0.9156594613
[60,] 67 0.008209683422 0.9238691447
[61,] 68 0.007438878928 0.9313080236
[62,] 69 0.006734996023 0.9380430196
[63,] 70 0.006093293568 0.9441363132
[64,] 71 0.005509144441 0.9496454576
[65,] 72 0.004978087851 0.9546235455
[66,] 73 0.004495865799 0.9591194113
[67,] 74 0.00405844686 0.9631778581
[68,] 75 0.003662039975 0.9668398981
[69,] 76 0.00330310046 0.9701429986
[70,] 77 0.002978330082 0.9731213287
[71,] 78 0.002684672679 0.9758060013
[72,] 79 0.002419306538 0.9782253079
[73,] 80 0.002179634502 0.9804049424
[74,] 81 0.001963272556 0.9823682149
[75,] 82 0.001768037497 0.9841362524
[76,] 83 0.001591934163 0.9857281866
[77,] 84 0.001433142546 0.9871613291
[78,] 85 0.001290005082 0.9884513342
[79,] 86 0.001161014283 0.9896123485
[80,] 87 0.001044800872 0.9906571494
[81,] 88 0.0009401224854 0.9915972719
[82,] 89 0.0008458530258 0.9924431249
[83,] 90 0.0007609726711 0.9932040976
[84,] 91 0.0006845585652 0.9938886561
[85,] 92 0.0006157761773 0.9945044323
[86,] 93 0.000553871315 0.9950583036
[87,] 94 0.0004981627662 0.9955564664
[88,] 95 0.0004480355398 0.9960045019
[89,] 96 0.0004029346726 0.9964074366
[90,] 97 0.0003623595667 0.9967697962
[91,] 98 0.0003258588228 0.997095655
[92,] 99 0.0002930255324 0.9973886805
[93,] 100 0.0002634929963 0.9976521735
[94,] 101 0.0002369308345 0.9978891044
[95,] 102 0.0002130414558 0.9981021458
[96,] 103 0.000191556858 0.9982937027
[97,] 104 0.0001722357298 0.9984659384
[98,] 105 0.0001548608275 0.9986207992
[99,] 106 0.0001392366032 0.9987600358
[100,] 107 0.000125187061 0.9988852229
[101,] 108 0.0001125538205 0.9989977767
[102,] 109 0.0001011943688 0.9990989711
[103,] 110 9.098048268e-05 0.9991899516
[104,] 111 8.179680559e-05 0.9992717484
[105,] 112 7.353956434e-05 0.9993452879
[106,] 113 6.611541237e-05 0.9994114033
[107,] 114 5.944038719e-05 0.9994708437
[108,] 115 5.343897119e-05 0.9995242827
[109,] 116 4.804324553e-05 0.9995723259
[110,] 117 4.319212829e-05 0.9996155181
[111,] 118 3.883068837e-05 0.9996543488
[112,] 119 3.490952787e-05 0.9996892583
[113,] 120 3.138422618e-05 0.9997206425
[114,] 121 2.821483956e-05 0.9997488574
[115,] 122 2.536545092e-05 0.9997742228
[116,] 123 2.280376461e-05 0.9997970266
[117,] 124 2.050074189e-05 0.9998175273
[118,] 125 1.843027298e-05 0.9998359576
[119,] 126 1.6568882e-05 0.9998525265
[120,] 127 1.48954616e-05 0.9998674219
[121,] 128 1.339103424e-05 0.999880813
[122,] 129 1.203853748e-05 0.9998928515
[123,] 130 1.082263094e-05 0.9999036741
[124,] 131 9.729522546e-06 0.9999134037
[125,] 132 8.746812442e-06 0.9999221505
[126,] 133 7.863352503e-06 0.9999300138
[127,] 134 7.069120057e-06 0.9999370829
[128,] 135 6.355104326e-06 0.999943438
[129,] 136 5.713204302e-06 0.9999491512
[130,] 137 5.136136939e-06 0.9999542874
[131,] 138 4.617354587e-06 0.9999589047
[132,] 139 4.150970761e-06 0.9999630557
[133,] 140 3.731693401e-06 0.9999667874
[134,] 141 3.354764858e-06 0.9999701422
[135,] 142 3.015907941e-06 0.9999731581
[136,] 143 2.711277412e-06 0.9999758694
[137,] 144 2.437416364e-06 0.9999783068
[138,] 145 2.191217016e-06 0.999980498
[139,] 146 1.969885455e-06 0.9999824679
[140,] 147 1.770909945e-06 0.9999842388
[141,] 148 1.592032427e-06 0.9999858308
[142,] 149 1.431222908e-06 0.999987262
[143,] 150 1.28665642e-06 0.9999885487
[144,] 151 1.156692322e-06 0.9999897054
[145,] 152 1.03985568e-06 0.9999907452
[146,] 153 9.348205323e-07 0.9999916801
[147,] 154 8.403948455e-07 0.9999925205
[148,] 155 7.555069855e-07 0.999993276
[149,] 156 6.791935589e-07 0.9999939552
[150,] 157 6.105884801e-07 0.9999945657
[151,] 158 5.489131434e-07 0.9999951147
[152,] 159 4.934675872e-07 0.9999956081
[153,] 160 4.436225506e-07 0.9999960518
[154,] 161 3.988123326e-07 0.9999964506
[155,] 162 3.585283722e-07 0.9999968091
[156,] 163 3.223134767e-07 0.9999971314
[157,] 164 2.897566339e-07 0.9999974212
[158,] 165 2.604883468e-07 0.9999976817
[159,] 166 2.341764408e-07 0.9999979158
[160,] 167 2.105222937e-07 0.9999981263
[161,] 168 1.89257447e-07 0.9999983156
[162,] 169 1.701405585e-07 0.9999984857
[163,] 170 1.52954664e-07 0.9999986387
[164,] 171 1.375047145e-07 0.9999987762
[165,] 172 1.236153627e-07 0.9999988998
[166,] 173 1.111289732e-07 0.999999011
[167,] 174 9.990383311e-08 0.9999991109
[168,] 175 8.981254385e-08 0.9999992007
[169,] 176 8.074057539e-08 0.9999992814
[170,] 177 7.258496629e-08 0.999999354
[171,] 178 6.525315521e-08 0.9999994192
[172,] 179 5.866193039e-08 0.9999994779
[173,] 180 5.273648528e-08 0.9999995306
[174,] 181 4.740956952e-08 0.9999995781
[175,] 182 4.262072568e-08 0.9999996207
[176,] 183 3.831560314e-08 0.999999659
[177,] 184 3.444534122e-08 0.9999996934
[178,] 185 3.096601465e-08 0.9999997244
[179,] 186 2.783813505e-08 0.9999997522
[180,] 187 2.502620275e-08 0.9999997773
[181,] 188 2.249830392e-08 0.9999997998
[182,] 189 2.022574832e-08 0.99999982
[183,] 190 1.818274372e-08 0.9999998382
[184,] 191 1.634610317e-08 0.9999998545
[185,] 192 1.469498182e-08 0.9999998692
[186,] 193 1.321064037e-08 0.9999998824
[187,] 194 1.187623237e-08 0.9999998943
[188,] 195 1.067661304e-08 0.999999905
[189,] 196 9.598167355e-09 0.9999999146
[190,] 197 8.628655564e-09 0.9999999232
[191,] 198 7.757074245e-09 0.999999931
[192,] 199 6.973531433e-09 0.9999999379
[193,] 200 6.269134352e-09 0.9999999442
avg draws
0 49.33094
1 49.23557
2 49.13923
3 49.04190
4 48.94355
5 48.84417
6 48.74373
7 48.64221
8 48.53959
9 48.43584
10 48.33094
11 48.22486
12 48.11757
13 48.00905
14 47.89927
15 47.78819
16 47.67580
17 47.56205
18 47.44691
19 47.33035
20 47.21234
21 47.09283
22 46.97179
23 46.84917
24 46.72494
25 46.59906
26 46.47148
27 46.34214
28 46.21101
29 46.07804
30 45.94316
31 45.80633
32 45.66749
33 45.52658
34 45.38353
35 45.23828
36 45.09076
37 44.94090
38 44.78862
39 44.63384
40 44.47649
41 44.31647
42 44.15369
43 43.98805
44 43.81946
45 43.64780
46 43.47296
47 43.29482
48 43.11326
49 42.92814
50 42.73931
51 42.54663
52 42.34994
53 42.14906
54 41.94382
55 41.73401
56 41.51944
57 41.29987
58 41.07508
59 40.84481
60 40.60877
61 40.36669
62 40.11824
63 39.86307
64 39.60081
65 39.33106
66 39.05338
67 38.76728
68 38.47224
69 38.16768
70 37.85297
71 37.52741
72 37.19022
73 36.84055
74 36.47742
75 36.09977
76 35.70638
77 35.29589
78 34.86675
79 34.41716
80 33.94510
81 33.44819
82 32.92368
83 32.36831
84 31.77823
85 31.14881
86 30.47443
87 29.74818
88 28.96141
89 28.10312
90 27.15899
91 26.10996
92 24.92980
93 23.58105
94 22.00751
95 20.11925
96 17.75893
97 14.61176
98 9.90000
>
Quote: gordonm888Just wanna say that I am proud to be in the same damn forum as MustangSally. Really.
I too.
If the 80 numbers were selected randomly, one by one , with replacement, then the expected value to get all 80 numbers would be ( Ln (80) + 0.577) * 80 = 397
Since the numbers are selected in groups of 20 with no duplicates in the groups, the numerator of the equation changes. In the first case it’s always 80 so the formula is 80/80 + 80/79 + 80/78 .... + 80/1 = 397 (or very close).
But in the second case the numerator oscillates between 80 and 61 since the balls are selected in groups of 20. Starts at 80, decrements to 61 then resets to 80, for an average of 70.5.
70.5 / 80 x 397 is an expected value of 350. 350 / 20 = 17.5 draws of 20.