## Six roll dice game

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

DataGenetics
Posts: 24
Joined: Sat Jan 01, 2011 1:12 am UTC
Location: Seattle

### Six roll dice game

A casino offers the following game: You are allowed to roll a regular (fair) die up-to six times. At any time you can "bank" and are paid-out the dollar amount shown on the die (and the game stops). However, there's no going back if you elect to carry on rolling (If you don't "bank" any time in the first five rolls, you *have* to take whatever you get on the sixth roll).

Question: How much would you pay to play this game? (ie What is the expected outcome?). What is the optimal stopping strategy?

Posts: 455
Joined: Fri Nov 28, 2014 11:30 pm UTC

### Re: Six roll dice game

Spoiler:
Suppose you rolled the value n on your kth roll. The probability you will roll something better if you continue is:
1-(n/6)6-k
In theory, if that probability is greater than 0.5, it would be advantageous to continue. However, because the sample size is small, you might opt for a higher threshold.
This is a block of text that can be added to posts you make. There is a 300 character limit.

ConMan
Shepherd's Pie?
Posts: 1690
Joined: Tue Jan 01, 2008 11:56 am UTC
Location: Beacon Alpha

### Re: Six roll dice game

Spoiler:
Suppose you rolled the value n on your kth roll. The probability you will roll something better if you continue is:
1-(n/6)6-k
In theory, if that probability is greater than 0.5, it would be advantageous to continue. However, because the sample size is small, you might opt for a higher threshold.

Spoiler:
It's better to look at expected values, if you're trying to maximise your average payout. So you should only go for the sixth roll if the expected payout is higher than the number you get on the fifth roll, for example.
pollywog wrote:
Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.
I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.

Posts: 455
Joined: Fri Nov 28, 2014 11:30 pm UTC

### Re: Six roll dice game

In the case of infinite games, just quit the instant you roll a profit and pay the lowest entry fee you can. Even the most optimal strategy will have the possibility of losing the bird in hand. Only gamble to avoid a loss.
This is a block of text that can be added to posts you make. There is a 300 character limit.

Jeff_UK
Posts: 67
Joined: Sat Nov 03, 2007 10:38 pm UTC

### Re: Six roll dice game

Well..I'd play it if the buy-in was no more than \$5.42 and my strategy would be:
Spoiler:
'Stick' on:
Roll:Minimum
1:6
2:6
3:6
4:6
5:ANY

My simulations show that this will give you a profit...I have no idea why though... it might not be optimal
In other words, the Casino should set the buy-in to \$5.43, which would probably discourage most people from playing as it seems unfairly high...
"Please only print this post if you really need to"
...hmm....I wonder how much extra energy is required to generate that request...We need a cost/benefit analysis, STAT!

SDK
Posts: 701
Joined: Thu May 22, 2014 7:40 pm UTC

### Re: Six roll dice game

Yes, this would make for a terrible casino game.
The biggest number (63 quintillion googols in debt)

Tirear
Posts: 36
Joined: Fri Feb 05, 2016 5:42 pm UTC

### Re: Six roll dice game

After working backwards from the last roll, I came to the following answer:
Spoiler:
Stop if the first roll is atleast a 6, the second to fourth is a 5, or the fifth is a 4.
Expected payout is 1709/324, or about \$5.27.
As for how much I would pay, \$5.
1. I need some profit margin.
2. Although I like to combine multiple outcomes into a fraction, the actual payouts are whole dollar values, so making the fee a round value is very convenient.
3. Preliminary analysis said the greedy strategy averages just under \$5, so this is the lowest price I can expect the house to possibly accept.

Posts: 455
Joined: Fri Nov 28, 2014 11:30 pm UTC

### Re: Six roll dice game

I think Jeff's answer makes sense.
Spoiler:
The rolls are independent so it doesn't matter if you rolled 0 times or 5 times before. The fact of the matter is you have a total of six trials to get a desirable value.

The probability of there being at least one 6 is: P6 = 1-(5/6)^6 = ~0.6651
The probability of no 6, but at least one 5 is: P5 = ((5/6)^6)(1-(4/5)^6) = ~0.2471
The probability of no {6,5}, but at least one 4 is: P4 = ((4/6)^6)(1-(3/4)^6) = ~0.0722
etc.

After crunching the numbers, I get an expected revenue of about 5.56. So an entry fee of 5.42 would indeed yield a profit over large number of games.
This is a block of text that can be added to posts you make. There is a 300 character limit.

Cauchy
Posts: 602
Joined: Wed Mar 28, 2007 1:43 pm UTC

### Re: Six roll dice game

