\[ E_n = p (E_{n-1} + 1) + (1-p) \bigg(E_{n-1} - 1\bigg) = 0 \]
Since the expected earnings are zero, this means that on expectation, the player of our game will maintain their value at $7. Assume that \(E[V]\) is the expected value of the player, and hence \(E[V]=7\). Since there are only two final outcomes (lose everything or win $10) we can write the following:
\[ E[V] = 7 \Leftrightarrow p_{win} 10 + (1-p_{win}) 0 = 7 \Leftrightarrow p_{win} = 0.7 \]
where we estimated the probability of winning $10 to be 70%.
If you have doubts or you think this is counterintuitive, let’s simulate these random walks:
np.random.seed(1)
def random_walk():
total = 7
while True:
if total == 10:
return 1
elif total == 0:
return 0
total += np.random.choice([-1,1])
ans = []
for _ in range(1000):
ans.append(random_walk())
print(f"Probability of winning: {np.mean(ans):.1f}")
## Probability of winning: 0.7