Build a number from $n$ dice, perhaps excluding one

58 Views Asked by At

We are rolling $n$ dice and want to be able to make a number $m$, but can only exclude one die.

For example, if we roll $4$ dice, want the number $12$, and get $1, 4, 5, 6$, we can get it by excluding $4$ and taking $1+5+6$. If we wanted $7$, we wouldn't be able to get it, since we'd need to exclude two dice.

input: 2 (dices)
       6 (number we want)
probability: 0.4444

Is there any formula to calculate this probability? Excluding a die is optional.

2

There are 2 best solutions below

0
On BEST ANSWER

As an input to this calculation, you need the probabilities $a(k,m)$ to get a sum of $m$ with $k$ dice. I’ll take that as given, as there are more than enough questions and answers on this site that deal with that problem.

There are $n$ sums that exclude one die. Any number of them could be $m$, and we want the probability that at least one of them is. If more than one sum is $m$, the excluded dice in all of them must show the same value. The probability for any $k$ particular sums to be $m$ is

$$ 6^{-k}\sum_{j=1}^6a(n-k,m-j)\;, $$

since the $k$ identical excluded dice can show any number from $1$ to $6$ and the remaining $n-k$ dice need to sum to $m-j$. By inclusion–exclusion, the probability for at least one sum excluding one die to be $m$ is

$$ \sum_{k=1}^n\binom nk(-1)^{k+1}6^{-k}\sum_{j=1}^6a(n-k,m-j)\;. $$

The event that all $n$ dice sum to $m$ is disjoint from the events with excluded dice, so we can just add its probability $a(n,m)$ to the above result.

For your example with $n=2$ and $m=6$, we have $a(n,m)=a(2,6)=\frac5{36}$ and $a(1,m)=\frac16$ and $a(0,m)=\delta_{0m}$, so the probability is

\begin{eqnarray} a(2,6)+\sum_{k=1}^2\binom2k(-1)^{k+1}6^{-k}\sum_{j=1}^6a(2-k,6-j) &=& \frac5{36}+2\cdot\frac16\cdot6\cdot\frac16-1\cdot\frac1{36}\cdot1 \\ &=&\frac49\;, \end{eqnarray}

in agreement with your result.

3
On

The number of ways of getting $k$ is given by the GF:

$$-30+(6+x+x^2+x^3+x^4+x^5+x^6)(5+x+x^2+x^3+x^4+x^5+x^6)$$

and there are $36$ outcomes, so $P(6)=\frac49$.