Cumulative dice sum with bonus rolls whenever max face appears

156 Views Asked by At

What is the chance of rolling x n-sided dice and getting a sum of at least y, if whenever a die comes up n, one more die is rolled?

I have a high-school understanding of statistics plus whatever experience I gathered playing with math but I honestly don't even know how to begin approaching this problem.

Thank you in advance for your time!

1

There are 1 best solutions below

8
On BEST ANSWER

I'm going to assume six-sided dice here.

Each die is independent, so we can work out the distribution for a single die, and get everything we need from that.

To start, just for fun, we can note that the expected value $E$ when rolling a single die satisfies $$ E = \frac{1}{6} 1 +\frac{1}{6} 2 + \frac{1}{6} 3 + \frac{1}{6} 4 + \frac{1}{6} 5 + \frac{1}{6}(6+E)$$ and so $E=4.2$.

Anyway, the first thing we might notice is that the probability of getting a score of $6m+k$, for any non-negative $m$, and $k \in \{1,2,3,4,5\}$ is $$ P(6m+k)= \left(\frac{1}{6}\right)^{m+1} $$ Note that it is not possible to score a multiple of $6$.

We can create some generating functions. For scores congruent to $1$ mod $6$, we have $$ \frac{1}{6} x + \frac{1}{6^2} x^7 + \frac{1}{6^3}x^{13} + \cdots = \frac{x}{6-x^6} $$ The generating function for congruence class $k$ mod $6$ is $x^k$ times this, so the overall generating function for a single die is $$ \frac{x+x^2+x^3+x^4+x^5}{6-x^6} = \frac{x^6-x}{(x-1)(6-x^6)} $$ So, when rolling $r$ dice, the generating function for the sum is
$$ \left( \frac{x^6-x}{(x-1)(6-x^6)}\right)^r. $$ Here's an example of how to calculate with this. Suppose we roll $5$ six-sided dice, and want to know the probability that the sum will be greater than $20$. We calculate the probability that the sum will be less than $20$ by truncating the generating function for a single die and raising it to the fifth power. Let $$ Q= \frac{1}{6} x + \frac{1}{6} x^2 + \frac{1}{6} x^3 + \frac{1}{6} x^4 + \frac{1}{6} x^5 + \frac{1}{36} x^7 + \frac{1}{36} x^8 + \frac{1}{36} x^9 + \frac{1}{36} x^{10} + \frac{1}{36} x^{11} + \frac{1}{216} x^{13} + \frac{1}{216} x^{14} + \frac{1}{216} x^{15} + \frac{1}{216} x^{16} +\frac{1}{216} x^{17} +\frac{1}{1296} x^{19} $$ Then, raising $Q$ to the fifth power, we have $$ \frac{1}{7776} x^5 + \frac{5}{7776} x^6 + \frac{5}{2592} x^7 + \frac{35}{7776} x^8 + \frac{35}{3888} x^9 + \frac{121}{7776} x^{10} + \frac{1115}{46656} x^{11} + \frac{1555}{46656} x^{12} + \frac{665}{15552} x^{13} + \frac{2365}{46656} x^{14} + \frac{659}{11664} x^{15} + \frac{2795}{46656} x^{16} + \frac{5695}{93312} x^{17} + \frac{5635}{93312} x^{18} + \frac{5495}{93312} x^{19}+\cdots $$ Summing the coefficients of $Q^5$ up to $x^{19}$ gives us $$ \frac{44711}{93312}, $$ the probability that we score less than $20$ when rolling $5$ dice. And so, the probability that we score $20$ or more is $$ 1-\frac{44711}{93312} = \frac{48601}{93312}.$$