The question is as follows: You are given a 100-sided die. After you roll once, you can choose to either get paid the dollar amount of that roll OR pay one dollar for one more roll. What is the expected value of the game? There is no limit on number of rolls.

The EV for a 100-sided die roll is 50.5, but the fact that you can pay a dollar for an extra roll complicates things. Not quite sure how to proceed.

  • $\begingroup$ Unless I'm misreading the question, the EV should be infinite. The WORST you can do is an infinite string of {1}s, with probability 0, in which case you end up with $0. However, EVERY other roll you get nets you money. $\endgroup$ – Foo Barrigno Apr 25 '13 at 17:07
  • 3
    $\begingroup$ @FooBarrigno No, the payout is the last value you rolled, not the sum. $\endgroup$ – gt6989b Apr 25 '13 at 17:10
  • $\begingroup$ wouldn't it just be 50? Your EV of the first roll is 50.5 and your EV of the second roll is 49.5 since you've paid a dollar. This problem also has the constraint that you can choose to roll again or keep your money, so doesn't that play in to calculating this stuff? $\endgroup$ – Eleven-Eleven Apr 25 '13 at 17:23
  • $\begingroup$ @gr6968b Ah, that clears it up then. I'm not sure how I missed the words "that roll" in the problem statement. $\endgroup$ – Foo Barrigno Apr 26 '13 at 18:00

If the expected value of this game is $a$, then at a die roll of $X$ you have the choice of either collecting $X$ or paying a dollar and restart, which gives you an expected value of $a-1$. To maximize the expected value, you should take $X$ if $X> a-1$ and start over if $X\le a-1$ (it does not really matter what we do when $X=a-1$). We obtain therefore $$ a = \frac1{100}\left(\lfloor a-1\rfloor\cdot a+\sum_{k=\lfloor a-1\rfloor+1}^{100}k\right) =\frac1{100}\left(\lfloor a-1\rfloor\cdot a+\frac{100\cdot101}{2}-\frac{\lfloor a-1\rfloor \cdot\lfloor a\rfloor}{2}\right). $$ I find numerically (didn't do much code checking, but the results are somewhat plausible) $$a\approx87.3571 $$ which seems to be exactly (and of course the true result must be rational) $$a=87\frac{5}{14}.$$ But I'm sure you can do the justification after the fact, i.e. show that the strategy that consists in continuing until you roll at least $87$ gives you $87\frac{5}{14}$ as expected value.

For your convenience, here is the PARI one-liner:


If an extra roll costs two dollars instead of one, the result would be $$a=82\frac12$$ instead, and with a cost of only $0.1$ dollars it would be $$a=96\frac1{10}.$$

  • $\begingroup$ I get an expected value of 1135/13 = 87.30... for the strategy "Roll until you get higher than 87" and an expected value of 1223/14 = 87.35... for the strategy "Roll until you get higher than 86". This seems to be the best strategy. $\endgroup$ – Charles Apr 25 '13 at 17:55
  • 2
    $\begingroup$ In the equation, why is it $\lfloor a-1 \rfloor a$ and not $\lfloor a-1 \rfloor (a-1)$? As I understand it, $\lfloor a-1 \rfloor$ represents the number of rolls for which we decide to roll again and take an expected value of $a-1$. So why is it the former? $\endgroup$ – MCT Nov 17 '15 at 0:32


If your value now is $X_t$, what is the marginal value of the roll? If you roll $R \sim \mathcal{U}[1,100]$, then if $R > X_t+1$ you gained and if $R \leq X_t+1$, you either lost or became indifferent. So what is the marginal value?


enter image description hereSame puzzle at Expected value of game involving 100-sided die and Let's play a dice game

If the dice shows at least $x+1$ we take take that results else for the dice game; when dice shows x or less we re-throw dice and take a penalty $(x-c)$ where $c=1$ which occurs with probability $x/100,$ so our expectation x is

$$E[X] = E[X|X > x] + x/100 \cdot (E[X] - c)$$ $$x = 1/100 \cdot \sum^{100}_{k=x+1} k + x/100 \cdot (x-c)$$ $$100 \cdot x = \left[\sum^{100}_{k=1} k - \sum^{x}_{k=1} k \right] + x \cdot (x-c)$$ $$100 \cdot x = \left[100 \cdot 101/2 - x \cdot (x+1)/2 \right] + x \cdot (x - c)$$ $$200 \cdot x = 100 \cdot 101 - x \cdot (x+1) + 2 \cdot x \cdot (x - c)$$ $$200 \cdot x = 10100 - x^2-x + 2 \cdot x^2 - 2 \cdot c \cdot x$$ $$0 = x^2 - (201 + 2c) \cdot x + 10100$$

quadratic formula for c=1

$$x_{1/2} = (203 \pm \sqrt(203^2 - 4 \cdot 10100)/2$$ $$x_1 = 0.5 \cdot (203 - \sqrt(809) = 87.27854$$ (ignore $$x_2 = 0.5 \cdot (203 + \sqrt(809)=115.7 > 100)$$

a few special cases for different penalties of c to throw 100-sided dice again, computed in R:

$$f <- function(x,c) {x^2 - (201+2*c)*x + 10100}$$

$$uniroot(f,c(1,100),tol=0.0001,c=0.1) => 96.08781$$ $$uniroot(f,c(1,100),tol=0.0001,c=0.5) => 90.95011$$ $$uniroot(f,c(1,100),tol=0.0001,c=1) => 87.27854$$ $$uniroot(f,c(1,100),tol=0.0001,c=2) => 82.34436$$ $$uniroot(f,c(1,100),tol=0.0001,c=3) => 78.75632$$ $$uniroot(f,c(1,100),tol=0.0001,c=5) => 73.40249$$ $$uniroot(f,c(1,100),tol=0.0001,c=10) => 64.56254$$

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.