Categories

Sunday, August 16, 2015

Simulating the Gambler's Ruin in Blackjack

The Gambler's Ruin is a statistical idea that a gambler with finite wealth will eventually go broke against an opponent of infinite wealth (regardless of betting system) if their expected value is negative (as is the case where the House has an edge). This idea is directly applicable to blackjack, where the House has at least a 0.26% edge even if you're playing perfect basic strategy (we assume that relative to an individual gambler the House has virtually infinite wealth).

However, in the short-run it's possible to win money (otherwise people wouldn't gamble). So what if you played until you were up a set amount and then quit, or played until you lost your entire bankroll? While this is not directly the Martingale system, the central premise of being up a little bit before you're down a lot is the same. This is directly analogous to the Gambler's Ruin in that in the long-run you will always end up at 0, but we're concerned with short-run fluctuations. So just how often would you come out ahead?

I wrote a simulator (in Python) to test various strategies/goals 10,000 times each. I assumed the following win probabilities on any given hand:

1) For Dealer: 47.89% 
2) For Player: 43.31% 
3) Push: 8.80%

I then changed two variables: what percentage of your bankroll you bet on each hand and how much you had to be up before you quit. However, first a word of warning: the applicability of these results overstate what would happen in real life, because the computer is not flawed in ways that humans are:

1. It always plays the correct strategy
2. It's disciplined and quits as soon as it gets to the predetermined amount
3. It doesn't ever tilt
4. It doesn't ever get tired or indulge in one too many comps

Here are the probabilities you come out ahead for each given combination of what percentage of your bankroll you bet on each hand and how much you need to be up before you quit:


Probability Come Out Ahead
% Won Needed to Quit
Result5%10%15%20%25%
% Bankroll Bet0.50%37.22%13.64%4.78%1.61%0.79%
(Each Hand)1%60.89%36.26%22.29%13.19%8.39%
2%73.74%60.49%43.83%36.34%26.46%
2.50%81.42%66.23%53.64%44.39%35.74%
5%89.32%79.53%70.89%63.69%57.56%

So the more aggressive you are with how much you bet on each hand, the more likely it is you gain a small percentage before you lose everything. Of course, the House does have an edge, so in the long-run the expected values for ALL of these strategies are negative:

Expected Value
% Won Needed to Quit
Result5%10%15%20%25%
% Bankroll Bet0.50%-60.92%-85.00%-94.50%-98.07%-99.01%
(Each Hand)1%-36.07%-60.11%-74.37%-84.17%-89.51%
2%-22.57%-33.46%-49.60%-56.39%-66.93%
2.50%-14.51%-27.15%-38.31%-46.73%-55.33%
5%-6.21%-12.52%-18.48%-23.57%-28.05%


No comments:

Post a Comment