# Probability and Expected Value of a betting game

Here is the problem I am trying to figure out:

Someone starts with X amount of money that they can bet on this betting game. The game is the person can wager whatever he wants, and when he places the bet he has a 49.8% chance to double his money, and 50.2% chance to lose it. If this player is up Y amount, so his total wealth is X + Y, what is the total expected amount of money he must bet in order to get back to having a total of X money.

Heres an example of the question:

If I have 100 dollars, and I play this game enough times where I’m up to 150 dollars. How much total money must I wager, whether it is 5 dollars ten times or 50 dollars once, in order to expect to be back at 100 dollars

After betting $\$X$, you get back on average$\$X(0.996)$, because you double $0.498$ of the time. So after betting $\$250Y$, you get back on average$249Y$. On the other hand, that doesn't answer your question. The time that your expected return is$-Y$, might not be the expected time that your return reaches$-Y\$.

Suppose that M_n is the amount of money with start with before the n bet and that b_n is the proportional amount of that money that we bet on that specific bet. Our expected leftover money for that bet are:

$$E(L_n) = M_n \cdot (1 - b_n) + 0.498 \cdot b_n \cdot M_n \cdot 2 = (1 - 0.004 \cdot b_n) \cdot M_n$$

Of course it's very easy to notice that our expected leftover money of bet n is equal to the expected value of money we start with at bet n + 1:

$$E(L_n) = E(M_{n+1})$$ $$E(M_{n+1}) = (1 - 0.004 \cdot b_n) \cdot E(M_n)$$

Starting from the first bet we know:

$$E(M_1) = X + Y$$ $$E(M_2) = (1 - 0.004 \cdot b_1) \cdot (X + Y)$$

Right off the bat we can tell what's the amount we need to bet to return to X right away after the first bet.

$$X = (1 - 0.004 \cdot b_1) \cdot (X + Y)$$ $$b_1 = {{250 \cdot Y} \over {X + Y}}$$

Of course keep in mind that you should accept the b_n solution only if its equal or lower than 1. You cannot bet more money that you have of course. In your example with 100 + 50 dollars, b_1 would be 83,333... so that means it would be impossible to return to X in expected value after a single bet.

The procedure continues on with iterative substitutions...

$$E(M_3) = (1 - 0.004 \cdot b_2) \cdot (1 - 0.004 \cdot b_1) \cdot (X + Y)$$ $$E(M_4) = (1 - 0.004 \cdot b_3) \cdot (1 - 0.004 \cdot b_2) \cdot (1 - 0.004 \cdot b_1) \cdot (X + Y)$$

In the end it's about finding at least one solution of the following:

$$X = (X + Y) \cdot \prod _{n=1}^{N} (1- 0.004\,b_{{n}}) \text { subject to } [0 \le b_n \le 1] \forall n$$

Hopefully that helped.