98steps
98steps
  • Threads: 4
  • Posts: 119
Joined: Sep 14, 2010
February 28th, 2011 at 2:58:02 PM permalink
I am not sure how to calculate the following probability. Any help or advice would be greatly appreciated.

When considering absolute difference, always betting on Banker and carrying the count forward from shoe to shoe as necessary. What is the probability of LOSING, or being behind by, 15 hands before ever winning, or being ahead by, 5 hands?

What about -20 vs. +5? -25 vs. +5?
FleaStiff
FleaStiff
  • Threads: 265
  • Posts: 14484
Joined: Oct 19, 2009
February 28th, 2011 at 3:10:10 PM permalink
Quote: 98steps

and carrying the count forward from shoe to shoe...


Memorandum
From: The Ace of Spades.
To: All Cards
Re: Meeting

There will be a brief meeting tomorrow concerning the order in which we have to line up so as to keep things proper from shoe to shoe. Please be prompt as drinks will be served afterward when the next player spills her cocktail on the felt.
98steps
98steps
  • Threads: 4
  • Posts: 119
Joined: Sep 14, 2010
February 28th, 2011 at 3:14:05 PM permalink
Maybe I need to clarify. By count I am refering to the hand count, not a card count. Meaning, that if the shoe is run and the hand score stays between Banker +5 and -15 hands, then when the next shoe is begun you continue counting hands rather than re-starting your count at 0-0.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
February 28th, 2011 at 3:45:19 PM permalink
Assuming 8 deck shoe the probabilities for player and banker are:

P(Banker) = 0.458597
P(Player) = 0.446247
P(Both) = 0.904844

(For 6 deck or 1 deck shoe the probablities are slightly different, you get them from wizardofodds.com/baccarat)

Ignoring ties as they don't affect the hand count, the probabilities are:

p = P(Banker) = 0.458597/0.904844 = 0.506824
q = P(Player) = 0.446247/0.904844 = 0.493176

If you start with K units the formula to reach N units before losing K units in terms of probabilities p and q is:



1 - (q/p)^K
P = -----------
1 - (q/p)^N



Setting K = 15, N = 20 equals your question of reaching +5 count before reaching -15 count. Plugging those values into the formula gives: P = 0.7986 = 79.86%

Likewise for -20 vs. +5: K = 20, N = 25 -> P = 85.08%
Likewise for -25 vs. +5: K = 25, N = 30 -> P = 88.48%
and so on.

Note that ending up at +5 units doesn't necessarily mean you will be ahead overall, as you pay 5% commission for each banker win.
For example if it takes 100 winning banker hands before ending up at +5 result you are actually break-even at this point because of the commission.
FleaStiff
FleaStiff
  • Threads: 265
  • Posts: 14484
Joined: Oct 19, 2009
February 28th, 2011 at 3:47:17 PM permalink
Well, its obvious that I still don't understand what you are talking about so I think I will bow out of the discussion because as far as I know the hand count in Baccarat can never go beyond 9.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
February 28th, 2011 at 3:59:10 PM permalink
Quote: FleaStiff

Well, its obvious that I still don't understand what you are talking about so I think I will bow out of the discussion because as far as I know the hand count in Baccarat can never go beyond 9.



If every Banker win is "+1" outcome and every Player win is "-1" outcome, he simply asked the probability of "+5" happening before "-15", which is a rather simple mathematical question.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
February 28th, 2011 at 7:51:13 PM permalink
Quote: Jufo81




1 - (q/p)^K
P = -----------
1 - (q/p)^N



Setting K = 15, N = 20 equals your question of reaching +5 count before reaching -15 count. Plugging those values into the formula gives: P = 0.7986 = 79.86%

Likewise for -20 vs. +5: K = 20, N = 25 -> P = 85.08%
Likewise for -25 vs. +5: K = 25, N = 30 -> P = 88.48%
and so on.


Using your formula
=(1-(q/p)^K)/(1-(q/p)^N) in a spreadsheet

