I have a question with regards to the probability of winning for a Banker, Player and Tie.
Below are the combinations in each market. May I know how did you compute the no. of combinations in each event?
Is there any method or did you used a simulation software or a program to calculate all the possible combinations?
Thanks in advance and more power to your site. :)
Combinations Markets
2,292,252,566,437,888 - Banker
2,230,518,282,592,256 - Player
475,627,426,473,216 - Tie
This is calulated as Permut(416,6) in excel.
These are permutations (order matters) of chosing 6 cards out of 416 for 8 deck game.
Even though in Bacarat some hands go to 4 cards, some to 5 cards and some to 6 cards to do the calculation you take into account the 6 cards and if in a particular hand that would stop at 4 cards all permutations that include the 5th and 6th card count for that.
The individual number of permutations that result in Banker, Plaayer and Tie are calculated using a combinatorial software that goes through every single particular permutation and chekcs whether it is banker player or tie.
And actually the software does not have to go through 5 Quadrillion permutations but a much smaller number since when a hand finishes at 4 cards all resulting 6 card permutations from that are counted. And there are also otehr tricks in the programming that can reduce the number of iterations to a relatively smaller number and the calculation can be done in a split second.
This is the type of thought process needed when working out these things - how can I make the number of calculations fewer.
I iterate through all possible six-card sequences with six nested for loops, each from 0 to 9, and consider all six-tuples (a,b,c,d,e,f). I evaluate the result of each of those (Player/Banker/Tie), and then compute the number of ways that six-tuple can occur. I keep track of the totals with three long long int variables. I have a function long long int getNumber(a,b,c,d,e,f), and another function int getResult(a,b,c,d,e,f) (returns 0, 1, 2). It's fairly trivial programming, less than 200 lines of code. My results match Mike's. I modify this code for side-bet analysis.Quote: gigolo2002phHi Wizard,
I have a question with regards to the probability of winning for a Banker, Player and Tie.
Below are the combinations in each market. May I know how did you compute the no. of combinations in each event?
Is there any method or did you used a simulation software or a program to calculate all the possible combinations?
Thanks in advance and more power to your site. :)
Combinations Markets
2,292,252,566,437,888 - Banker
2,230,518,282,592,256 - Player
475,627,426,473,216 - Tie
It takes about 3 milliseconds to run. This is the way Mike does it as well, I am almost certain.
For those side-bets or game variants where individual cards matter (rank and suit), I modify the program to iterate through every card. Then I have six loops from 0 to 51, so the size of the iteration is 52^6, which is considerably slower. On my computer running 1 thread, it takes about 2 hours.
I found that for each individual shoe in this small sample, a consistent 44% of the winning hands were naturals.
In one shoe, eleven of the first fifteen hands were naturals.
Ten 9's and one 8.
Fifty percent of the winning hands in that shoe were naturals.
Many of these winning hands in my sample were natural eights losing to natural nines.
Does anyone know what the expected percentage of hands won by naturals is?
The naturals appear to me as just one of many "anomalies" pertaining to those Interblock machines at Resorts World in NYC.
I live but 20 minutes drive from there, as opposed to 2 1/2 hrs from AC, but I just can't bet any real dollars into those Baccarat "machines". I just have no trust in their results.
As such, I'm relegated to play only live-dealer games. Too often I've felt like a fool playing those machines, where Goodness only knows how they arrive at each hand's results...and that's a feeling that I just won't allow, especially while gambling.
Stay well.
Please forgive me for asking the obvious (also I haven't read the obvious book if there is one), but what programming language would you recommend (I'm guessing it's c or similar) and how does one run it on a PC. Personally I use scripting under HTML, so could write the code but haven't yet found the best engine to run such code quickly. Many thanks.Quote: teliot...It's fairly trivial programming, less than 200 lines of code....takes about 3 milliseconds to run.
Hi, usually I write code mainly in C or C++. Sometimes in Java. I have a dedicated x86 (Alienware) running Ubuntu Linux where I run these programs. For C/C++, I use the gcc or g++ compilers, and compile with -Ofast (not that I fully understand optimization).Quote: charliepatrickPlease forgive me for asking the obvious (also I haven't read the obvious book if there is one), but what programming language would you recommend (I'm guessing it's c or similar) and how does one run it on a PC. Personally I use scripting under HTML, so could write the code but haven't yet found the best engine to run such code quickly. Many thanks.
Scripting is possible, but will be painfully slow. You might as well learn a real language if you are going to be doing combinatorial analysis. The programming doesn't use any advanced concepts. Because you know scripting, you can easily learn enough if you self-study for a few weeks.
Cheers,
Eliot
My pleasure. The world could use a lot more people who know how to analyze casino games.Quote: charliepatrickThanks
Quote: 98ClubsAbout 40 is very high. The average number of total naturals dealt in a standard game of Baccarat is 30.7. Three of these will be a "double natural" that will either tie or win/lose. Considering 81 rounds per shoe average thats about a 38% occurance (call it 3/8).
Thank you for your response.
If the expected average of total naturals is 38%, then I can accept the 44% that I observed in my small twenty shoe sample.
I believed the average should be slightly less than 19%.
Any links to this information?
Both are naturals = 3.582 023%
One is a natural = 30.722 887%
Neither is a natural = 65.695 090%
So chances of any given hand being natural is 18.943% (2 * "Both"+1 * "One")/2
Now looking at (simple) infinite deck and the chances of one hand of two cards being 8 or 9.
Total initial perms = 169 (AKQJT...2)x(AKQJT...2)
Perms forming 9 = A8,X9,9X,8A,72,63,54,45,36,27 = 16
Perms forming 8 = A7,X8,99,8X,7A,62,53,44,35,26 = 16
So chances of one hand being 8 or 9 is 32/169 = 18.935%
btw I wonder whether there's a bet paying (Evens for 1, 9/1 for two @ 97.27%) although it's fairly countable.
Quote: charliepatrickI worked out the values, based on 8 decks, as follows (for each deal):-
Both are naturals = 3.582 023%
One is a natural = 30.722 887%
Neither is a natural = 65.695 090%
So chances of any given hand being natural is 18.943% (2 * "Both"+1 * "One")/2
btw I wonder whether there's a bet paying (Evens for 1, 9/1 for two @ 97.27%) although it's fairly countable.
Thanks everyone. I see it clearly.
As for the described countable side bet, anything like that would have been eliminated after this:
Thorp
I am interested in mathematics generally, and lately have been looking at baccarat. I wanted to see if I could work out, on my own, the probabilities shown by Mike and confirmed by yourself. Rather than go all-in and work out everything at once, I decided to start small to see if my code was correct before expanding it further. What I have worked out thus far is the odds of each result given that both player and banker have a score of zero after four cards (of an eight-deck shoe) have been drawn.
I have a total of 169,332 possible combinations (412 x 411) for the fifth and sixth cards drawn. There are 416 cards in total - 4 have been drawn already.
Of these combinations, I have determined 72576 wins for the player, the same amount for the banker and 24180 ties.
This gives me percentages of 42.86018 for the player and banker and 14.27964 for ties. They are close to what Mike has but they do not match. I have thought about this for a while and tried a few things to find numbers to get the same percentages as Mike with no success. Since you have written code already I was hoping you would be able to suggest why my numbers might be different.
As I said, this is purely for my own mathematical curiosity.
And now I notice this thread is over four years old, but I think it is worth taking a shot at asking.
Kind regards
Phrater Phil
I would never work these out by hand. I cannot imagine it. See my post above where I describe how I do it. I am not sure what to add. If there is some part of this you don't understand, let me know your question. If you want to consider a 0-0 tie, you have to look at all six-tuples (a,b,c,d,e,f) that yield this tie.Quote: PhraterPhilHi Teliot
I am interested in mathematics generally, and lately have been looking at baccarat. I wanted to see if I could work out, on my own, the probabilities shown by Mike and confirmed by yourself. Rather than go all-in and work out everything at once, I decided to start small to see if my code was correct before expanding it further. What I have worked out thus far is the odds of each result given that both player and banker have a score of zero after four cards (of an eight-deck shoe) have been drawn.
I have a total of 169,332 possible combinations (412 x 411) for the fifth and sixth cards drawn. There are 416 cards in total - 4 have been drawn already.
Of these combinations, I have determined 72576 wins for the player, the same amount for the banker and 24180 ties.
This gives me percentages of 42.86018 for the player and banker and 14.27964 for ties. They are close to what Mike has but they do not match. I have thought about this for a while and tried a few things to find numbers to get the same percentages as Mike with no success. Since you have written code already I was hoping you would be able to suggest why my numbers might be different.
As I said, this is purely for my own mathematical curiosity.
And now I notice this thread is over four years old, but I think it is worth taking a shot at asking.
Kind regards
Phrater Phil
In case you didn't read it:
I iterate through all possible six-card sequences with six nested for loops, each from 0 to 9, and consider all six-tuples (a,b,c,d,e,f). I evaluate the result of each of those (Player/Banker/Tie), and then compute the number of ways that six-tuple can occur. I keep track of the totals with three long long int variables. I have a function long long int getNumber(a,b,c,d,e,f), and another function int getResult(a,b,c,d,e,f) (returns 0, 1, 2). It's fairly trivial programming, less than 200 lines of code. My results match Mike's. I modify this code for side-bet analysis.
It takes about 3 milliseconds to run. This is the way Mike does it as well, I am almost certain.
For those side-bets or game variants where individual cards matter (rank and suit), I modify the program to iterate through every card. Then I have six loops from 0 to 51, so the size of the iteration is 52^6, which is considerably slower. On my computer running 1 thread, it takes about 2 hours.
Thank-you for replying. I really appreciate it.
I did read the entire thread. I have a programming background so I understand the code you are describing. What I have done effectively is what you have suggested. I work out the results for each six-tuple where the first four values are 0.
Perhaps you can get extra information from your program so we can compare results. To start with, I can tell you that I have worked out for the player drawing 0,0 and the banker drawing 0,0 there are 256,032,000 ways this can happen with a starting shoe of eight decks and no burn cards. Both player and banker are forced to draw a third card. So all up there are 43,354,410,624,000 six-tuples. I have approached this problem in two ways: one in a spreadsheet and one in a program.
If you can, please let me know what numbers you get for the six-tuples (0,0,0,0,X,X). I expect it is a matter of iterating the four outer loops from 0 to 0 instead of 0 to 9. This is what I have done in code.
Thanks again Teliot.
Kind regards,
Phrater Phil
Quote: TankoThank you for your response.
If the expected average of total naturals is 38%, then I can accept the 44% that I observed in my small twenty shoe sample.
I believed the average should be slightly less than 19%.
Any links to this information?
Sorry for the delay, 44% works out to about 35 2/3 Naturals per average shoe. I noted during your trials that you thought the number was consistent. A few morre of those samples might indicate some small bias, but as it stands as a one-off observation that is not extreme. It is very high, and if consistant through hundreds of shoes, I would have some concern. However there is no apparant wager upon Naturals dealt (in total would be fair), so such an observation is near moot. But if you suspect that the game "decides" a winner by dealing a Natural, then there would be concern. Class II (Lottery-style) gaming might employ such a trick. Class III (standard randomzed/fair gaming) should never do this.
Number of 0-0 ties: 28,979,901,420,544. There are 3100 unique ways to get a 0-0 tie.Quote: PhraterPhilHworked out for the player drawing 0,0 and the banker drawing 0,0 there are 256,032,000 ways this can happen with a starting shoe of eight decks and no burn cards.
There are 4,998,398,275,503,360 total hands in the CA. Don't worry if all six cards are used or not, you still cycle over all six-tuples for the CA, not just those where the six cards are needed. Never iterate over just the four outer loops. That is not how to analyze baccarat.Quote:Both player and banker are forced to draw a third card. So all up there are 43,354,410,624,000 six-tuples.
for (a = 1; a <= 10; a++) {
for (b = 1; b <= 10; b++) {
for (c = 1; c <= 10; c++) {
for (d = 1; d <= 10; d++) {
for (e = 1; e <= 10; e++) {
for (f = 1; f <= 10; f++) {
x = getPlayer(a,b,c,d,e,f);
y = getBanker(a,b,c,d,e,f);
gN = getNumber(a,b,c,d,e,f);
totalHands += gN;
if (x > y)
player += gN;
else
if (y > x)
banker += gN;
else
if (y == x)
tie += gN;
else
exit(1);
if (x == 0 && y == 0)
total_0_0 += gN;
} } } } } }
long long int getNumber(int a1, int b1, int c1, int d1, int e1, int f1) {
long long int number = 1;
int freq[11] = {0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 128};
number *= freq[a1]--;
number *= freq[b1]--;
number *= freq[c1]--;
number *= freq[d1]--;
number *= freq[e1]--;
number *= freq[f1];
return number;
}
Teliot, thank you so much for your time and patience. I really appreciate your help.
Kind regards
Phrater Phil
Cheers.
And now I do :)
Cheers
Phrater Phil
apheat.net
No way, I just wrote a C++ program that output the data for this sheet as a CSV file.Quote: charliepatrickI assume you've worked out the combinations of cards and their perms by dragging and dropping the actual values from another master spreadsheet into this one
Quote: teliotI just posted a spreadsheet that explains it all and allows you to do just about any other baccarat computation (that doesn't involve suits). No computers necessary. However, you will need to learn the Excel function "sumifs".
this is an old post, but bac is the same.
i got the excel, tried to figure out how it works,,, it is great of Eliot.
and now in Macau, MGM and wynn are all forune 6 bac table( winning banker of 6 of 2 cards 1:12, 3 cards, 1:20), i tried to use Eliot's excel and find the EOR like this:
standard house edge
CARD -0.16683572 EOR
A -0.167159715 -0.00032399
2 -0.167119596 -0.00028388
3 -0.167772142 -0.00093642
4 -0.167085144 -0.00024942
5 -0.166982297 -0.00014658
6 -0.171987132 -0.00515141
7 -0.163138636 0.00369708
8 -0.163597636 0.00323808
9 -0.164252134 0.00258359
10 -0.167442484 -0.00060676
these EORS is as effective as dragon 7, but then house edge is high, then start at true count +7.
in macau, 1 deck is cut, then no one wants to count it, i guess.
can anybody help me to check if it is right? (by the say, i used it to do a lot of eors for some other asia bac side bets.)