# Interview Question: Expected value of dice game where each subsequent roll determines number of dice sides

Consider the following game:

You are playing a game where you roll a die and earn \$1 each time you roll higher than 1. For the first roll you get a 4 sided die, and for each subsequent roll you get a die with a number of sides equal to your previous roll. What is the largest amount of dollars you are willing to pay to play this game.

My thought process:

For the first roll the expected value is $$(3/4) * 1 + 0*(1/4) = 0.75$$. For the second roll I either have a 2, 3, or 4 sided dice. Payouts for each case would be 0.5, 0.66, and 0.75 respectively. And similar logic for subsequent rolls, but I am not sure how to combine all this information to get the expected value of the game.

• "Dice" is the plural of "die." To answer your question, solve it recursively. Hint: en.wikipedia.org/wiki/Harmonic_number exhibits the same recursion. This has an intriguing connection to the Coupon Collector problem.
– whuber
Commented Aug 22, 2023 at 22:51
• Is this a question from a course or textbook? If so, please add the self-study tag & read its wiki. Commented Aug 23, 2023 at 6:33

Let $$X(n)$$ be the expected gain of the game if you start with $$n$$-side die. Then (assuming you do not have any discounting of future payoffs): $$X(2) = 0.5(1+X(2)) + 0.5*0 \implies X(2) = 1.$$ $$X(3) = 1/3(1+X(3)) + 1/3(1+X(2))+1/3*0 = 1/3(1+X(3))+2/3 \implies X(3) = 3/2.$$ Finally, $$X(4) = 1/4(1+X(4))+1/4(1+X(3))+1/4(1+X(2))+1/4*0 = 1/4(1+X(4))+5/8+1/2 \implies X(4) = 11/6$$.