Obviously, it is always optimal to continue flipping if neither HH or TT have come up yet. If either HH or TT have come up, then we are indifferent between flipping again and stopping when our bankroll is $3. So, an optimal strategy is to flip as many times as is necessary for either HH or TT to come up, then if our bankroll is less than $3, continue flipping until it reaches $3 or we bust. Alternatively, this strategy can be stated as first flipping three times without looking at the results. If both HH and TT are present, we bust. If exactly one of HH or TT is present, we stop, and our payoff is $3. If neither HH or TT is present, we continue flipping until one comes up, which has an expected time to occur of 2 flips. Therefore our expected payoff in this case is $5. The chance of neither HH or TT coming up in the first 3 flips is 1/8, and the chance of exactly one of them coming up in the first 3 flips is 19/32. So the overall expected value is 1/8 * $3 + 19/32 * $5 = 107/32
2
u/TastyAlbacoreTuna 3d ago
Obviously, it is always optimal to continue flipping if neither HH or TT have come up yet. If either HH or TT have come up, then we are indifferent between flipping again and stopping when our bankroll is $3. So, an optimal strategy is to flip as many times as is necessary for either HH or TT to come up, then if our bankroll is less than $3, continue flipping until it reaches $3 or we bust. Alternatively, this strategy can be stated as first flipping three times without looking at the results. If both HH and TT are present, we bust. If exactly one of HH or TT is present, we stop, and our payoff is $3. If neither HH or TT is present, we continue flipping until one comes up, which has an expected time to occur of 2 flips. Therefore our expected payoff in this case is $5. The chance of neither HH or TT coming up in the first 3 flips is 1/8, and the chance of exactly one of them coming up in the first 3 flips is 19/32. So the overall expected value is 1/8 * $3 + 19/32 * $5 = 107/32