# Probability Game Optimal Strategy

You're playing a game where you have a .45 probability of winning and .55 probability of losing. You start out with 2000 chips and the winning condition is that if you bet a cumulative total of 10000 chips, then you win. Otherwise if you run out of chips, you lose.

For example, if you bet 20 chips, no matter the outcome, that will contribute 20 to the total. And you'll be left with either 1980 or 2020 current chips.

The min bet size is 1and max is as much as you currently have. What is the best strategy to maximize your probability of winning? What I said was, you'd want to use a strategy akin to betting as much as possible at each round. Since otherwise, from LLN, you are losing in general and just prolonging with small bets will make you lose more in the long run. I said you'd be able to maybe calculate the exact strategy using dynamic programming, with f(s,t) representing what you should bet at each combination of (current money, total cumulative so far). However I do not know if this is correct nor did I have time to fully solve it. Thank you! • I just revised my answer. – user2661923 Dec 28 '20 at 17:36 ## 3 Answers # Your optimal, risk-minimizing strategy is to bet a single chip each round Other users have provided strong evidence of this via simulations. However, it can be mathematically proven that the one-chip strategy is superior to any other betting method, with an absurdly high probability of success. OP believes the law of large numbers argues in favor of making big bets in the hope of reaching $$10,000$$ total chips bet very quickly: What I said was, you'd want to use a strategy akin to betting as much as possible at each round. Since otherwise, from LLN, you are losing in general and just prolonging with small bets will make you lose more in the long run. I said you'd be able to maybe calculate the exact strategy using dynamic programming, with f(s,t) representing what you should bet at each combination of (current money, total cumulative so far). However I do not know if this is correct nor did I have time to fully solve it. But it's the other way around. Suppose in each round $$k \geq 1$$, I stake $$C_k$$ chips, where $$C_k$$ is a positive integer. Since I win with probability $$0.45$$, but lose with probability $$0.55$$, my expected change in wealth at round $$k$$ is $$0.45 C_k - 0.55 C_k = -0.1 C_k,$$ with a variance of $$1.1^2 C_k^2 (0.45) + 0.9^2 C_k^2 (0.55) = 0.99 C_k^2.$$ This implies that the more I stake on round $$k$$, the more I expect to lose, and the higher the volatility/risk I assume. My loss- and volatility-minimizing strategy for each individual round is then to bet $$C_k = 1$$ each time, so that I lose an average of $$0.1$$ chip per round. Since variance of independent variables is additive, the variance per round is about $$0.99$$ "chips squared". This may not sound promising in the long run, as my wealth $$W_k$$ at the start of round $$k$$ is expected to trend inexorably downwards: $$\Bbb{E}[W_k] = W_0 - 0.1 k,$$ where $$W_0$$ is my starting bankroll. But remember--we're not playing to amass chips, we're playing to stay in the game as long as possible. And placing any bet $$C_k > 1$$ actually decreases $$\Bbb{E}[W_{k+1}]$$ relative to the one-chip strategy. There is no betting strategy for $$C_k$$ that can improve on the one-chip expectation of $$\Bbb{E}[W_{k+1}] = W_0 - 0.1 (k+1)$$. Furthermore, the one-chip strategy also achieves the lowest possible volatility: placing any bet $$C_k > 1$$ increases $$\operatorname{Var}(W_{k+1})$$, relative to the one-chip strategy, which has the following variance and standard deviation of bankroll: \begin{align*} \operatorname{Var}(W_k) &= 0.99 k \\ \sigma_{W_k} = \sqrt{\operatorname{Var}(W_k)} &= \sqrt{0.99k}, \ \end{align*} where $$\sigma_{W_k}$$ is the standard deviation of my bankroll $$W_k$$ at the start of round $$k$$. So if we only bet a single chip each round, our starting bankroll of $$W_0 = 2,000$$ chips puts us in an excellent position to place $$10,000$$ chips worth of bets before we go bust, albeit at a snail's pace. If we bet a single chip per round, it would take us $$k = 10,000$$ rounds to achieve the stated winning condition. But since we started with $$2,000$$ chips, we have $$\Bbb{E}[W_{10,000}] = W_0 - 0.1 (10,000) = 2,000 - 1,000 = 1,000.$$ That is, we expect to amble up to round $$10,000$$, and win, with a very comfortable cushion of $$1,000$$ chips to spare! Not only that, but we would deviate from this amount, on average, by only $$\sigma_{W_{10,000}} = \sqrt{0.99 \times 10,000} = 99.5 \text{ chips.}$$ Notice how teeny that is compared to our expected bankroll? That implies we have a strong chance of success--in fact, a very strong chance of success. ## My winning probability if I use the one-chip strategy is insanely high My actual bankroll $$W_{10,000}$$ after $$10,000$$ rounds, using the one-chip strategy, is given by $$W_{10,000} = 2,000 + \sum_{i = 1}^{10,000} X_i,$$ where $$X_i$$ are iid $$\{ \pm 1 \}$$-valued random variables with $$\Bbb{P}(X_i = +1) = 0.45$$ for all $$i = 1, 2, ..., 10,000.$$ $$10,000$$ is so large that, by the Central Limit Theorem, $$W_{10,000}$$ is essentially a normal random variable with mean $$\mu_{10,000} = 1,000$$, variance $$\sigma^2_{10,000} = 10,000(0.99) = 9,900,$$ and standard deviation of $$\sigma_{10,000} = \sqrt{9,900} \approx 99.5$$ chips. To have run out of chips after $$10,000$$ bets, i.e. $$W_{10,000} = 0$$, would correspond to a z-score of $$z = \frac{0 - 1,000}{99.5} = -10,$$ which has an absurdly small probability, of an order of magnitude around $$e^{-10^2/2} \approx 10^{-22}$$, or about one sextillionth. The probability of me being bankrupt at an earlier round than the $$10,000$$th is even lower than the probability of me being bankrupt at the $$10,000$$th round. In fact, I won't even have the opportunity to go broke until round $$2,000$$. So we can upper bound my losing probability by about $$8,000 \times 10^{-22} \approx 10^{-18}$$, or about one in a quintillion. To put this in perspective, if I played this game once a second, it would take me a minimum of $$10^{18}$$ seconds $$\approx 32$$ billion years to see my first loss! This explains Ionza Ieggiera's comment above: Unfortunately, for $$T = 10,000$$, the script will fail by exceeding the time and memory limits of the online Magma calculator. Even if Magma was able to simulate this game a billion times a second, it would take decades upon decades for Magma to register anything other than a win! ## Accelerating my betting disproportionately increases my risk of going broke No strategy offers a higher probability of success than the one-chip strategy, but betting more can speed up the time it takes for me to win. Since the one-chip strategy offers such a ridiculously safe bet, this is a tradeoff we're probably willing to make. But even a relatively modest gain in time saved can come with a surprisingly steep increase in risk. Let's say I want to go $$10 \times$$ as fast, so I'm betting $$C_k = 10$$ chips each round, and it would take me $$1,000$$ rounds to hit the $$10,000$$ chip goal. I expect to lose about $$0.1 C_k = 1$$ chip per round with this strategy, so after $$1,000$$ rounds I expect to have $$\Bbb{E}[W_{1,000}] = 2,000 - 1,000(1) = 1,000$$ chips left. (Note that using the one-chip strategy, we would expect to have far more of our starting bankroll left at this point in the game: $$\Bbb{E}[W_{1,000}] = 2,000 - 1,000(0.1) = 1,900$$ chips left instead. But with the one-chip strategy, we still have $$9,000$$ more bets to place, whereas with the ten-chip strategy, we're already finished by round $$1,000$$, if we make it that far.) The resulting analysis is very similar: my actual bankroll $$W_{1,000}$$ after $$10,000$$ rounds, using the ten-chip strategy, is given by $$W_{1,000} = 2,000 + 10 \sum_{i = 1}^{1,000} X_i$$, where $$X_i$$ are iid $$\{ \pm 1 \}$$-valued random variables with $$\Bbb{P}(X_i = +1) = 0.45$$ for all $$i = 1, 2, ..., 1,000.$$ $$W_{1,000}$$ is again basically normal per CLT, with mean $$\mu_{1,000} = 1,000$$. This time, though, because we're betting $$10 \times$$ as much per round, our variance is $$100 \times$$ bigger, which corresponds to a standard deviation $$10 \times$$ bigger. The expected value of a single bet is $$-1$$ chips, so the variance of a single bet is $$(10 - (-1))^2 (0.45) + (-10 - (-1))^2 (0.55) = 99 \text{ chips,}$$ and the variance of our $$1,000$$ bets is $$\sigma^2_{1,000} = 1,000 \times 99 = 99,000$$. This gives us a standard deviation of $$\sigma_{1,000} = \sqrt{99,000} \approx 314.6$$ chips. So the likelihood of being broke at round $$W_{1,000}$$ corresponds to the probability of a $$z$$-score of $$z = \frac{0 - 1,000}{314.6} = -3.178,$$ which is still pretty low probability (around $$0.007-0.008$$) but now firmly within the realm of possibility. And that's just the probability of being broke at bet $$1,000$$--my probability of going broke at or before bet $$1,000$$ is actually slightly higher. So, my impatience has multiplied my probability of losing by a thousand million million times, and deeply cut into my margin of error. At the point where you're still playing $$1,000$$ rounds of this game in a row, the tradeoff doesn't seem particularly worth it. Betting $$2$$ or $$5$$ chips per round, while still keeping the probability of a win essentially certain, offers an even more modest speedup. And of course, neither the five-chip strategy, nor the two-chip strategy, offers a higher win probability than the one-chip strategy. • @jlammy You're misunderstanding the question. The goal isn't to win10,000$chips (which would be extremely unlikely), it's to survive through$10,000$chips worth of bets. In$10,000$chips of bets, I lose, on average,$5,500$chips, but I win, on average,$4,500$chips, so if I started with$2,000$chips, I should still be in the game with around$1,000$chips after placing those$10,000$one-chip bets. In fact, the empirical rule for normal distributions tells me I have less than a 0.15% chance of ending up with less than$700$chips after those$10,000$one-chip bets. – Rivers McForge Jan 10 at 16:25 • I think you've misunderstood the reason why my first Magma script fails with$T=10000$and$S_0=2000$. It's not a simulation, but an implementation of the dynamic program described immediately above it. It requires storage for$(T+2)^248$-digit floating point numbers, and a similar number of indefinite precision integers, and needs to carry out something on the order of$10^{10}$arithmetic operations on those floating point numbers. I believe this would be quite feasible on a PC, but it isn't doable within the resource limitations of the online Magma calculator. – lonza leggiera Jan 10 at 23:28 • @IonzaIeggiera By “simulation” I simply meant that the situation was being modeled virtually, rather than (for instance) actually sitting down at a green baize table with a pile of$2000$chips, anteing up, rolling a fair D20 where you win if the roll is at least 12 and lose otherwise, and playing the game out to the bitter end. Also, in the particular case$T = 10000$,$S = 2000$there’s no need to “simulate”/“implement” (whichever you prefer) your virtual punter ever staking a bet greater than a single chip, and the extra cases in your program are unnecessary for the model. – Rivers McForge Jan 11 at 14:10 • Ok. Apologies for the misunderstanding. Whether I need to advise my virtual punter to consider staking bets greater than a single dollar depends on whether I wish to limit my advice to the case where$\ T=10000$,$\ S=2000\ $, or to let it also cover a wider variety of values of$\ S\ $and$\ T\ $(which I did, in fact wish to do). – lonza leggiera Jan 11 at 15:20 • @Ionza Fair enough. I'm pretty sure my order-of-magnitude estimates are correct (even quite conservative) re: how long it would take to see a loss in the particular question OP asks using a one-chip strategy. While I'm not acquainted with the exact processing power of Magma or a single PC (as opposed to a distributive network), I would be quite surprised to learn that either could play out this game in the one-chip case for$10000rounds, at the rates it would take to see a loss in any reasonable amount of time (e.g. less than a week). – Rivers McForge Jan 11 at 15:30 You're quite correct that the optimal strategy can be calculated by using dynamic programming. As in your question, let $$\ s\$$ be your current bank, $$\ t\$$ the total amount you've so far bet, and $$\ f(s,t)\$$ the optimal bet in this situation. Let $$\ p^*(s,t)\$$ be the probability that you will eventually succeed if you play optimally from then on. Let $$\ S_0\$$ be your initial bank $$(\ S_0=\2,000\$$ in the question as posed$$)$$, and $$\ T\$$ be the target value for $$\ t\$$ ($$T=\10,000\$$ in the question as posed). First observe that if $$\ s+t\ge T\$$ (and $$\ t) then you can win immediately on the next round by betting $$\ T-t\$$, so $$\ p^*(s,t)=1\$$ for all such values of $$\ s\$$ and $$\ t\$$. Also $$\ p^*(0,t)=0\$$ for all $$\ t. Next, if $$\ s+t and you bet $$\ b\$$ then if you win, the new value of $$\ s\$$ will be $$\ s+b\$$ and the new value of $$\ t\$$ will be $$\ t+b\$$ and since these sum to $$\ s+t+2b\$$ you will be able to win with certainty on your next go if $$\ s+t+2b\ge T\$$. It is therefore never advantageous to bet more than $$\ \frac{T+1-s-t}{2}\$$, because this is sufficient to guarantee a win on the next round if you win this one, and if you bet any more, you will have fewer funds available on the next round if you happen to lose this one. If you bet $$\ b\$$ and lose, then the new values of $$\ s\$$ and $$\ t\$$ will be $$\ s-b\$$ and $$\ t+b\$$ respectively. Thus, if $$\ p\$$ is the probability of winning a single round ($$p=0.45\$$ in the question as posed), and $$\ q=1-p\$$ the probability of losing it, then \begin{align} p^*(s,t) &= \max_{1\le b\le \min\left(s,\frac{T+1-s-t}{2}\right)}\big(p\,p^*(s+b,t+b)+q\,p^*(s-b,t+b)\big)\\ f(s,t) &= \underset{1\le b\le \min\left(s,\frac{T+1-s-t}{2}\right)}{\arg\max}\big(p\,p^*(s+b,t+b)+q\,p^*(s-b,t+b)\big)\ . \end{align} By working backwards from $$\ t=T-2\$$ you can use the above equations to succesively calculate $$\ p^*(s,t)\$$ and $$\ f(s,t)\$$ for $$\ s\in \big\{1, 2,\dots, T-t-1\big\}\$$ and $$\ t=T-2,T-3,\dots,1,0\$$. I've written the following Magma script to carry out these calculations for $$\ T=1000\$$. SetDefaultRealField(RealField(48)); R:=RealField(48); p:=0.45; q:=1-p; T:= 1000; optstrat:=ZeroMatrix(Integers(),T+2,T+2); bestprob:=ZeroMatrix(R,T+1,T+2); for s in [1..T-1] do bestprob[s+1,T-s+1] := 1.0; bestprob[s+1,T-s+2] := 1.0; end for;; for r in [2..T] do t:=T-r; for s in [1..T-t-1] do bp:= 0.0; os:=0; for b in [1..Minimum(s,(T+1-s-t) div 2)] do cp:=p*bestprob[s+b+1,t+b+1]+q*bestprob[s-b+1,t+b+1]; if cp gt bp then bp:=cp; os:=b; end if; end for; bestprob[s+1,t+1]:= bp; optstrat[s+1,t+1]:= os; end for; end for; for s in [1..200] do print s, bestprob[s+1,1], optstrat[s+1,1]; end for;  The script can be run by copying and pasting it into the online Magma calculator here. Unfortunately, for $$\ T=10000\$$, the script will fail by exceeding the time and memory limits of the online Magma calculator. For $$\ T=1000\$$, however, the output tells us that for a starting bank of $$\64$$ or less, the optimal first bet is the whole of one's bank, and for starting banks of between $$\117$$ and $$\200$$ inclusive, the optimal first bet is $$\1$$. With optimal play, the chance of ultimate success is better than $$\ 99\%\$$ for any starting bank of $$\175$$ or more. With optimal play, the probability of success for $$\ S_0=200\$$turns out to be $$0.99913348949325492439801621030571175189427531\dots\ .$$ The results of these calculations suggest that bets of $$\1$$ are optimal unless one's bank is fairly small relative to the current target. The above script can easily be modified to calculate the probability of success for the strategy B described in user2661923's answer (as amended per the correction suggested in my third comment to the answer). If $$\ p_1(s,t)\$$ is the probability of success playing that strategy from a position where the current bank is $$\ s\$$, and the total so far bet is $$\ t\$$, then $$\ p_1\$$ satisfies the recursion $$p_1(s,t) =p\,p_1(s+1,t+1)+q\,p_1(s-1,t+1)\ .$$ The above script can be modified to tabulate the values of $$\ p_1\$$ for $$\ 1\le s\le 1000\$$ and $$\ 0\le t\le 1000\$$ by replacing the code  bp:= 0.0; os:=0; for b in [1..Minimum(s,(T+1-s-t) div 2)] do cp:=p*bestprob[s+b+1,t+b+1]+q*bestprob[s-b+1,t+b+1]; if cp gt bp then bp:=cp; os:=b; end if; end for; bestprob[s+1,t+1]:= bp; optstrat[s+1,t+1]:= os;  with the single instruction bestprob[s+1,t+1]:= p*bestprob[s+2,t+2]+q*bestprob[s,t+2];  For $$\ T=1000\$$ and $$\ S_0=200\$$, the modified script gives a probability of $$0.999051356533203111486952131756939063716486183\dots$$ of ultimate success when using this strategy. While this probability is smaller than that guaranteed by the optimal strategy, thus showing that this strategy is not quite optimal, the difference is so small ($$\ \approx0.000082\$$) as to be effectively negligible. For smaller values of $$\ S_0\$$, the strategy of using $$\1$$ bets can be very far from optimal. For $$\ S_0=50\$$ and $$\ T=1000\$$, for instance, the optimal strategy gives a probability of $$0.30041494580652103310049100479730984926032991\dots$$ of ultimate success, whereas the strategy of betting just $$\1$$ all the time has a probability of success of only $$0.03353384615182354449189130202943683024299148\dots\ .$$ The following script calculates the probability of ultimate success with a starting bank of $$\ S_0=\2000\$$, and target $$\ T=\10000\$$ when you always bet just $$\1$$ unless either $$\ T\$$ rounds have been played, or $$\ s=T\$$, in which case you bet $$\ T-t\$$. If you survive for $$\ T\$$ rounds, even if your bank drops to zero on the last round, you will win, because the total amount you have then bet will be exactly $$\ T\$$. On the other hand, if $$\ s=T\$$ before you've played $$\ T\$$ rounds, then the total amount $$\ t\$$ that you've bet so far is just the number of rounds you've played, so $$0\le T-t\le s\$$ and you can therefore win on the very next round by betting $$\ T-t\$$. This scenario can be modelled as a time-homogeneous Markov chain with absorbing states at $$\ s=0\$$ and $$\ s=T\$$, and initial state $$\ s=S_0\$$ with probability $$1$$. If $$\ p_a(s,t)\$$ is the probability that the chain is in state $$\ s\$$ at time $$\ t\$$, $$\ w(t)=p_a(T,t)\$$, and $$\ l(t) = p_a(0,t)\$$, then $$\ p_a, w\$$ and $$\ l\$$ satisfy the following equations: \begin{align} p_a(s,0)&=\cases{1&if \ s=S_0\ , or\\ 0&otherwise}\\ l(t+1)&=l(t)+ q\,p_a(1,t)\\ w(t+1)&=w(t)+p\,p_a(T-1,t)\\ p_a(1,t+1)&=q\,p_a(2,t)\\ p_a(T-1,t+1)&=p\ p_a(T-2,t)\\ p_a(s,t+1)&=q\,p_a(s+1,t)+p\,p_a(s-1,t)\ \ \text{ for }\ 2\le s\le T-2\ . \end{align} The probability of ultimate success is then $$\sum_{s=0}^Tp_a(s,T) - p_a(0,T-1)=1-l(T-1)\ ,$$ which the following script calculates for $$\ T=10000\$$ and $$\ S_0=2000\$$. SetDefaultRealField(RealField(48)); R:=RealField(48); pa:=[* Zero(R) *]; qa:=[* Zero(R) *]; T:=10000; S0:=2000; p:=0.45; q:=1-p; for s in [1..T-1] do pa:=pa cat [* Zero(R) *]; qa:=qa cat [* Zero(R) *]; end for; w:=Zero(R); l:=Zero(R); pa[S0]:=One(R); for t in [1..T-1] do w:=w+p*pa[T-1]; lp:=l; l:=l+q*pa[1]; w0:=q*pa[1]; qa[T-1]:=p*pa[T-2]; qa[1]:=q*pa[2]; for s in [Maximum(2,S0-t)..Minimum(T-2,S0+t)] do qa[s]:=q*pa[s+1]+p*pa[s-1]; end for; pa:=qa; end for; print 1-lp;  For $$\ T=10000\$$ and $$\ S_0=2000\$$ and the strategy of repeatedly betting $$\1$$ the above script gives $$0.9999999999999999999999960876990789091728946\dots$$ as the probability of ultimate success. While this strategy is unlikely to be "optimal" in the strictest sense of the word, its probability of success is so close to $$1$$ that the discrepancy is completely irrelevant. While this strategy is slightly different from the strategies A and B described in user2661923's answer, all three answers are completely equivalent, and have exactly the same probability of success. This is because $$\ s+t\$$ never decreases, so once $$\ s+t\ge T\$$ (thus allowing strategy B to terminate earlier than the other two would), even if you continue betting $$\1$$, your bank $$\ s\$$ cannot decrease to zero before $$\ t\$$ reaches $$\ T\$$ , so you are still certain to succeed. For $$\ T=1000\$$ and $$\ S_0=200\$$ this script gives a probability of ultimate success of $$0.999051356533203111486952131756939063716486183\dots,$$ identical to the answer which the preceding modified script gives for strategy B, thus providing some confirmation that the algorithms have been correctly implemented. First, see the comment/assertion of lonza leggiera. I strongly suspect that he is right. I have added an Addendum to (superficially) explore his assertion. Assuming so, the answer shown below is wrong. The answer was based on my lack of intuition re Statistics, and is an example of my going off the rails. I don't know enough about statistics to rigorously prove my answer. However, I am fairly certain this is the optimal approach. • Try to bet 2000 three consecutive times. • If you lose the first bet, you lose. • If you win the first bet but lose the next two, you lose. • If however, you win the first bet, and then win either the 2nd or 3rd bet, then you automatically win. • This is because you will have at least 4000 and you will have already bet 6000. • Therefore, make the 4th bet for 4000. Even if you lose, and it busts you, you still win overall because you succeeded in wagering 10000. Your chance of losing is $$(0.55) + \left[(0.45) \times (0.55)^2\right].$$ Addendum Responding to the comment/assertion of lonza leggiera. First of all, his assertion hit me in my blind spot. With my general ignorance of statistics, my intuition was that small bets will almost certainly deplete one's bankroll, given the [55%-45%] underdog constraint. That intuition is not conclusive however, because the goal here is not to show a profit in the bets, but rather to succeed in wagering \10,000.

In my initial answer, the probability of successfully wagering a cumulative total of \$10,000 is clearly less than 0.45. Consider the following strategy that is very similar to the one proposed by lonza leggiera. Strategy A: Bet \$1 until you either go broke or have made the bet 10,000 times.

You start with \$2000. As a [55%-45%] underdog, your expected return using Strategy A is to convert your \$2000 bankroll into only \$1000. In order for this strategy to be (somehow) worse than the strategy proposed in my initial answer, your chances of going broke (instead of hovering around \$1000) would have to be greater than 55%. It is hard to believe that your chances of losing \$2000 (instead of only losing \$1000) would be that high.

Now consider the strategy proposed by lonza leggiera.

Strategy B:
Bet \$1 until you either go broke or (the cumulative amount that you have wagered + your remaining bankroll) equals or exceeds \$10,000.
If you reach the point where the sum equals or exceeds \$10,000 then bet your remaining bankroll. Actually, Strategy B is (in effect) equivalent to Strategy A. Once you reach the point where (the cumulative amount that you have wagered + your remaining bankroll) equals or exceeds \$10,000,
then wagering your remaining bankroll \$1 at a time will (also) guarantee victory. • I don't believe this approach is optimal. By my calculation, if you just make bets of$\$1$ until either $\ s+t\ge10000\$ or $\ s=0\$ then it is overwhelmingly more likely that the former condition will occur before the latter, and you can then win with certainty on the very next round by betting $\ \$(10000-t)\ $. The variables$\ s\ $and$\ t\ $are here—as in the OP's question—your current bank, and the total amount you've so far bet, which, in this case, is is also just the number of rounds so far played. – lonza leggiera Dec 28 '20 at 9:14 • @lonzaleggiera +1: very good catch. I have edited my answer accordingly. First see the start of my (edited) answer, and then see the Addendum that I just added. – user2661923 Dec 28 '20 at 17:32 • In fact, when I did my calculation, I did it for a strategy closer to your strategy A than to my strategy B. I'll write up an answer to give the details, along with the Magma code I used to carry out the calculation. – lonza leggiera Dec 29 '20 at 2:55 • @lonzaleggiera good, I am glad that you are writing this into an answer. If your knowledge of statistics is sufficient, it would help if you gave some estimate of the probability of success under Strategy A. – user2661923 Dec 29 '20 at 2:58 • Your specification of strategy B needs a slight modification. Even if you're betting just one dollar at a time, if the sum of your current bankroll and total so far bet is$\$9,999$ and your next bet wins, the sum of your new bankroll and total so far bet will be $\$10,001$. In that case you have to bet$\$1$ less than your total bankroll, otherwise the total amount you've bet would rise to $\$10,001$, rather than$\$10,000$. – lonza leggiera Jan 11 at 5:35