4

There's this question on 100-sided die probability:

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.

There's an answer here:

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.

Question: Is there a good way to quickly estimate something reasonably close to $87$ without writing a program, using WolframAlpha, or doing a calculation using scratch paper?

Computers
  • 347

2 Answers2

2

Here's an approximate version of the quoted answer, still requiring a bit of scratch paper. Make the following changes to the game:

  • Reduce dollar amounts by a factor of 100.
  • Replace the die with a continuous uniform distribution between $0$ and $1$.
  • Let $c$ be the cost to re-roll. (We'll eventually plug in $c=\frac1{100}$.)
  • Add a cost of $c$ to end the game and collect.

Now if the expected value of the game is $a$, then the expected value of re-rolling is $a-c$, and the value of collecting when the die shows $x$ is $x-c$, so an optimal strategy is to collect when $x\ge a$. This gives

$$\begin{align}a&=\int_0^a(a-c)\,dx+\int_a^1 (x-c)\,dx\\&=\left(\int_0^a a\,dx\right)+\left(\int_a^1 x\,dx\right)-\left(\int_0^1 c\,dx\right)\\&=a^2+\frac{1-a^2}2-c.\end{align}$$

Multiplying by 2 and completing the square, we get $(1-a)^2=2c$, so $a=1-\sqrt{2c}$. When $c=\frac1{100}$, this gives $a=1-\frac1{10}\sqrt2\approx1-.14=.86$. As a final adjustment, we can refund the $.01$ collection charge, giving an expected value for the game of $.87$.

Karl
  • 12,752
2

Here's another way: As in my other answer, reduce the dollar values by a factor of 100 and change the re-roll cost to $c$. Notice that an optimal strategy is to re-roll until we get a number above some threshold $1-p$.

The probability of stopping on any given roll is $p$, so the expected number of rolls is $\frac1p$, so the approximate total cost of all re-rolls is $\frac cp$. The expected value of the final roll is $1-\frac p2$, so the total value of the game is $v=1-\frac p2-\frac cp$. The optimal strategy corresponds to the value of $p$ that maximizes this, which we find (by setting $\frac{dv}{dp}=0$) to be $p=\sqrt{2c}$, giving $v=1-\sqrt{2c}$. Plugging in $c=\frac1{100}$, we get $v\approx0.86$.

Karl
  • 12,752
  • 1
    I think this is the expected solution. I don't think most people could do this without scratch paper. – Ross Millikan Jan 03 '23 at 04:49
  • I agree. Maybe it's a little simpler without my re-scaling: roll until you get one of the top $k$ values, so the expected value of the game is $n-\frac {k-1}2-\frac 1{k/n}$. The optimization step still required scratch paper for me, though. – Karl Jan 03 '23 at 04:55