Spoiler:
The rolls are independent so it doesn't matter if you rolled 0 times or 5 times before. The fact of the matter is you have a total of six trials to get a desirable value.

The probability of there being at least one 6 is: P6 = 1-(5/6)^6 = ~0.6651
The probability of no 6, but at least one 5 is: P5 = ((5/6)^6)(1-(4/5)^6) = ~0.2471
The probability of no {6,5}, but at least one 4 is: P4 = ((4/6)^6)(1-(3/4)^6) = ~0.0722
etc.

After crunching the numbers, I get an expected revenue of about 5.56. So an entry fee of 5.42 would indeed yield a profit over large number of games.

But if you roll a 5 early, do you stop there, or continue going? If you stop, you can't average in the chance you get a 6 later. If you keep going, then you can't count that 5. Either way, your expected value is lower. Specifically, if you get rolls of 5, 5, 5, 5, and 5, do you discard that last 5, or bank it? If you discard it, you have to count the case 5, 5, 5, 5, 5, 1 as a 1 instead of a 5. If you keep it (or any of the previous 5's), you have to count 5, 5, 5, 5, 5, 6 as a 5 instead of a 6. Either way, your expected value will be lower than what you calculated.

What you calculated is the expected value of the maximum roll out of the 6, but due to imperfect information, you won't be able to always stop on that maximum roll when it comes up: you'll either pass it up sometimes, or have stopped earlier sometimes.

Spoiler:
Let G_n be the game where you roll the die up to n times, opting at each point to bank your current value or discard it and keep going, and let E_n be the expected payout of G_n. Then, we are playing G_6, and looking for E_6.

It is not too hard to see that G_1 is "roll a die, and you get what comes up" and, for n >= 1, G_{n+1} is "roll a die, then either take its value, or discard it and play G_n". There's no decision in G_1, and the decision in G_{n+1} is easy when phrased this way: bank the roll if it's at least E_n, and discard it and play G_n otherwise. As such, we can calculate E_{n+1} by knowing E_n.

E_1 is 7/2, clearly. Note that 3 < 7/2 < 4.
In G_2, you'll want to discard the value you roll if it's less than 7/2, and bank it otherwise. Then, on rolls of 1, 2, or 3, your expected value is 7/2, and on 4, 5, or 6, you scored whatever you rolled. So E_2 = (1/6)(7/2 + 7/2 + 7/2 + 4 + 5 + 6) = 17/4. Note that 4 < 17/4 < 5.
E_3 can be calculated in a similar fashion. You discard rolls of 1, 2, 3, and 4, since they're less than 17/4, and bank rolls of 5 and 6, so E_3 = (1/6)(17/4 + 17/4 + 17/4 + 17/4 + 5 + 6) = 14/3. Note that 4 < 14/3 < 5.
In G_4, you then discard a 1, 2, 3, or 4, so E_4 = (1/6)(14/3 + 14/3 + 14/3 + 14/3 + 5 + 6) = 89/18. Note that 4 < 89/18 < 5.
E_5 = (1/6)(89/18 + 89/18 + 89/18 + 89/18 + 5 + 6) = 277/54. Note that 5 < 277/54 < 6.
Finally, E_5 > 5, so in G_6, we want to discard our roll unless we get a 6. Then, E_6 = (1/6)(277/54 + 277/54 + 277/54 + 277/54 + 277/54 + 6) = 1709/324, and this is the expected value of G_6, as we were looking for.
(∫|p|2)(∫|q|2) ≥ (∫|pq|)2
Thanks, skeptical scientist, for knowing symbols and giving them to me.

jasondrake
Posts: 7
Joined: Fri May 16, 2014 7:06 pm UTC

### Re: Six roll dice game

Fun!

Spoiler:
First, definitions (for convenience):

EV6 = The expected value of taking the 6th roll. If you choose to take the 6th roll, this is of course independent of everything prior, and is equal to 3.5.

EV5 = The expected value of taking the 5th roll.

EV4 = Expected value of the 4th roll.

EV3 = EV 3rd roll

EV2 = EV 2nd roll

EV1 = EV starting the game. This is what we want to solve.

Now we just work it in reverse.

(I know my numbering system is backwards for solving the general problem, but it's more intuitive this way.)

* * * * * * *

Because we know EV6 = 3.5, we'll choose to keep the 5th roll if it's 4 or higher, which includes a 1/6 probability of 4, a 1/6 probability of 5, and a 1/6 probability of 6.

Ergo,

EV5 = 4/6 + 5/6 + 6/6 + (EV6 * 3)/6 = (4 + 5 + 6 + 3.5 + 3.5 + 3.5) / 6 = 4.25

* * *

Because we know EV5 = 4.25, we'll choose to keep the 4th roll if it's a 5 or higher.

EV 4 = 5/6 + 6/6 + (EV5 * 4)/6 = (5 + 6 + 17) / 6 = 14/3 = 4.667

* * *

Because EV4 = 4.667, again we keep the 3rd roll if it's a 5 or higher.

EV3 = 5/6 + 6/6 + (EV4 *4 )/6 = (5 + 6 + 56/3) / 6 = 89/18 = 4.9444

* * *

Because EV3 = 4.94444, we keep the 2nd roll at 5 or higher.

EV2 = 5/6 + 6/6 + (EV3 * 4)/6 = (5 + 6 + [89 * 4]/[18]) / 6 = (5 + 6 + [178/9]) / 6 = (45 + 54 + 178) / 54 = 277/54 = 5.1296296

Finally, EV2 = 5.1296296, so we only keep an initial roll of 6.

EV1 = 6/6 + (EV2 * 5)/6 = 1 + (277 * 5)/(54 * 6) = 1 + 1385/324 = 1709/324 = \$5.27469135802...

* * * * * * *

Now that we know the optimum strategy, we can see how often the die is rolled in each of 6^5 = 7776 games.

1 roll = 1/6 = 1296 games (payoff \$6)

2 roll = 5/6 * 2/6 = 2160 games (payoff \$5 or \$6, average \$5.50)

3 roll = (1 - 1/6 - [10/36]) * 2/6 = 20/36 * 2/6 = 40/216 = 1440 games (payoff \$5 or \$6, average \$5.50)

4 roll = (1 - 1/6 - [10/36] - [40/216]) * 2/6 = ([216 - 36 - 60 - 40]/216) * 2/6 = 160/1296 = 960 games (payoff \$5 or \$6, average \$5.50)

5 roll = (1 - 1/6 - [10/36] - [40/216] - [160/1296]) * 3/6 = ([1296 - 216 - 360 - 240 - 160]/1296) * 3/6 = 960/7776 = 960 games (payoff \$4 or \$5 or \$6, average \$5)

6 roll = (1 - 1/6 - [10/36] - [40/216] - [160/1296] - [960/7776]) * 6/6 = (7776 - 1296 - 2160 - 1440 - 960 - 960)/7776 = 960/7776 = 960 games (payoff \$1-\$6, average \$3.50)

And can double-check the math:

1296 * 6 = \$7776
2160 * 5.5 = \$11880
1440 * 5.5 = \$7920
960 * 5.5 = \$5280
960 * 5 = \$4800
960 * 3.5 = \$3360

Total payoff in 7776 games = \$41,016 = \$5.274691... per game

4056 games will pay \$6
2760 games will pay \$5
480 games will pay \$4
160 games pay \$3
160 games pay \$2
160 games pay \$1

\$24336 + \$13800 + \$1920 + \$480 + \$320 + \$160 = \$41016 (verifying again)

Now I'm getting tired of computing exact fractions. There will be approximately 3.130 die rolls per game.

I was able to roll a die 20 times per minute, taking the minimum time to check the result and proceed according to the outlined strategy. 1200 rolls per hour equates to about 383 games per hour. I figure I'd need frequent breaks to rest my eyes and reset my brain, so I'm going to go with a round 300 games per hour just to be safe.

Now, my current job doesn't pay that well, but it's not particularly difficult. The monotony and constant mental concentration of playing the Six Dice Game all day would be much, much worse. Also unlike my current job, any lapse in concentration would result in being docked pay. On the other hand, I could come in late, miss days whenever I feel like it, and stay overtime whenever I have the energy. I can't expect to avoid income taxes when playing this frequently, and I'll need an additional buffer to account for lost benefits. All in all, I think I'd want \$30/hour to play.

So \$30 profit / 300 games = \$0.10 profit per game

DataGenetics
Posts: 24
Joined: Sat Jan 01, 2011 1:12 am UTC
Location: Seattle

### Re: Six roll dice game

What an awesome and comprehensive answer

Jeff_UK
Posts: 67
Joined: Sat Nov 03, 2007 10:38 pm UTC

### Re: Six roll dice game

I agree, My simulator was flawed! I was taking the 'maximum' as the payout (not because I misunderstood the rules, but because in my first strategy the maximum was always the last roll, I changed the strategy without updating the scoring mechanism)

Spoiler:
With 45,000 iterations, 5.27 always makes a small profit, 5.28 a small loss.

At 5.17, I compute that you will be making around \$40 per hour, and that 5.16 will get you \$30 per hour.
"Please only print this post if you really need to"
...hmm....I wonder how much extra energy is required to generate that request...We need a cost/benefit analysis, STAT!