I ran my simulation with a gain of 2.0. In that case the single bet beats a martingale by a significant margin. Here are the results of two simulations at gain = 2.0 and gain = 1.01.
So if you want to double your money a single bet is better than a martingale sequence. If you want to increase you money by 1% than a martingale is better than a single bet by a very small margin.
100,000 runs
Martingale with p = 0.5, 1000 bitcoin bank, 1 bitcoin starting bet. Stop if
gain 2.0 or 0.
Probability to win = 0.448680
Average number of bets to win = 2800
Average win = 2001.073167
Probability of 1000 bitcoin bet winning the same with single bet = 0.494735
Single bet wins by Dp = 0.046055100,000 runs
Martingale with p = 0.5, 1000 bitcoin bank 1 bitcoin starting bet. Stop if
gain 1.01 or 0.
Probability to win = 0.987280
Average number of bets to win = 42
Average win = 1010.936452
Probability of 1000 bitcoin bet winning the with single bet = 0.979290
Martingale wins by Dp = 0.00799I believe the difference is in the number of bets needed to reach your goal. The average number of bets needed to double you money in this simulation was 2800. The average number needed to increase your money by 1% was 42.
The main principle is the more you bet the more you lose.Here is the code if you want to try this yourself or check my results.
function [profit n] = martin3(edge, p, bank, bankRisk, gain)
% edge - house advantage for each bet
% p - probabilty of winning each bet
% bank - number of bitcoins to start with
% bankRisk - amount of current balance to risk with each
% starting bet of a series
% gain - Amount of money times bank which will stop the game.
winReturn = (1 - edge)/p;
winProfit = p / (1 - edge - p);
singleWinGain = bankRisk*bank;
firstBet = singleWinGain / (1 - edge);
currentBet = firstBet;
bets = [];
lose = [];
i = 1;
while ((bank(i) > 0) && (bank(i) < bank(1) * gain))
currentBet = min(currentBet, bank(i));
bets = [bets currentBet];
bank = [bank, bank(i) - currentBet];
if (rand(1, 1) < p)
bank(i+1) = bank(i+1) + winReturn * currentBet;
lose = [];
currentBet = bankRisk*bank(i+1) / (1 - edge); % If bank grows amount to bet grows
% currentBet = firstBet; % Bet same amount independant of balance
else
lose = [lose currentBet];
currentBet = winProfit * sum(lose); % win back only what was lost
% currentBet = winProfit * sum(lose)+singleWinGain; % win back what was lost and win a bit.
end
i = i + 1;
end
n = i;
profit = bank(n);
% plot(bank,'x-');
N = 1000;
e = 0.01;
p = 0.5;
bank = 1000;
bankRisk = 0.001;
gain = 1.1;
profit = [];
number = [];
for i=1:N
[pr n] = martin3(e, p, bank, bankRisk, gain);
profit = [profit pr];
number = [number n];
end;
figure('Position', [0 0 1600 900])
subplot(311);
plot(number,'x');
subplot(312);
hist(number,sqrt(length(number)));
subplot(313);
plot(profit, 'x');
fprintf('mean = %f\n', mean(number));
fprintf('std = %f\n', std(number));
fprintf('min = %f\n', min(number));
fprintf('max = %f\n\n', max(number));
fprintf('mean = %f\n', mean(profit));
fprintf('std = %f\n', std(profit));
fprintf('min = %f\n', min(profit));
fprintf('max = %f\n\n', max(profit));
NWin = sum(profit > 0);
NLose = sum(profit == 0);
ProbWin = NWin / (NWin + NLose);
fprintf('ProbWin = %f\n\n', ProbWin);
meanWin = mean(profit(find(profit ~= 0)));
fprintf('mean win = %f\n\n', meanWin);
singleBetProb = (1 - e)*bank/meanWin;
fprintf('singleProbWin = %f\n\n', singleBetProb);