5
$\begingroup$

What is the expected number of rolls of a 6-sided die until the sum exceeds 6?

As the expected value of one roll is 3.5, why is the answer not just $\frac{6}{3.5}$?

$\endgroup$
5
  • 5
    $\begingroup$ (Dice is plural. You have one die.) For a sum of 7 or more, the simple formula would give exactly 2 expected rolls. But that case always requires at least 2 rolls, and sometimes takes more, so the expected value for that case is definitely more than 2. $\endgroup$
    – aschepler
    Nov 15, 2023 at 22:01
  • $\begingroup$ @aschepler (That might have been true long ago, but by now "dice" as singular is so prevalent it can no longer be seen as incorrect.) $\endgroup$
    – Arthur
    Nov 15, 2023 at 22:18
  • 1
    $\begingroup$ I just go for the pluras dices. And the singular douse. $\endgroup$
    – copper.hat
    Nov 15, 2023 at 22:23
  • $\begingroup$ @Arthur: I agree with you about informal usage of the word "dice", but if you are writing up mathematics it is good idea to be a little more careful as you will irritate a lot of readers by not making a useful distinction. $\endgroup$
    – Rob Arthan
    Nov 15, 2023 at 22:37
  • $\begingroup$ Note that when the expected value of $X$ is $E[X]$, it doesn't mean that the expected value of $1/X$ is $1/E[X]$. For instance, consider a die that rolls $1000$ with probability $1/1000$, and zero otherwise. Its expected value is $1$. How many rolls do you expect to need to exceed $5$? $10$? $100$? $\endgroup$
    – mjqxxxx
    Nov 16, 2023 at 1:44

1 Answer 1

4
$\begingroup$

You have to roll the 🎲 at least once. You'll get some $j\in\{1\ldots 6\}$, and in each such case you'll reduce the total sum you want to achieve by $j$. Each such case has equal probability of occuring $\frac 1 6$.

Therefore, the total expected value is 1 (the first roll) plus the average of the expected values for reaching the reduced total sum in each subcase.


In symbols, if $E_n$ is the expected number of rolls for achieving sum $n$, the previous sentence reads $$E_n = 1+\frac 1 6 \sum_{j=1}^6E_{n-i}.$$ In the bottom of this recurrence, when $n\le 0$, then $E_n=0$ because you don't have to toss the 🎲 at all to achieve a non-positive sum (the sum is $0$ before any rolls). From here on, I'd pick a calculator/compute by hand $E_1,E_2,\ldots$ until $E_7$.


As @DanielMathias mentioned in the comments, initially, the sequence seems to behave like $(7/6)^{n-1}$. From 8 on, though, it does not:

$$E_{1}=1, E_{2}=\frac{7}{6}, E_{3}=\frac{49}{36}, E_{4}=\frac{343}{216}, E_{5}=\frac{2401}{1296}, E_{6}=\frac{16807}{7776}, E_{7}=\frac{117649}{46656}, E_{8}=\frac{776887}{279936}, E_{9}=\frac{5111617}{1679616}, E_{10}=\frac{33495175}{10077696}, E_{11}=\frac{218463217}{60466176},$$ or in decimal: $$E_{1}=1.00,E_{2}=1.17,E_{3}=1.36,E_{4}=1.59,E_{5}=1.85,E_{6}=2.16,E_{7}=2.52,E_{8}=2.78,E_{9}=3.04,E_{10}=3.32,E_{11}=3.61,E_{12}=3.91,E_{13}=4.20,E_{14}=4.48,E_{15}=4.76,E_{16}=5.05,E_{17}=5.33,E_{18}=5.62,E_{19}=5.91,E_{20}=6.19.$$ If you want to play with some Haskell: https://ideone.com/GthHDs

$\endgroup$
8
  • $\begingroup$ I was too lazy to compute by hand so I asked chatgpt to do it. Entering the recurrence and the initial condition + asking to perform the 7 computations manually lead it to the answer of $\frac{1543}{648}\approx 2.38$, which of course has to be triple-checked. Let me know if you get the same result! $\endgroup$
    – Al.G.
    Nov 15, 2023 at 23:00
  • $\begingroup$ @ALG that cannot be the answer. The probability of less than 2 rolls is 0, and the probability of 2 rolls is 7/12. Since you have a probability of 5/12 of taking at least 3 rolls, it has to be bigger than what you have. $\endgroup$
    – Paul
    Nov 15, 2023 at 23:10
  • $\begingroup$ Yes, it did some blatant errors with the fractions. I ran a program now and got $\dfrac{117649}{46656}\approx2.52$. $\endgroup$
    – Al.G.
    Nov 15, 2023 at 23:28
  • 1
    $\begingroup$ It should not come as a surprise that the expected number of rolls is $\left(\frac76\right)^6$ $\endgroup$ Nov 15, 2023 at 23:30
  • $\begingroup$ But if we wanted to find the expected rolls to get a sum of 7, would it simply be 2? $\endgroup$
    – Anon
    Nov 15, 2023 at 23:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .