0

I was recently asked this question in an interview. I was able to solve it for two rolls but could not solve it for three or more rolls.

You toss a die and after seeing the outcome, and you are told that you could toss it one more time if you want, with your aim beings to maximize the expected outcome. Under what circumstances would you throw the die a second time? Similarly, what if you are given three trials? If you get 1000 such trials, what would it be?

Just to be clear if you choose to throw the second die then the number on the first die will be discarded and the number on the second die would be taken into account. So when we solve for two die then it comes out that wee should roll the second die only when the number on the first die was 1,2 or 3

  • 1
    To be clear: if you roll again, you discard the prior rolls, yes? Assuming that, what are your thoughts? Note that your expected outcome on a single toss is $3.5$...when do you think you should roll a second time? (given that you must accept the second toss if you make it). – lulu Aug 31 '19 at 17:21
  • 1
    @saulspatz Well, you'd roll again because the expected value of the second toss exceeds $3$. Assuming your strategy is "roll again on $3$ or lower, stand on anything greater" then your expected outcome is $6,5,4$ with probability $\frac 16$ each and $3.5$ with probability $\frac 12$, making the expected value $4.25$ in the one time option case. – lulu Aug 31 '19 at 17:34
  • 1
    @saulspatz continuing: now that we know the expected value of the single option game is $4.25$ we can solve the two option case. That time, of course, we should stand on $5,6$ but roll on $4$ or less, since we expect to do better than $4$ if we move to the single option case. And so on. – lulu Aug 31 '19 at 17:37
  • Just to be clear if you choose to throw the second die then the number on the first die will be discarded and the number on the second die would be taken into account. So when we solve for two die then it comes out that wee should roll the second die only when the number on the first die was 1,2 or 3 – MRIDUL SHARMA Aug 31 '19 at 17:38
  • @MRIDULSHARMA Thanks for the clarification. Probably a good idea to edit your post to reflect that, though I think most readers would guess that this was the rule. Do you understand the comments I made to saulspatz? They essentially explain how to solve this problem recursively, on the number of options you have. – lulu Aug 31 '19 at 17:42
  • The intuition is that if I have the chance to roll many times(say 1000) then I would only stop when I get 6 on some dice. Because I am pretty sure that in later rolls of dice I would get one 6 at least. – MRIDUL SHARMA Aug 31 '19 at 17:55
  • @saulspatz Not following. The OP states that the goal is "to maximize the expected outcome". I don't see any ambiguity in that. Am I missing something? – lulu Aug 31 '19 at 18:10
  • @MRIDULSHARMA That's a good instinct, but of course you need hard numbers. For instance...it's not intuitively clear how many options you need before you'd want to throw away an initial $5$. I get five options for that, but I did the recision hastily so I am not certain. – lulu Aug 31 '19 at 18:12
  • @saulspatz With your values, I'd take every option until I got the big number. My expectation on the next toss is always far greater than what I have (unless I'm sitting on the big value). – lulu Aug 31 '19 at 18:13
  • @lulu Yes, I just re-read it and you are right. It's completely unambiguous. Can't imagine what I was thinking. – saulspatz Aug 31 '19 at 18:17
  • @saulspatz no worries. – lulu Aug 31 '19 at 18:19
  • Related: https://math.stackexchange.com/questions/3334331/classic-quantitative-trading-interview-probability-question-whats-wrong-with-m – David K Aug 31 '19 at 20:17

1 Answers1

2

For $n≥0$ let $E_n$ be the expected value, under optimum play, of the game given that you have exactly $n$ options.

Clearly $E_0=3.5$ as you are compelled to take whatever you get on the first (and only) roll.

Given that, we can easily compute $E_1$. The optimal strategy is clear...sit on $4,5,6$ and roll again on $1,2,3$. After all, you should only roll again if you expect to do better than what you have. It follows that $$E_1=\frac 16 \times (4+5+6)+\frac 12\times 3.5 =4.25$$

Now, to get $E_2$ we see that strategy must change. This time we'd reject an inital $4$ since we expect to do better than that going forward. Thus $$E_2=\frac 16\times (5+6)+\frac 46\times 4.25 = 4.\overline 6$$

This continues for a bit. Specifically, it continues until we get a value over $5$ at which point our strategy changes. We get that $$E_3=4.9\overline 4=\frac {89}{18}\quad \&\quad E_4=\frac {277}{54}\approx 5.13$$

At this point our strategy changes. If $n≥5$ we must reject an initial $5$, hence for $n≥5$ the recursion becomes $$E_{n+1}=\frac 16\times 6 +\frac 56\times E_n$$

So it is easy to compute $E_n$ for quite large values of $n$. Indeed we can solve that recursion explicitly to get $$E_n=6-\frac {6768}{3125}\times \left(\frac 56\right)^n$$ for $n≥4$.

lulu
  • 70,402