[Martingale] Doubling strategy simulation

A fair coin is tossed. In the first round, you bet on 1$. If it turns out head, then you bet on 1$ for the next round, if it turns out tail, then next round you double your previous bet. In this way, if you have a successive loss, but after some time, you win the round, then you can get all your loss back, plus some little extra. Sounds good? I’ll simulate 10,000 rounds and show you why it’s a bad idea.

1 stands for win, -1 stands for loss

To let you see what’s really going on, I will show you an example of 10 rounds.

Result of some simulations:

Can you count how many heart attacks you can expect?