Expected winnings of betting game The game rules are: bet an amount, flip a fair coin, if heads I win the bet and get the amount, if tails I lose the bet and pay the amount. I quit after getting my first head. If I lose, I double the bet and play again. What are my expected earnings (start with a $1 bet)? 
I visualized a few rounds and saw that I can play until I get net \$1 back. So I always can regain my losses. So I think expected earnings is $1$? I'm not sure how to justify this answer.
 A: Let me show it this way:
Scenario #1 - You win
Good job! you made money and can go home with your winnings
Scenario # 2 - You lose
you are a dollar down, so you bet two dollars, if you win then you lose $1, then won a two dollars, net profit is 1 dollar, you can go home now
Conclusion
this is called the Martingale system, and is primarily used for blackjack, but has the same principal: if your original stake is one, then you keep doubling and your profit will always be 1 (unless there is a maximum bet rule) because in the series 1 + 2 + 4 + 8 + 16... the sum of all the previous terms PLUS ONE equals the next term, and that is why you should always profit
A: HINT: You have a Geometric distribution here. This has a pmf as $f(x) = (1-p)^x\cdot p$ where $p$ is the probability of getting heads. Can you find the expected value of this and apply it to the betting game?
Edit: the geometric distribution has two schools of thought. the pmf that I gave you comes from counting the number of failures before one success. The other idea, which I think you are using, is counting the number of trials before one success. the pmf for this is $f(x) = (1-p)^{x-1}p$
