TITLE: When to stop in this coin toss game?
QUESTION [5 upvotes]: Suppose you play the following game: You toss a fair coin. If you get heads, a hundred dollars are added to your reward. If you get tails, however, the game is stopped and you do not get anything at all. After each throw you can decide, whether you want to take the money or keep playing. When should you stop to play the game in order to get the maximum expected reward and why? What happens if the coin is biased and has an 80% chance of showing heads?

REPLY [4 votes]: In the moment strategy
Assume the coin comes up heads with probability $p$ and tails with probability $1-p$. If you have $D$ dollars, your expected gain after the next flip would be $100p-D(1-p)$. I would quit when I am not expecting to increase my winnings.  That is, when I have $D\ge\frac{100p}{1-p}$ dollars.
Thinking ahead strategy
The expected winnings after $n$ flips is $100np^n$. I would stop when $100np^n\ge100(n+1)p^{n+1}$. That is, when $\frac{n}{n+1}\ge p$ which is when $n\ge\frac{p}{1-p}$.
Conclusion
Since both of these strategies yield the same answer, I would stop after $\left\lfloor{\raise{1pt}\large\frac{p}{1-p}}\right\rfloor$ flips.
If the coin is fair, that is $p=\frac12$, then I would quit after the first flip.
If the coin has $p=.8$, I would quit after $4$ flips, assuming I get there.