2

I was wondering if someone could help me answer the following question:

Calculate the probability that in $37 $ consecutive spins of a roulette wheel (using an European Roulette wheel) you will have $24$ different numbers.

MJD
  • 65,394
  • 39
  • 298
  • 580
Flash
  • 23
  • 2
    Your question is ambiguous: do you mean exactly 24 different numbers, or at least 24 different numbers? Also, does the roulette wheel have 0 and 00 (American) or a single 0 (European)? – Eric Tressler Jul 06 '13 at 01:19
  • Exactly 24 different numbers. The roulette wheel is European. – Flash Jul 06 '13 at 02:17

2 Answers2

3

We interpret the problem as asking for the probability that there are exactly $24$ distinct numbers in the $37$ spins.

There are $37^{37}$ equally likely sequences of length $37$ over the alphabet $\{0,1,\dots,36\}$. It remains to count the good sequences, the ones that have exactly $24$ distinct numbers.

Which $24$ numbers? They can be chosen in $\binom{37}{24}$ ways. Now we count the number of strings of length $37$ formed out of these $24$ letters, and use all of them. The tricky thing is that we must make sure we don't count strings that use fewer than $24$ of these letters.

For dealing with that, we can use Stirling numbers of the second kind or Inclusion/Exclusion. We describe the Inclusion/Exclusion approach.

For any of the chosen sets of $24$, there are $24^{37}$ words of length $37$ that use our chosen alphabet.

We must subtract the words that use $23$ or fewer of the letters. So a first step is to subtract $\binom{24}{23}23^{37}$. However, we have subtracted too much, we have for example subtracted the words that are missing two of the digits. There are $\binom{24}{2}22^{37}$ of these. So add back $\binom{24}{2}22^{37}$.

We have added back too much, for we have added back more than once the $\binom{24}{3}21^{37}$ words that only use $21$ of the digits. And so on.

André Nicolas
  • 507,029
  • I have pulled together your answer and confirmed that it gives the same result as mine. (+1) – robjohn Jul 06 '13 at 22:53
  • Thanks for your help. Excuse my ignorance, but I have limited experience in math. I understand your approach until the adding back in "words" after subtracting the words containing less than 23 unique letters. Is the problem that in the first subtraction you mention the same "word" is subtracted multiple times (e.g., if "A" is in chosen set of 24 letters, then the word A*27 (i.e, A repeated 27 times) will be subtracted 23 times, instead of 1 time)? Or is it something else? Thanks – Flash Jul 07 '13 at 00:34
  • Yes you are right, but for Inclusion/Exclusion, we deal with issues one at a time. So I have subtracted the $23^{37}$ words that miss the "letter" (roulette number) $1$, also the $23^{37}$ that miss the letter $2$. That means I have subtracted twice all the words $$22^{37}$ words that miss both $1$ and $2$. So they are added back, as are all such "miss at least two" words. In the adding back process, we count too many times the words that miss $3$ letters. And so on. – André Nicolas Jul 07 '13 at 00:44
1

We will use the Generalized Inclusion-Exclusion Principle.

Let $S_k$ be the set of results where $k$ has not been spun in $n$ spins.

$N_k=\binom{37}{k}(37-k)^n$; that is, $\binom{37}{k}$ ways to choose the $k$ numbers not spun and $(37-k)^n$ spins consisting of the remaining $37-k$ numbers.

To have exactly $m$ different numbers, our result must be in exactly $37-m$ of the $S_k$. The formula gives $$ \sum_{k=0}^{37}(-1)^{k+m-37}\binom{k}{37-m}\binom{37}{k}(37-k)^n\tag{1} $$ Plugging in $m=24$ and $n=37$, we get $$ 2157142399433325078661979618737564774321235951616000000000 $$ outcomes with exactly $24$ unique numbers. Dividing by $37^{37}$, yields $$ \color{#C00000}{\text{a }0.20436900224118169585\text{ probability of spinning exactly }24\text{ unique numbers.}} $$ The Corollary says that the number of ways to get at least $m$ unique numbers is $$ \sum_{k=0}^{37}(-1)^{k+m-37}\binom{k-1}{37-m}\binom{37}{k}(37-k)^n\tag{2} $$ Plugging in $m=24$ and $n=37$, we get $$ 5459199453945632178044406986558392583191882135240704000000 $$ outcomes with at least $24$ unique numbers. Dividing by $37^{37}$, yields $$ \text{a }0.51720792550902599350\text{ probability of spinning at least }24\text{ unique numbers.} $$


Expected Value

Suppose that the expected number of unique numbers spun on the wheel after $n$ spins is $u_n$. The number of unspun numbers is $37-u_n$ so the probability of getting a unique number on the next roll would be $\frac{37-u_n}{37}$. The linearity of expectation yields $$ u_{n+1}=u_n+\frac{37-u_n}{37} $$ Therefore, $$ \begin{align} 37-u_{n+1}&=37-u_n-\frac{37-u_n}{37}\\ &=\frac{36}{37}(37-u_n) \end{align} $$ and thus, $$ u_n=37-37\left(\frac{36}{37}\right)^n $$ Plugging in $n=37$ yields the expected number of unique spins to be $$ u_{37}\doteq23.574500214341572103 $$ We can also compute the expected value using $(1)$: $$ u_n=\sum_{m=0}^{37}\sum_{k=0}^{37}(-1)^{k+m-37}m\binom{k}{37-m}\binom{37}{k}(37-k)^n $$ Plugging in $n=37$ yields the expected number of unique spins to be $$ u_{37}\doteq23.574500214341572103 $$


Confirming André Nicolas' Answer

André Nicolas' answer is $$ \binom{37}{24}\sum_{k=0}^{37}(-1)^k\binom{24}{k}(24-k)^{37}\tag{3} $$ Starting from $(1)$, we get $$ \begin{align} &\sum_{k=0}^{37}(-1)^{k+m-37}\binom{k}{37-m}\binom{37}{k}(37-k)^n\\ &=\sum_{k=0}^{37}(-1)^{k+m-37}\binom{m}{37-k}\binom{37}{m}(37-k)^n\\ &=\binom{37}{m}\sum_{k=0}^{37}(-1)^{k+m-37}\binom{m}{37-k}(37-k)^n\\ &=\binom{37}{m}\sum_{k=m-37}^{m}(-1)^{k}\binom{m}{m-k}(m-k)^n\\ &=\binom{37}{m}\sum_{k=0}^{m}(-1)^{k}\binom{m}{k}(m-k)^n\\ \end{align} $$ Plugging in $m=24$ and $n=37$, we get $(3)$.

robjohn
  • 345,667