There is a coin with a probability $p$ of heads, and $1-p$ of tails. Tosses are independent of each other. When you bet an amount of money $x$, you receive $2x$ if it lands heads, and you lose what you bet if it lands tails.
We are going to use the following strategy:
You start betting an initial amount $x_0$. Every time you lose, you bet twice what you bet in the previous throw. You keep doing this, until you win, at which point you retire, or start again, betting $x_0$.
The interesting case of course is when $p < 0.5$.
The question is: How profitable is this strategy? Intuitively I feel that eventually I can always win an arbitrarily large amount of money. But that can't be entirely right ("the house always wins!"). So what am I missing here? What's the expected win in each run?
Also, does this sort of strategy have a name in the literature?
P.S.: Found this later, https://en.wikipedia.org/wiki/Martingale_(betting_system)