Here are the bets I am making:
Starting balance: $100
Starting bet: $0.05
Win chance: 4%
Win amount 24.75x
On loss, increase each bet by 4.5% On win, reset bet amount
So with a 0.05 bet, winning $1.2375 each time, it would take n wins to double my money.
On the other hand, to lose my entire balance, I would need to lose 102 bets in a row.
Consider that each bet is independent of the previous bets, so even if I lose several bets in a row, my next bet still has the same probability of winning as any other bet. Like, If I lose 90 bets in a row and then win on the 91st bet, I would still come out ahead, even though I lost a lot of bets before that.
What I want to calculate is the chances of doubling my starting balance taking into account the Martingale System (that even if I lost 101 times in a row and won the 102nd bet (wherein I bet $4.263), I'd win more than the original money (4.263*24.75= 105.50925).
I'd appreciate any help.
Ambiguity in the problem statement
How much money do you end up with if you start with \$100 and you win your very first bet of \$0.05? The way you've phrased your question makes it ambiguous between these two options:
Both of these are pretty common ways to phrase statements about gambling odds, so it's not automatically obvious which one you mean. I'm guessing you actually intended to use option (1) though. My reasoning is that option (1) is a negative expected value bet, while option (2) is positive expected value.
In other words, if you're in world (2) then you don't need any fancy strategy: you can just bet extremely small amounts every round and you're basically guaranteed to double your money eventually because the game is stacked in your favor over the long run. With option (1) the problem is more interesting: you will lose in a long term game, so you need to take more risks to try to double your money.
In the following answer, I'm assuming you intended version (1), where the game is stacked against you in the long run.
As of this edit, this question has another answer (from lonza leggiera) which makes the opposite assumption; they assume scenario (2), where the game is stacked in your favor over the long run. I hope this explanation can help you/others figure out which answer is applicable depending on what version of the problem you intended. (I'm upvoting their answer too; I think both answers are useful even though they're answering slightly different question.)
Answering the question
This seems tricky to compute exactly, but it's easy to get an approximate answer. Here is a Python script:
This script simulates the game 1 million times using 2 different strategies.
The first strategy ("sim_scaling" in the code) is the one you described. My code outputs an approximate success probability of
0.482217, i.e. around $\boxed{48.2 \%}$.The "win_directly" strategy is an alternate version I've added that works by always trying to reach the goal on the very next bet. For example, this strategy will initially bet $\$4.21$ since that's the minimum amount that could let us win right away. If we lose the first round then we have $\$95.79$ remaining, so in the second round we'll bet approximately $\$4.39$ since that would let us get to $\$200$ if we win. And so on. With this strategy, the 1 million trial simulation finds approximate success probability
0.495227, or $\boxed{49.5 \%}$.Proving an upper bound
No matter what strategy we pick, the success probability will always be $< 50\%$. To see this, notice that all your bets are negative expected value (because win chance $*$ win amount = $.04 \cdot 24.75 = 0.99$ which is less than $1$). This means that as long as you place at least one bet, the expected value of your bankroll at the end must be $< 100$. So we know $$\begin{align} 100 &> E[\text{bankroll at end}] \\ &= \sum_d P[\text{end up with } d \text{ dollars}] \cdot d \\ &\ge 200 \cdot P[\text{end up with } 200 \text{ dollars}] \end{align}$$ and therefore $$\begin{align} 200 \cdot P[\text{end up with } 200 \text{ dollars}] &< 100 \\ P[\text{end up with } 200 \text{ dollars}] < \frac 1 2. \end{align}$$
This type of thinking is what led me to guess that the "win directly" strategy would perform better than your proposal. The expected value of our bankroll is always $100 - \frac{\text{sum of all bets so far}}{100}$. So in general it seems best to give ourselves chances to win while keeping the sum of all bets as small as possible. The odds are stacked against us in the long run, so it's best to just bet big and hope to get lucky once. This is very much not a proof though; I suspect my proposed strategy is nearly optimal but I don't know whether it is actually optimal.