6

I'm trying to figure out if there is some (relatively simple) formula for calculating the probability of rolling a sum of N with as many rolls as needed with a single regular six-sided die. For example:
$N=1$ is $0.16666 = 1/6 = 1/6$ (1)
$N=2$ is $0.19444 = 7/36 = 1/6 + 1/36$ (2 or 1,1)
$N=3$ is $0.22685 = 49/216 = 1/6 + 2/36 + 1/216$ (3 or 1,2/2,1 or 1,1,1)
$N=4$ is $0.26466 = 343/1296 = 1/6 + 3/36 + 3/216 + 1/1296$ (4 or 2,1/1,2/2,2 or 1,1,2/1,2,1/2,1,1 or 1,1,1,1)
...

Does this series converge to essentially one and is there some good formula?

It seems like pascal's triangle is involved somehow (at least for n=1-6, but I'm not sure how (if even possible) to convert it into a formula. Any help/advice is appreciated.

user141592
  • 6,206
  • 2
    If you throw a die a lot of times and add your results as you go along, the sum increases by $3.5$ on average for each roll, so my gut says that your probability converges to $\frac{1}{3.5}\approx 0.286$ as $N$ grows. – Arthur Jan 05 '15 at 23:27

3 Answers3

5

Let $q(x)=\frac{1}{6}\left(x^1+x^2+x^3+x^4+x^5+x^6\right)$. Write:

$$\begin{align}G(x)&=\sum_{n=0}^\infty q(x)^n\\&=\frac{1}{1-q(x)}\\&=\frac{6}{6-x-x^2-x^3-x^4-x^5-x^6} \end{align}$$

Then the coefficient of $x^N$ in $G(x)$ is your probability.

So you need to know something about the roots of the denominator. $1$ is one such root, but you are going to need to deal with complex roots, as well, or at least get an upper bound for the roots.

The formula is:

$$p(N)=a_1\alpha_1^N+a_2\alpha_2^N+\cdots a_6\alpha_6^N$$

For some constants $a_i$ and with the $\alpha_i$ the inverse roots of the denominator.

According to Wolfram Alpha, the roots of the denominator are $1$ and a bunch of values (one real, four complex) with absolute value greater than $1$.

So for large enough $N$, $p(N)\approx a_1$.

We can find $a_1$ by doing the usual partial fractions computation:

$$\lim_{x\to 1} G(x)(1-x)=\frac{2}{7}=\frac{1}{3.5}$$ which is what Arthur conjectured in comments above.

It turns out for $i>1$, $|\alpha_i|<\frac{3}{4}$, so we have:

$$p(N)=\frac{2}{7} + o\left(\left(\frac 34\right)^N\right)$$


We can also get a recursion:

$$P(n+6)=\frac{1}{6}\left(P(n)+P(n+1)+P(n+2)+P(n+3)+P(n+4)+P(n+5)\right)$$

We get $P(28)=.2857\dots.$ For $n\geq 88$ we get:

$$P(n)=0.285714285714\dots$$ which is $12$ digits of accuracy to $\frac{2}{7}=0.\overline{285714}.$

We also get that $$\frac{P(100)-\frac{2}{7}}{\left(\frac34\right)^{100}}\approx -0.016$$

and

$$\frac{P(1000)-\frac{2}{7}}{\left(\frac34\right)^{1000}}\approx 7.34\times 10^{-13}$$

(Computing the left side with python Fraction class to get exact value, then converted to float.)

This gives:

$$P(1000)-\frac{2}{7}\approx 8.45\times 10^{-138}$$

Thomas Andrews
  • 186,215
1

Let $P(N)$ be the probability rolling a sum of $N$ with any number of dice. If we consider the number of ways we can roll $m$ dice to sum to $N$, it should just be number of ways we can roll $(m-1)$ dice and get within $6$ of $N$, times the probability of getting the roll we need.

For example considering $N=43$, then $P(43)$ should be equal to $P(42)$ times the probability of rolling a $1$, plus $P(41)$ times the probabilty of rolling a $2$, plus ..., plus $P(37)$ times the probability of rolling a $6$.

For $N > 6$ we can define $P(N)$ recursively as: $$ \begin{align} P(N) &= \frac{1}{6}P(N-1) + \frac{1}{6}P(N-2) + \dotsb + \frac{1}{6}P(N-6) \\ &= \frac{1}{6}\Big(P(N-1) + P(N-2) + \dotsb + P(N-6)\Big) \\ &= \frac{1}{6}\sum_{i=N-1}^{N-6}P(i) \end{align} $$

We should consider $N \leq 6$ separately because there are not six previous terms: $$ P(N) = \frac{1}{6}\sum_{i=0}^{N-1}P(i) $$ (Note that we let $P(0) = 1$ since we can always roll $0$ dice for a sum of $0$.)

So for each $N$ after $6$, $P(N)$ is just average of the six previous $P$. I'm sure there should be a closed form for this, but it is outside of my ability to find this closed form.

Mike Pierce
  • 19,406
0

As Thomas posted, the generating function method is a classic way to solve this kind of problem (see also Samuel Karlin, Chap 2, Elementary Problem 6). I'll provide other two perspectives for this problem.

A really heuristic way to understand the result is that, for each roll, the average result you get is $\frac{7}{2}$. Thus $\frac{S_n}{n}\to\frac{7}{2}$ almost surely by strong law of large numbers. Then given that $S_1, S_2, \ldots, S_n$ cover $n$ integers out of all $S_n$ integers, the probability that one large number is in the renewal process sequence $\{S_n\}$ is its frequency, which is the inverse of its expecation, $\frac27$. This property is discussed in Samuel karlin, Chap 5.

You may also define $x_n$ the probability that $n$ is some sum of rolls and write out this process like:

$$ \vec{x}_n \begin{pmatrix} x_{n} \\ x_{n-1} \\ x_{n-2} \\ x_{n-3} \\ x_{n-4} \\ x_{n-5} \end{pmatrix} = A \cdot \begin{pmatrix} x_{n-1} \\ x_{n-2} \\ x_{n-3} \\ x_{n-4} \\ x_{n-5} \\ x_{n-6} \end{pmatrix}, $$ where $$A = \begin{pmatrix} \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} & \frac{1}{6} \\ 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 \end{pmatrix}. $$

This is pretty much what others have answered, but in a matrix form. The boundedness of $\vec{x}_n$ guaranteed that $A$'s eigenvalues are within the unit circle if $A$ can be diagonalized. After this validation of the existence of limit $x=\lim_{n\to\infty}{x_n}$, we also have $$ \begin{aligned} x_n &= \frac{x_{n-1}}{6} + \frac{x_{n-2}}{6} + \cdots +\frac{x_{n-5}}{6}, \\ x_{n-1} &= \frac{x_{n-2}}{6} + \frac{x_{n-3}}{6} + \cdots +\frac{x_{n-6}}{6},\\ &\cdots \\ x_7 &= \frac{x_6}{6} + \frac{x_5}{6} + \cdots +\frac{x_1}{6}. \end{aligned} $$ Sum these equations and we have $$ x_{n} + \frac{5x_{n-1}}{6} + \cdots + \frac{x_{n-5}}{6} = x_{6} + \frac{5x_5}{6} + \cdots + \frac{x_1}{6}. $$ Let $n\to\infty$, we have $\frac{7}{2}x=x_6 + \frac{5x_5}{6} + \cdots + \frac{x_1}{6} = 1$. Since you already mentioned that $x_k = \frac16\cdot \left(\frac76\right)^{k-1}$ for $1\le k \le 6$, substitute them into the equation then the right hand side is $1$. Thus $x=\frac{2}{7}$.