Consider a game where you roll one fair dice and are allowed up to three re-rolls to maximize the sum. What is the expected value of the final sum you can achieve using an optimal strategy? For this question, assume that you can't use dynamic programming.
Separately, suppose you have a sequence of independent and identically distributed random variables drawn from a uniform distribution on [0,1]. How many such variables would you expect to sum before the total exceeds 1?
Finally, imagine you want to place bets on a best-of-seven World Series. How would you structure your bets across the games to achieve a target total payoff, assuming you know the probabilities of each team winning each game?
Solution
For the die problem, work backward from the last decision.
Let \(V_k\) be the expected value when you still have \(k\) re-rolls available.
If you have no re-rolls left, then you must keep the roll, so
\[
V_0 = \frac{1+2+3+4+5+6}{6} = \frac{7}{2}.
\]
With one re-roll left, after seeing a value \(x\), you should keep it if
\[
x \ge V_0 = \frac{7}{2}.
\]
So you keep \(4,5,6\) and re-roll \(1,2,3\). Hence
\[
V_1
=
\frac{1}{6}\left(3V_0 + 4 + 5 + 6\right)
=
\frac{1}{6}\left(3\cdot \frac{7}{2} + 15\right)
=
\frac{17}{4}.
\]
With two re-rolls left, you compare the current roll to \(V_1=\frac{17}{4}=4.25\).
So now you keep only \(5,6\), and re-roll \(1,2,3,4\). Thus
\[
V_2
=
\frac{1}{6}\left(4V_1 + 5 + 6\right)
=
\frac{1}{6}\left(4\cdot \frac{17}{4} + 11\right)
=
\frac{14}{3}.
\]
With three re-rolls left, compare to \(V_2=\frac{14}{3}\approx 4.667\).
Again you keep only \(5,6\). Therefore
\[
V_3
=
\frac{1}{6}\left(4V_2 + 5 + 6\right)
=
\frac{1}{6}\left(4\cdot \frac{14}{3} + 11\right)
=
\frac{89}{18}.
\]
So the optimal expected final value is
\[
\frac{89}{18} \approx 4.9444.
\]
The strategy is:
\[
\text{first roll: keep only }5,6,
\]
\[
\text{second roll: keep only }5,6,
\]
\[
\text{third roll: keep only }4,5,6,
\]
and if you reach the last roll, you must keep it.
---
For the uniform \([0,1]\) problem, let
\[
N = \min\left\{n : X_1+\cdots+X_n > 1\right\}.
\]
We want \(\mathbb{E}[N]\).
A very nice identity for nonnegative integer-valued random variables is
\[
\mathbb{E}[N] = \sum_{n=0}^{\infty} \Pr(N>n).
\]
Now \(N>n\) means that after \(n\) draws, the sum is still at most \(1\):
\[
N>n
\iff
X_1+\cdots+X_n \le 1.
\]
For i.i.d. \(U[0,1]\) variables, the probability that
\[
X_1+\cdots+X_n \le 1
\]
is the volume of the simplex inside the unit cube, namely
\[
\Pr(X_1+\cdots+X_n \le 1) = \frac{1}{n!}.
\]
So
\[
\mathbb{E}[N]
=
\sum_{n=0}^{\infty} \frac{1}{n!}
=
e.
\]
Thus the expected number of variables needed before the total exceeds \(1\) is
\[
e \approx 2.71828.
\]
---
For the World Series betting question, the clean way to think about it is as a replication problem on a game tree.
Suppose the series is best-of-seven, and let \(V_{i,j}\) denote the amount of money you want your betting strategy to be worth when Team A has \(i\) wins and Team B has \(j\) wins.
The terminal states are the championship outcomes:
\[
V_{4,j} = \text{payoff if Team A wins the series},
\qquad
V_{i,4} = \text{payoff if Team B wins the series}.
\]
If your target is a fixed total payoff \(K\) no matter who wins, then simply set
\[
V_{4,j}=K,
\qquad
V_{i,4}=K.
\]
If instead you want different payoffs depending on who wins the series, set those terminal values accordingly.
Now consider a nonterminal state \((i,j)\).
Let the probability Team A wins the next game be \(p_{i,j}\), and Team B wins with probability \(1-p_{i,j}\).
If you place a bet of size \(b_{i,j}\) on Team A in the next game at even odds, and keep the rest in cash \(c_{i,j}\), then after the next game your wealth becomes
\[
c_{i,j}+b_{i,j} \quad \text{if A wins},
\]
\[
c_{i,j}-b_{i,j} \quad \text{if B wins}.
\]
To make your strategy exactly reproduce the desired continuation values, choose \(c_{i,j}\) and \(b_{i,j}\) so that
\[
c_{i,j}+b_{i,j} = V_{i+1,j},
\]
\[
c_{i,j}-b_{i,j} = V_{i,j+1}.
\]
Solving,
\[
b_{i,j} = \frac{V_{i+1,j}-V_{i,j+1}}{2},
\qquad
c_{i,j} = \frac{V_{i+1,j}+V_{i,j+1}}{2}.
\]
That tells you exactly how much to bet at every game state.
If the odds are not even, replace these equations by the actual payoff equations implied by the quoted odds. The same backward-induction idea still works: at each state, choose the next bet so that the two possible postgame wealth levels match the two continuation values.
If instead the question is about maximizing expected log growth rather than exactly replicating a target payoff, then you would use a Kelly-style fraction based on the game probabilities and odds. But for achieving a predetermined total payoff across the possible World Series paths, the right structure is:
\[
\text{set terminal payoffs } \rightarrow \text{work backward through the series tree } \rightarrow \text{solve for the bet at each state}.
\]
So the short answer is:
\[
\text{price the target payoff by backward induction on the } (i,j) \text{ series states,}
\]
and at each state choose the stake that makes your postgame wealth match the required continuation values in the two branches.