Daniel will roll a fair, six-sided die until he gets a 4. What is the expected value of the highest number he rolls through this process?

It seems the expected number of rolls is 6. Can we reword this question to what is the expected value of the maximum of 6 die rolls?

  • $\begingroup$ I think we may answer this using Order Statistics for the Geometric Distribution $\endgroup$
    – MSIS
    Nov 14, 2022 at 3:12
  • $\begingroup$ Intuition: Let $f(n)$ be the answer to the first problem (with ending-number $n$) and $x$ the answer to the second problem. $f(n)$ is clearly increasing. So it cannot be always equal to $m$. It remains to show whether they can be equal. It seems an interesting problem to calculate them exactly. $\endgroup$ Nov 14, 2022 at 3:14
  • 1
    $\begingroup$ To see that the problems are different, suppose you were looking for a $1$ instead of a $4$. $\endgroup$
    – lulu
    Nov 14, 2022 at 3:33
  • 2
    $\begingroup$ To solve the original problem, note that there are only three possible answers in any given trial...$4,5$ and $6$. If you see a $6$ before you see a $4$, you get $6$. If you see a $5$ before you see either a $4$ or a $6$ then you get either $5$ or $6$ with equal chances (why?) and if you haven't seen any of $4,5,6$ then you have an equal chance of seeing any of those three first. $\endgroup$
    – lulu
    Nov 14, 2022 at 3:35

3 Answers 3


To summarize the discussion in the comments:

In any given trial, the answer must be $k\in \{4,5,6\}$. Any other tosses are irrelevant. Let $p_k$ be the probability that the result is $k$.

$p_4=\frac 13$ since you see $4,5$ or $6$ first with equal probability.

$p_6=\frac 12$ since you see $6$ before $4$ with probability $\frac 12$.

$p_5=\frac 16$ since the only sequence which results in $k=5$ is $5,4,6$. That is to say, the only way to get $k=5$ is to see $5$ before either $4$ or $6$ and then to see a $4$ before a $6$.

Thus the answer is $$E=4\times \frac 13+5\times \frac 16 +6\times \frac 12=\frac {31}6=5.1\overline 6$$


Consider a 2 sided fair die (sides marked 1 and 2) as a counter example. The expected number of rolls until you get a 1 (or a 2) is 2 (as this experiment is representable by a geometric random variable with parameter $p = \frac12$, so the expectation is $\frac1p = 2$).

Let $M$ be the max of 2 dice rolls.

Then $E[M] = 1*P(M=1) + 2*P(M=2) = \frac14 + 2(1-P(M=1)) = \frac14 + 2(1 - \frac14) = \frac74 \neq 2.$

Although the number of sides on this dice is different than in your example, the same reasoning can be used in the case where the number of sides is 6 to show that the suggested rewording is not equivalent.


Let $P(6)$ denote the probability of getting a $(6)$ before the first $(4)$.

Let $P(5)$ denote the probability of getting a $(5)$ before the first $(4)$ and simultaneously, not getting a $(6)$ before the first $(4)$.

Then, the computation for the expected value of the highest roll is

$$4 +~ \left[ ~2 \times P(6) ~\right] ~+~ \left[ ~1 \times ~P(5) ~\right]. \tag1 $$

$$P(6) = \frac{1}{6} + \left[\frac{4}{6}P(6)\right] \implies \frac{2}{6}P(6) = \frac{1}{6} \implies P(6) = \frac{1}{2}.$$

$$P(5) = \frac{1}{6} + \left[\frac{3}{6}P(5)\right] \implies \frac{3}{6}P(5) = \frac{1}{6} \implies P(5) = \frac{1}{3}.$$

Thanks to lulu, for her comment, immediately following this posting, which indicated a flaw in the above analysis, pertaining specifically to the computation of $P(5).$

$\color{red}{\text{The above analysis is wrong because:}}$

The above equation assumes that if the first roll is a $(5)$, that it is game over, and that the high roll will be a $(5)$. This overlooks the fact that the die rolls do not stop, if the first roll is a $(5)$.

Instead, the die rolls continue, and by the already computed $P(6)$, (1/2) the (subsequent) time, there will be a $(6)$ before the $(4)$.

Therefore, the correct equation for $P(5)$ is

$$P(5) = \left[ ~\frac{1}{6} \times \left( ~1 - P(6) \right) ~\right] + \left[\frac{3}{6}P(5)\right] \implies $$

$$\frac{3}{6}P(5) = \left[\frac{1}{6} \times \left( ~1 - \frac{1}{2} ~\right) ~\right] \implies P(5) = \frac{1}{6}.$$

As indicated in the comment of lulu, an alternative (less convoluted) approach is to:

  • Let $P(4)$ denote the probability that the high roll will be $(4)$.

  • Recognize that $P(4) + P(5) + P(6) = 1$.

  • Recognize that

    $\displaystyle P(4) = \frac{1}{6} + \left[\frac{3}{6}P(4)\right] \implies \frac{3}{6}P(4) = \frac{1}{6} \implies P(4) = \frac{1}{3}.$

Plugging these $\color{red}{\text{now corrected}}$ results back into (1) above, the computation of expected value becomes

$$4 +~ \left[ ~2 \times \frac{1}{2} ~\right] ~+~ \left[ ~1 \times \frac{1}{6} ~\right] = \frac{31}{6}. $$

  • 1
    $\begingroup$ This is not quite correct. $P(5)$ is $\frac 16$....the only way for the result to be a $5$ is if you see a $5$ before either $4$ or $6$ and then you see a $4$ before the $6$. Alternatively, note that $P(4)$ is clearly $\frac 13$ and $P(4)+P(5)+P(6)=1$. $\endgroup$
    – lulu
    Nov 14, 2022 at 12:29
  • $\begingroup$ @lulu +1 : Good catch, thanks. Answer edited. Please leave your comment intact. $\endgroup$ Nov 14, 2022 at 20:53

You must log in to answer this question.

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