K = 15, N = 20; 0.798635722
K = 20, N = 25; 0.850576291
K = 25, N = 30; 0.884674152
You did some interesting rounding on the last 2 just like I do at times.
I could not make my results match yours. Then I saw why.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 1st, 2011 at 3:43:23 AM permalink
Quote: guido111


Using your formula
=(1-(q/p)^K)/(1-(q/p)^N) in a spreadsheet

K = 15, N = 20; 0.798635722
K = 20, N = 25; 0.850576291
K = 25, N = 30; 0.884674152
You did some interesting rounding on the last 2 just like I do at times.
I could not make my results match yours. Then I saw why.



Ah sorry, I was tired when posting so I got the last two digits wrong. But the formula itself is more important than numerical values.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
March 1st, 2011 at 11:30:40 AM permalink
Quote: 98steps

When considering absolute difference, always betting on Banker and carrying the count forward from shoe to shoe as necessary.


The Absolute difference. Scary subject.
Brings up another point in Baccarat.
Almost all Bac players, at least the many I know and play with, think that the Banker wins more hands than the Player and they are correct.

But how much more?

Most will say, 5 to 10 hands per shoe or even more.
So I did a quick study of the The Wizards 1000 Baccarat shoes. A small sample but the results match the math.

The average absolute difference per shoe is 1.028. SD is 8.539. Meaning the Banker wins 38 hands per shoe,on average, and Player wins 37.(rounded numbers).
Totals all Shoes
Banker Wins = 38384 0.458919
Player Wins = 37356 0.446628
Tie Wins = 7900 0.0944524
It is the high SD that makes Bac players "think" the Banker should always win more hands per shoe and leads many to swear at the results when the Player wins more. I always laugh at those players. My wife is one of them.

Distribution from The Wizards 1000 Bac shoes below
There were 46 shoes that ended in a tie. The absolute difference was 0.
Looking at who won the most shoes seems to show Banker wins most shoes, by absolute difference that is.
Banker shoes won 531
Player shoes won 423

The distributions below also shows the Banker winning comparing the same absolute differences.


Banker Player
0 46
1 50 -1 47
2 54 -2 34
3 45 -3 36
4 32 -4 34
5 37 -5 37
6 41 -6 36
7 43 -7 25
8 37 -8 33
9 31 -9 25
10 29 -10 29
11 27 -11 18
12 21 -12 11
13 13 -13 19
14 17 -14 8
15 14 -15 11
16 6 -16 3
17 6 -17 5
18 8 -18 3
19 3 -19 5
20 4 -20 2
21 3 -21 0
22 3 -22 0
23 3 -23 0
24 1 -24 0
25 2 -25 1
26 0 -26 1
27 0 -27 0
28 0 -28 0
29 0 -29 0
30 0 -30 0
31 0 -31 0
32 0 -32 0
33 0 -33 0
34 1 -34 0
35 0 -35 0
36 0 -36 0
37 0 -37 0
38 0 -38 0
39 0 -39 0
40 0 -40 0


In the end, the absolute difference between the two bets is just a statistic, since one can not bet that the Banker or Player will win more hands than the other per shoe. One can win more wagering on the Banker since the lower house edge will cause one to lose less.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 1st, 2011 at 12:06:05 PM permalink
In addition to the formula which gives the probability to end at +5 hand units before ending up at -15, it also possible to derive a formula which gives the expected number of rounds played in the game (the game is terminated when either +5 result or -15 result is reached). The formula is:

T = K/(q-p) - N/(q-p) * [1-(q/p)^K] / [1-(q/p)^N], for p != q

T = K*(N-K), for p = q

So for the OPs question of playing until reaching either +5 Banker wins or -15 Player Wins, the expected number of total rounds played is 71.27, and this is ignoring all ties.
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
March 1st, 2011 at 1:00:05 PM permalink
Quote: Jufo81


So for the OPs question of playing until reaching either +5 Banker wins or -15 Player Wins, the expected number of total rounds played is 71.27, and this is ignoring all ties.


Very nice formula.

Averages, most times by themselves, do not tell a complete story.
A quick 1 million simulation shows the following.
Mean: 71.27
The SD would be 76.88. Quite large.
Median: 43
Mode: 9
Low: 5
High: 1113

Part of my results

hands count relative cumulative
5 33852 0.033852 0.033852
7 41798 0.041798 0.07565
9 42101 0.042101 0.117751
11 39359 0.039359 0.15711
13 35683 0.035683 0.192793
15 32608 0.032608 0.225401
17 29841 0.029841 0.255242
19 27195 0.027195 0.282437
21 25308 0.025308 0.307745
23 23322 0.023322 0.331067
25 21578 0.021578 0.352645
27 20016 0.020016 0.372661
29 18956 0.018956 0.391617
31 18013 0.018013 0.40963
33 17140 0.01714 0.42677
35 16551 0.016551 0.443321
37 15610 0.01561 0.458931
39 14692 0.014692 0.473623
41 14195 0.014195 0.487818
43 13603 0.013603 0.501421
45 13044 0.013044 0.514465
47 12865 0.012865 0.52733
49 12322 0.012322 0.539652
51 12090 0.01209 0.551742
53 11539 0.011539 0.563281
55 11296 0.011296 0.574577
57 10997 0.010997 0.585574
59 10632 0.010632 0.596206
61 10335 0.010335 0.606541
63 9864 0.009864 0.616405
65 9685 0.009685 0.62609
67 9433 0.009433 0.635523
69 9184 0.009184 0.644707
71 9087 0.009087 0.653794
73 8708 0.008708 0.662502
75 8535 0.008535 0.671037
77 8197 0.008197 0.679234
79 8113 0.008113 0.687347
81 7801 0.007801 0.695148
83 7603 0.007603 0.702751
85 7406 0.007406 0.710157
87 7182 0.007182 0.717339
89 7077 0.007077 0.724416
91 6907 0.006907 0.731323
93 6653 0.006653 0.737976
95 6505 0.006505 0.744481
97 6322 0.006322 0.750803
99 6170 0.00617 0.756973
101 5862 0.005862 0.762835


A great site for FREE math programs is at: http://math.exeter.edu/rparris/
I use Winstats for these type of simulations.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 1st, 2011 at 1:25:30 PM permalink
Quote: guido111

Very nice formula.

Averages, most times by themselves, do not tell a complete story.
A quick 1 million simulation shows the following.
Mean: 71.27
The SD would be 76.88. Quite large.
Median: 43
Mode: 9
Low: 5
High: 1113



Ah, I am glad you got the same result. I only calculated the mean to get the average cost of such betting strategy and if you add ties to the 71.27 mean hands, the cost of play seems to be a bit less than one betting unit.

Those formulas I posted are the solutions to the recursive equations of the Markov Chain model of the problem. When the only possible outcomes are -1 or +1 the formulas are still neat, but I once tried to construct analytical formulas for Blackjack risk of ruin problems, and the multiple possible payouts caused the recursive equations to be matrices and solving those matrices to general power ended up being cumbersome task and the formulas became quite ugly so I concluded that for any more complex situations than -1 / +1 payout, simulation is the best way to go ;)
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
March 1st, 2011 at 1:56:49 PM permalink
Quote: Jufo81

Those formulas I posted are the solutions to the recursive equations of the Markov Chain model of the problem. When the only possible outcomes are -1 or +1 the formulas are still neat, but I once tried to construct analytical formulas for Blackjack risk of ruin problems, and the multiple possible payouts caused the recursive equations to be matrices and solving those matrices to general power ended up being cumbersome task and the formulas became quite ugly so I concluded that for any more complex situations than -1 / +1 payout, simulation is the best way to go ;)


Your risk of ruin formula is a bit different from one I use but they arrive at the same answer.

Check out when you get a chance...
http://math.exeter.edu/rparris/winmat.html
Winmat allows the user to calculate and edit matrices, and solve standard linear algebra problems. The program operates in real, complex, and integer mode.

