What is the probability of rolling two 5s or better with 5 dice?

965 Views Asked by At

Preamble

My question is in the context of a dice game called 31. You have 6 dice and the goal is to have the highest score. If you roll 36, you score 6 points. If you roll 35 you score 5 points and so on up until 30, where you break even. At 29 you lose 1 points and so on.

You roll all the dice at once and after each roll you need to keep at least 1 die on the table. So you roll a maximum of 6 times.

Question If your first roll gives you 6-5-5-x-x-x (where the Xs ≤ 4), what is the probability of getting at least two 5s if you roll five dice (excluding the 6 that you keep). By "at least two 5s" I mean that 5-5-x-x-x is the bottom of the range and 6-6-6-6-6 is the top of the range.

The question could also be worded "On the 2nd roll, do you keep the 5s and roll 3 dice or do you roll them?"

Thanks.

As to add more clarification to the rules of the games, here's a good exemple provided by @Brams28 int the comment

[...]a roll is rolling all the dice you still have left. You have to keep at least one die after each roll, but a single die could potentially be rolled 6 times. Example: I roll 6,5,4,3,2,1 on the first roll. I decide to keep the 6 and the 5 but reroll the 4 others. Now I get 5,2,2,1. I keep the 5 and reroll the other 3. Now I get 6,3,1. I keep the 6 and reroll the last two. I get 5,4. OK, I keep those two (of course!)

2

There are 2 best solutions below

3
On BEST ANSWER

To determine optimal strategy, I'll start from the end.

With the option of keeping/rerolling one die (i.e. the first five are 'locked in') we keep $\ge4$ and reroll $\le3$ because the expected value $EV_1$ of one $d_6$ is $3.5$

For the option of keeping/rerolling two dice, we need to determine the EV of two $d_6$ with subsequent reroll. To do this, we look at all possible outcomes of two dice and apply the optimal strategy for rerolling one die. \begin{matrix} 6+6&6+5&6+4&6+\color{red}3&6+\color{red}2&6+\color{red}1\\ 5+6&5+5&5+4&5+\color{red}3&5+\color{red}2&5+\color{red}1\\ 4+6&4+5&4+4&4+\color{red}3&4+\color{red}2&4+\color{red}1\\ \color{red}3+6&\color{red}3+5&\color{red}3+4&3+\color{red}3&3+\color{red}2&3+\color{red}1\\ \color{red}2+6&\color{red}2+5&\color{red}2+4&\color{red}2+3&2+\color{red}2&2+\color{red}1\\ \color{red}1+6&\color{red}1+5&\color{red}1+4&\color{red}1+3&\color{red}1+2&1+\color{red}1\\ \end{matrix} The red numbers are those that we reroll. Replace them with $EV_1=3.5$ and sum each outcome. \begin{matrix} 12&11&10&9.5&9.5&9.5\\ 11&10&9&8.5&8.5&8.5\\ 10&9&8&7.5&7.5&7.5\\ 9.5&8.5&7.5&6.5&6.5&6.5\\ 9.5&8.5&7.5&6.5&5.5&5.5\\ 9.5&8.5&7.5&6.5&5.5&4.5 \end{matrix} Add all these together and divide by $36$ and we get $EV_2=\frac{296.5}{36}\approx8.236$

Now, for optimal strategy we note that keeping a $5$ and rerolling the second die $\le3$ gives us an $EV$ of $8.5>EV_2$, so this is good. Also, keeping a $4$ and rerolling the second die $\le3$ gives us an $EV$ of $7.5<EV_2$, so this is not good. Finally, keeping $4\ 4$ gives us $8<EV_2$, so rerolling both dice gives us a slight advantage.

Likewise, we find the optimal strategy for the option of keeping/rerolling three dice by examining all $216$ possible outcomes and apply our optimal strategy for two dice to each. The result is $EV_3\approx13.425$. Now keeping a $5$ and rerolling the other two dice $\le4$ gives us $5+EV_2=13.236$, which is less than $EV_3$ so our optimal strategy is to reroll all three dice unless we have at least two $5$s, then we reroll the third die $\le3$.

