Probability of the number of winners

44 Views Asked by At

I have a theoretical $7$ sided die with an equal probability of each result($1$-$7$). If I roll the die $30$ times and count for the winning number(s) what is the probability of having $1$ winning number? $2$ winning numbers? $3$? ... $6$ winning numbers? Winning number is defined as the number(s) that get rolled the most out of the $30$ rolls. i.e. if $1$ and $2$ are both rolled $7$ times and all other numbers are rolled less than $7$ times then there are $2$ winners ($1$ & $2$).

Thank you in advance for the help!

1

There are 1 best solutions below

1
On BEST ANSWER

I think there are essentially $1824$ non-equally probable patterns for the dice throws, corresponding to the partitions of $30$ into no more than $7$ parts.

One example pattern could be $8$ of one side, $8$ of a second, $8$ of a third, $4$ of a fourth, $1$ of a fifth, $1$ of a sixth and $0$ of the seventh, with $8+8+8+4+1+1+0=30$. This would correspond to $3$ winners as it has $3$ sides appearing eight times, $1$ side appearing four times, $2$ sides appearing once and $1$ side not appearing, with $3+1+2+1=7$. The number of possible equally-probable ways this pattern could appear is $\dfrac{30!}{(8!)^3(4!)^1(1!)^2(0!)^1}\times \dfrac{7!}{3!1!2!1!} \approx 7 \times{10^{19}}$ so to turn this into a probability you need to divide by $7^{30}$ to give a probability for this pattern of about $3\times 10^{-6}$.

There are $39$ partition patterns giving $3$ winners, and it would seem sensible to do the calculations across all the $1824$ partitions with a program. For example the following R code

library(partitions)
rolls <- 30
sides <- 7
partitions <- restrictedparts(rolls, sides, include.zero=TRUE, decreasing=TRUE)
probwinners <- numeric(sides)
names(probwinners) <- 1:sides
for (n in 1:ncol(partitions)){
   part <- partitions[,n]
   numberwinners <- sum(part == part[1])
   probwinners[numberwinners] <- probwinners[numberwinners] + exp(
      lfactorial(rolls) - sum(lfactorial(part)) +  
      lfactorial(sides) - sum(lfactorial(table(part))) -
      rolls * log(sides) )
   }
probwinners

gives the calculated probabilities

           1            2            3            4            5            6            7
7.525078e-01 1.872654e-01 4.409657e-02 1.361835e-02 2.484250e-03 2.758859e-05 0.000000e+00

which add up to $1$. My earlier simulated values were close to these, providing some validation