0

At the start, current sum is 0. Each time, we roll the dice and add the current value of dice to the sum. We stop as soon as the sum reaches a fixed value n.

What is the probability of stopping at exactly n?

What would be the approach to this problem and does it depend on what n is? Or is this a trick question where the probability of stopping at exactly n would be 1/6?

felicia
  • 61
  • Are you looking for an exact value, as a function of $~n~?$ – user2661923 Sep 24 '24 at 14:22
  • Each step goes forward by an average of $3.5$ steps, so it should not be a surprise if the probability you hit $n$ exactly is approximately $\frac27$ (though not exactly, as the exact probability for a particular $n$ will have a denominator which is a power of $2$ multiplied by a power of $3$) – Henry Sep 24 '24 at 14:27
  • Related https://math.stackexchange.com/questions/4782200/how-do-i-calculate-the-probability-of-reaching-sum-s-by-adding-the-results-of/4782214 – leonbloy Sep 24 '24 at 16:53

1 Answers1

2

It is relatively easy to come up with a recursion starting with $p_0=1, p_n=0$ when $n<0.$

Then $$p_{n+6}=\frac16(p_n+p_{n+1}+p_{n+2}+ p_{n+3}+p_{n+4}+p_{n+5}).$$

Using Wolfram alpha, the roots of $x^6-\frac16(x^5+x^4+x^3+x^2+x+1)=0$ are $1$, another real number $r\approx -0.67$ and four complex numbers $z_1,\overline{z_1},z_2,\overline{z_2},$ with $|z_i|<0.75$

Unfortunately, find the closed formula is gonna be hard.mit will be of the form:

$$p_n=b_1+b_2r^n+b_3z_1^n+b_4\overline{z_1}^n+b_5z_2^n+b_6\overline{z_2}^n$$ where the $b_i$ are constants. But there likely won't be an easy formula for the $b_i,$ and even the roots might not have closed forms. We can likely infer a value for $b_1,$ since $p_n\to b_1$ as $n\to\infty,$ and we might expect the probability to converge to a $b_1$ as $n\to\infty.$ Since the density of the sequence of values is $\frac27,$ you might expect $b_1=\frac27.$ But I'm not sure of that reasoning.

You can compute any particular $p_n$ efficiently converting the recursion to essentially exponentiation of a matrix, then using the "method of repeated squaring."

Specifically, we have $$\begin{pmatrix}p_{n-5}\\p_{n-4}\\p_{n-3}\\p_{n-2}\\p_{n-1}\\p_n\end{pmatrix}=\begin{pmatrix} 0&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\\ \frac16&\frac16&\frac16&\frac16&\frac16&\frac16 \end{pmatrix}^n\begin{pmatrix}0\\0\\0\\0\\0\\1\end{pmatrix}$$ In practice, computing $p_n$ this way will only be faster than using the recursion when $n$ is large enough to make $p_n-\frac27$ vanishingly small. But it will give you an exact value.


Another approach is the power series approach.

$$\sum_{n=0}^\infty p_nx^n=\sum_{k=0}^\infty\left(\frac {x+x^2+x^3+x^4+x^+x^6}{6}\right)^k =\frac{6}{6-x-x^2-x^3-x^4-x^5-x^6}$$

It still requires the roots of the above polynomial to solve this with partial fractions, but we can more easily find the $b_1$ term here by multiplying the right side by $1-x$ and getting $$\frac{6}{1+(1+x)+(1+x+x^2)+\cdots+(1+x+x^2+x^3+x^4+x^5)}$$ and evaluate when $x=1,$ getting $\frac{6}{21}=\frac27,$ as I intuited.

Thomas Andrews
  • 186,215
  • +1. I suspect you can show that you might be able to show $p_n = \frac27 +o(0.75^n)$ so $\frac27 -0.75^n < p_n < \frac27 +0.75^n$ for large enough $n$ and perhaps for all $n$ – Henry Sep 24 '24 at 15:25
  • Yeah, wasn't sure how big the other $b_i$ might get, so wasn't sure about an explicit bound. @Henry – Thomas Andrews Sep 24 '24 at 15:28
  • 1
    As an arbitrary example, $p_{32} \approx 0.2857254$ while $\frac27 \approx 0.2857143$ and the difference is about $0.72^{32}$ – Henry Sep 24 '24 at 15:31