Through simulation, I found $EV_4>18.8$, so optimal strategy would be to reroll all four dice unless we already have $5\ 5\ 5\ 5 =20$ or $5\ 5\ 5\ 4=19$

I also found $EV_5>24.4$, so optimal strategy would be to reroll all five dice unless we have five $5$s.

Finally, with optimal strategy throughout, $EV_6>30.1$ for a full round. The creators of this game likely knew this, with a positive score earned only if you exceed this $EV$.

0
On

I don't think the answer to first question is much help in answering the second, and I agree with Daniel Mathias's answer to the second—namely that you should roll all 5 dice. If you do that, and play optimally thereafter, your expected score will be $6 + \frac{8,569,700}{350,699} - 30 \approx 0.44$.

If you keep the 6 and one of the 5s, roll the remaining four dice and play optimally thereafter, your expected score will be $6 + 5 + \frac{989,065}{52,488} - 30 \approx -0.16$.

If you keep the 6 and both 5s, roll the remaining three dice and play optimally thereafter, your expected score will be $6 + 5 + 5 + \frac{13,049}{972} - 30 \approx -0.58$.

If you roll $d$ dice, they show the numbers $m_1 \ge m_2 \ge \dots \ge m_d$, and you decide to keep $k$ of them and roll the remaining $d-k$ (where $1 \le k \le d$), then then the ones you should keep are obviously those showing $m_1, m_2, \dots , m_k$. If you play optimally thereafter, your expected final sum will be $ES_{d,k} = m_1 + m_2 + \dots + m_k + EV_{d-k}$, where $EV_i$ (to purloin Daniel's notation) represents the maximum expected sum you can obtain by proceeding optimally with $i$ dice. Your optimal strategy is therefore to choose the value of $k$ for which $ES_{d,k}$ is a maximum. We therefore get the following recursive equation for the value of $EV_d$: $$EV_d = \sum_{\mbox{all $d$-tuples of die faces}} \frac{\max_{1\le k \le d}\left(ES_{d,k}\right)}{6^d} \ \ \ .$$ Using a Math Studio script to compute the values of $EV_d$ for $d=3 \mbox{ to } 6$ (the values $d = 1$ and $2$ are trivial to do by hand), I obtained the following: \begin{eqnarray} EV_1 &=& \frac{7}{2} \\ EV_2 &=& \frac{593}{72 }\approx 8.236\\ EV_3 &=& \frac{13,049}{972} \approx 13.425\\ EV_4 &=& \frac{989,065}{52,488} \approx 18.844\\ EV_5 &=& \frac{8,569,700}{350,699} \approx 24.436\\ EV_6 &\approx& 30.152\ \ , \end{eqnarray} thus confirming Daniel's analysis.

Edit:

It's probably worth giving the following fairly simple explicit description of an optimal strategy.

If you throw the numbers $j_1, j_2, \dots , j_d$ when you throw $d$ dice,

  • list those numbers in decreasing order as $m_1, m_2, \dots , m_d$;

  • calculate the quantites \begin{eqnarray} S_0 &=& \sum_{i=2}^d m_i ,\\ S_k &=& EV_k + \sum_{i=2}^{d-k} m_i \mbox{ for $k= 1, 2, \dots , d-2$ , and}\\ S_{d-1} &=& EV_{d-1} ; \end{eqnarray}

  • determine the value $k^*$ of $k$ for which $S_k$ achieves its maximum value;
  • If $k^* = 0$, keep all the dice and don't throw any more. Otherwise, keep the $d-k^*$ dice $m_1, \dots , m_{d-k^*}$ and throw the $k^*$ dice $m_{d+1-k^*}, \dots , m_d$ .