All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Roulette (Posted on 2005-03-23) Difficulty: 2 of 5
If I spin the roulette (numbers from 0 to 36) N consecutive times, how many different numbers should I expect to get?

(If N=1, your formula should give 1 as an answer, but for N=2, it should be a little under 2, and for all other N, the formula should be less than the minimum of N and 37.)

Another question: how many times should you spin the roulette, so chances are better than one in a million, that all 37 numbers will have appeared?

See The Solution Submitted by e.g.    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Part 2 spoiler | Comment 2 of 4 |

I take the second part to ask that the chances are less than 1 in a million that not all 37 numbers will have appeared.

For any number of spins, n, the probability that all 37 will have appeared is the sum of the individual probabilities that each of the 37 will have appeared minus the sum of all the pairwise probabilities of two numbers either having appeared, plus the sum of all the triple probabilities of each set of three having any of its members appear, etc., alternating adding and subtracting.  This is the inclusion/exclusion principle.

For each number of numbers (i) grouped together, the probability that any of that group appears is 1 - ((37-i)/37)^n. But there are C(n,i) of these groups of i, so that must be multiplied by this number of combinations.

The following program evaluates this until the probability of getting all 37 exceeds 0.999999:

 80   point 10
 90   for N=100 to 1000
100    Tot=0:Sg=1:Max=0
110    for I=1 to 37
115      Term=combi(37,I)*(1-((37-I)/37)^N)
120      Tot=Tot+Sg*Term
130      Sg=-Sg
135      if Term>Max then Max=Term
150    next
155    if Tot>0.999999 then V=N:cancel for:goto 170
160   next
170   print V,Tot
175   print int(log(Max)/log(10))

It finds that with 637 spins, the probability that all 37 numbers will have appeared is 0.99999902636....  For 636, the probability was only 0.99999899319....

For various numbers of spins, the following probabilities of getting all 37 hold:

10      0.00000000000000000000
20      0.00000000000000000000
30     -0.00000000000000000000
40      0.00000000000165394823
50      0.00000010698328320346
60      0.00002495827615077588
70      0.00065738310890804886
80      0.00550350998554267593
90      0.02331592425229716104
100     0.06400279952819619846
110     0.13156539831501980046
120     0.22167643435616123275
130     0.32475135713799814463
140     0.43045181626847988941
150     0.53064414760620373959
160     0.62033665280691750640
170     0.69733598524002930598
180     0.76142938367428298851
190     0.81357459429078856175
200     0.85528439911428127653
210     0.88822726587365426941
220     0.91400076770282579428
230     0.93402273061448979724
240     0.94949416534209705145
250     0.96140165687487348191
260     0.97053871299807833180
270     0.97753409642474361697
280     0.98288070563161651749
290     0.98696191899189586105
300     0.99007421717460486023
310     0.99244590400801203824
320     0.99425222718133654571
330     0.99562738990095437315
340     0.99667398183906396282
350     0.99747032197818228900
360     0.99807614090726738291
370     0.99853695844328321334
380     0.99888744498641655464
390     0.99915399619163322839
400     0.99935670145309412327
410     0.99951084685815949448
420     0.99962806152427668241
430     0.99971719126031161792
440     0.99978496402596513266
450     0.99983649658420865493

It checks out that for 10, 20 and 30 spins, there is zero probability.


  Posted by Charlie on 2005-03-23 16:05:43
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information