Dice game, how to maximize winnings

combinatoricsdicegambling

Here is a question I've been struggling to solve. We're playing a game with $1$ die. If I roll a $1$, $2$, $3$, or $4$, I get a dollar and can roll again. If I roll a $5$ or $6$, the game ends and I lose all my winnings so far. I can select to stop playing and keep my winnings whenever. What's the expected value of money I'll make if I play with a strategy that maximizes my expected winnings?

Isn't this just $2/3$? I have a $2/3$ chance of winning a dollar and $1/3$ chance of ending the game and losing everything on each turn, so shouldn't it just be $2/3$?

Best Answer

If you play once you get $2/3$ of a dollar. If you play twice you either get two dollars or nothing, so the expected winnings are $(2/3)^2\times2=\$8/9$. If you play three times the expected winnings are $(2/3)^3\times 3=\$8/9$. If you play four times you get $(2/3)^4\times 4=\$64/81<\$8/9=\$72/81$. So the best strategy seems to be to play twice or three times.

Let $$f(x)=x(2/3)^x=x \exp(\log(2/3)x)$$ then $${df\over dx}=(1+x\log(2/3))\exp(\log(2/3)x)$$ which has a critical point when $x=-1/\log(2/3)\approx2.5$, which turns out to be a maximum from graphing.