[Math] Expected value of a coin flip game

probability

A fair coin is flipped 100 times in a row. For each flip, if it comes up heads you win \$2, if it comes up tails you lose \$1.
You start with \$50, if you run out of money you must stop prematurely. If you don't run out of money you stop after 100 flips.

What is the expected value of this game?

So for the case where you have no stopping condition before 100 flips you get that $E(100)=50$, and I assume the possibility of stopping will reduce this expectation somewhat. But how exactly is it changed?

Best Answer

Try it with a smaller number. Assume you are allowed eight flips and start with $4$. As you say, without the constraint of the starting value, the expected value is $4$. You run out of money if you throw TTTT, HTTTTTT, THTTTTT, TTHTTTT, TTTHTTT. Throwing four tails deprives you of four flips worth $2$ and has a chance of $\frac 1{16}$. Each of the rest deprives you of one throw worth $\frac 12$ and has a chance of $\frac 1{128}$. The expected value is then $$4-2\cdot \frac1{16}-4 \cdot \frac12 \cdot \frac 1{128}=3\frac {55}{64}$$ Similarly you lose chances if you throw $50$ tails in a row, or one head and $25$ tails among the first $53$ throws (where the head is among the first $50$), or so on. Each of these is a very small chance so the reduction in expected value is very small.

Related Question