My son uses it all the time. I have yet to study it. Its free with all the other software.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 1st, 2011 at 2:24:21 PM permalink
Quote: guido111

Your risk of ruin formula is a bit different from one I use but they arrive at the same answer.

Check out when you get a chance...
http://math.exeter.edu/rparris/winmat.html
Winmat allows the user to calculate and edit matrices, and solve standard linear algebra problems. The program operates in real, complex, and integer mode.

My son uses it all the time. I have yet to study it. Its free with all the other software.



Ok thanks, will check it out!
98steps
98steps
  • Threads: 4
  • Posts: 119
Joined: Sep 14, 2010
March 1st, 2011 at 8:29:54 PM permalink
Thank you all for all of the excellent information and input.

Would it be possible for me also to ask how to formulate a proper "risk of Ruin" formula?
guido111
guido111
  • Threads: 10
  • Posts: 707
Joined: Sep 16, 2010
March 1st, 2011 at 8:36:42 PM permalink
Quote: 98steps

Thank you all for all of the excellent information and input.

Would it be possible for me also to ask how to formulate a proper "risk of Ruin" formula?


Yes.

The one I use, with examples, can be found here at this forum.
It works great in any spreadsheet like Excel.

https://wizardofvegas.com/forum/questions-and-answers/math/4539-fun-craps-question/#post57576

The formula in this thread is also a RoR formula. Slightly different but arrives at the same answers.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 2nd, 2011 at 4:13:10 AM permalink
Quote: guido111

Yes.

The one I use, with examples, can be found here at this forum.
It works great in any spreadsheet like Excel.

https://wizardofvegas.com/forum/questions-and-answers/math/4539-fun-craps-question/#post57576

The formula in this thread is also a RoR formula. Slightly different but arrives at the same answers.



Actually the RoR formula in that reference and the formula I posted in this thread seem to be the same, I checked. Like mentioned the formula is accurate for OPs simple question but doesn't work with more complex payouts.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 2nd, 2011 at 4:57:18 AM permalink
I found a more general risk of ruin formula posted at another forum:

r = N((-B-ev)/sd) + N((-B+ev)/sd) * e(-2*ev*B)/sd^2)

r = risk of ruin
N = forward normal function
B = bankroll
e = exponential function
ev = EV
sd = standard deviation

Not sure how well it works but might be worth looking into.
nope27
nope27
  • Threads: 5
  • Posts: 126
Joined: Sep 5, 2010
March 2nd, 2011 at 7:23:16 AM permalink
Quote: Jufo81

Actually the RoR formula in that reference and the formula I posted in this thread seem to be the same, I checked. Like mentioned the formula is accurate for OPs simple question but doesn't work with more complex payouts.


The 2 RoR formulas in this thread assume an even money payout.

So for Baccarat, it works well for the Player bet, but not so well for the Banker bet.

Also, flat bets or a very accurate average bet amount is also assumed.

Progression betting or even bets like the field bet in craps with 3 different payouts requires simulation or an advanced formula.
Thank you for the formula you posted.
I will work with it and see how it performs.
Jufo81
Jufo81
  • Threads: 6
  • Posts: 344
Joined: May 23, 2010
March 3rd, 2011 at 5:44:23 AM permalink
Quote: nope27

The 2 RoR formulas in this thread assume an even money payout.

So for Baccarat, it works well for the Player bet, but not so well for the Banker bet.

Also, flat bets or a very accurate average bet amount is also assumed.



Yes but the OPs question was an "even money payout" question as he was only interested in the probabilities of there being N more Banker wins than Player wins and not monetary amounts, so in this case the simple RoR formulas gave precisely correct results.

Quote: nope27


Progression betting or even bets like the field bet in craps with 3 different payouts requires simulation or an advanced formula.
Thank you for the formula you posted.
I will work with it and see how it performs.



True, like I mentioned I once attempted to derive exact analytical RoR formulas for situations with more than 2 payouts and even though it was possible to derive the formulas, they didn't end up being too neat or practical, so a different kind of (approximate) formula like the one I posted above is probably more useful.
  • Jump to: