• The Logic of the Losing Shoe

    For those in the casino industry, especially for us surveillance folks, the words ‘losing shoe’ are all too familiar.

    A losing shoe is a period of play, normally lasting the length of one shoe of cards (which may be from one to as many decks as the shoe can hold!), which registers a substantial loss.

    Ever wondered how that loss limit was set?

    In considering this question, it is useful to once again refer to our central limit theorem.  Here is the graph again.

    bellcurve

    (Source: http://schools-wikipedia.org/)

    The central limit theorem proposes that up to 99.9% of all occurrences happen between -3 to -1 and 1 to 3 σs from the average or mean.  σ extends into the positive (meaning 1 to 3 σ) and negative (meaning -1 to -3 σ).

    In order to derive any sort of boundary in a casino game, one has to calculate the following:

    1. Probability Of Events Occurring (for more complex calculations, refer to: https://excelpunks.com/concepts-8-combinatorial-analysis-counting-possible-outcomes-and-creating-your-own-casino-game/)
    2. Mean Or Average Probability Of An Event Occurring (this is to determine the average expected result)
    3. Standard Deviation Of The Event Occurring (this is to determine σ)

    Probability Of Events Occurring

    The probability of events refers to the mathematical probability of an event.  This can be calculated by determining the possible outcomes of what you are trying to measure and then dividing that by the total possible outcomes for an event.

    A simple example would involve a single deck of cards.  The probability of drawing an Ace of Spades is 1/52, since there is only one Ace of Spades in the deck.  The probability of drawing an Ace of any suit is 4/52, since there are four Aces in the deck.

    Mean Or Average Probability Of An Event Occurring

    For this, we turn to binomial distribution.  Binomial distribution calculates the means and standard deviations of occurrences that have one of two outcomes.

    Example: Baccarat

    Baccarat is a good example, where the outcome is either a Player or Banker.  For simplicity, let’s disregard coups ending in a tie for now.

    Formula for the mean (binomial distribution):

    N x P = Number of trials of an event x probability of the event occurring

    We generally know that the Banker has a probability of 0.458597 while the Player has that of 0.446247, with Ties making up the difference.

    For a shoe where the player wagered exclusively on Banker for 40 coups, the mean win for him would be:

    40 x 0.458597 = 18.34388 (this means that he would be expected to win 18.34388 coups)

    Formula for the standard deviation (binomial distribution):

    SQUARE ROOT(N x P x Q) = SQUARE ROOT (Number of trials of an event x probability of an event occurring x probability of an event NOT occurring)

    The standard deviation for that kind of play as described above would be:

    SQUARE ROOT(40 x 0.458597 x (1-0.458597)) = SQUARE ROOT(9.931431) =3.151417

    *the greater the difference between P and Q, the smaller the standard deviation!

    Standard Deviation Of The Event Occurring

    Here is a table calculating the number of coups a player wagering exclusively on Banker would win from a 40 coup shoe in terms of σ.

    Total Coups Mean σ -3 σ -2 σ -1 σ 1 σ 2 σ 3 σ
    40 18.3438 3.1514 18.3438 – (3 x 3.1514) = 8.8896 coups 18.3438 – (2 x 3.1514) = 12.041 coups 18.3438 – (1 x 3.1514) = 15.1924 coups 18.3438 + (1 x 3.1514) = 21.4952 coups 18.3438 + (2 x 3.1514) = 24.6466 coups 18.3438 + (3 x 3.1514) = 27.798 coups

    Now, to determine the expected result in dollars, we will multiply the player’s wager (assuming he wagered on ALL coups) by the coups he is expected to win or lose.

    Determining Whether You Have a Losing Shoe

    I have included 2 values, assuming average wagers of $1 and $5.  You can add zeros to the backs of the average wagers as you please!

    Percentage of Players Winning at that level 2.50% 13% 34% 50% 34% 13% 2.50%
    Average Wager Standard Deviations -3 σ -2 σ -1 σ Mean 1 σ 2 σ 3 σ
    $1 Winning Coups 8.8896 12.041 15.1924 18.3438 21.4952 24.6466 27.798
    Losing Coups 31.1104 27.959 24.8076 21.6562 18.5048 15.3534 12.202
    Expected Result ($22.67) ($16.52) ($10.37) ($4.23) $1.92 $8.06 $14.21
    Percentage of Players Winning at that level 2.50% 13% 34% 50% 34% 13% 2.50%
    Average Wager Standard Deviations -3 σ -2 σ -1 σ Mean 1 σ 2 σ 3 σ
    $5 Winning Coups 8.8896 12.041 15.1924 18.3438 21.4952 24.6466 27.798
    Losing Coups 31.1104 27.959 24.8076 21.6562 18.5048 15.3534 12.202
    Expected Result ($113.33) ($82.60) ($51.87) ($21.15) $9.58 $40.30 $71.03

    You can see that on average, players are expected to lose to the house.  But when they start to win, the losing shoe is called – but at what point?

    Notice the percentage levels above each σ.  This means that for -2 σ, 13% of players would achieve a result of -$16.52, wagering at $1 a coup.  At the mean, 50% of players would achieve a loss of -$4.23, wagering at $1 a coup.

    To put that in perspective, a player wagering on Banker for 40 coups at $5,000 a coup would be expected to lose -$21,150.  If that player starts to win more than $9,580, you might want to watch him more closely.  A win of $40,300 would be unlikely and a win of $71,030, even more so.  You would definitely want to call a losing shoe at that point!

    The Z-Table

    Now, the -3 to 3 σ measurement didn’t just pop out of nowhere.  These measurements are derived from the Z-table.

    Notice that the Z-table shows 0.0 to 3.0 down by the left and 0.00 to 0.09 on the top.  This is the measurement in terms of σ, from 0.00 to 3.09.

    Z-table

    You can determine the probability of σ by following the row on the left where the first 2 digits of your σ result appear to where it meets the column titled by the 3rd digit of your σ.

    Examples:

    0.16 σ would be 0.5636

    1.82 σ would be 0.9656

    The table is true for positive and negative σs, meaning that reading for -1.56 σ would be the same as 1.56 σ, which would be 0.9406.

    You can set your own σ levels depending on your appetite for risk.

    Good luck!

  • Predict Your Casino’s Future Earnings from Past Data – Linear Regression

    Linear regression is a statistical tool for projecting future outcomes based on previous historical data.  A good example of this would be using the average wager to win/loss data from patrons to project how much a casino would be making for a particular period.

    Here’s the formula:

    Outcome = (Variable Multiplier x Variable) + Constant

    Or

    Y = bX + a

    This means that in order to find out the projected win/loss for a certain period, we would have to use a combination of a Constant Factor in addition to a Variable that is affected by a multiplier.

    We can find Y and X by getting the means of both data (the mean of the win/loss and average wager).

    We find b by using the following formula:

    b = r x (standard deviation of Y / standard deviation of X)

    r = sum of (individual X values – mean of X) x (individual Y values – mean of Y) / sum of (individual X values – mean of X)2 x (individual Y values – mean of Y)2

    Yes, it all looks complicated, but we’ll go through an example and you should be able to get it right away.

    Let’s look at an example:

    Here’s some data detailing the win/loss of 5 players with their accompanying average wagers.  If a player were to wager $50, what would his win/loss be, based on this data?

    Win/Loss Average Wager
    -15 5
    -30 10
    -45 15
    -65 20
    -80 25

    Step 1:

    Find the average of the win/loss and average wager.

    Average Win/Loss = -15 + -30 + -45 + -65 + -80 / 5 = -47

    Average Wager = 5 + 10 + 15 + 20 +25 / 5 = 15

    Step 2:

    Subtract the mean from each category from each observed result and then square the results.

    Win/Loss Average Wager Win/Loss – Mean (Win/Loss – Mean)2 Average Wager – Mean (Average Wager – Mean)2
    -15 5 -15 – (-47) = 32 32 x 32 = 1024 5 – 15 = -10 -10 x -10 = 100
    -30 10 -30 – (-47) = 17 17 x 17 = 289 10 – 15 = -5 -5 x -5 = 25
    -45 15 -45 – (-47) = 2 2 x 2 = 4 15 – 15 = 0 0 x 0 = 0
    -65 20 -65 – (-47) = -18 -18 x -18 = 324 20 – 15 = 5 5 x 5 = 25
    -80 25 -80 – (-47) = -33 -33 x -33 = 1089 25 – 15 = 10 10 x 10 = 100

    Step 3:

    This is a unique step, where we take the results of the Win/Loss – Mean and multiply it by the Average Wager – Mean.

    Win/Loss – Mean Average Wager – Mean Win/Loss – Mean  x Average Wager – Mean
    -15 – (-47) = 32 5 – 15 = -10 32 x -10 = -320
    -30 – (-47) = 17 10 – 15 = -5 17 x -5 = -85
    -45 – (-47) = 2 15 – 15 = 0 2 x 0 = 0
    -65 – (-47) = -18 20 – 15 = 5 -18 x 5 = -90
    -80 – (-47) = -33 25 – 15 = 10 -33 x 10 = -330

    Step 4:

    Sum the squared results – this is known as the Sum of Squares.

    Sum of Squares (Win/Loss) = 1024 + 289 + 4 + 324 + 1089 = 2730

    Sum of Squares (Average Wager) = 100 + 25 + 0 +25 + 100 = 250

    Sum of Squares (Win/Loss x Average Wager) = -320 + -85 + 0 + -90 + -330 = -825

    r = -825 / SQRT(2730 x 250) = -0.99863

    Now, if we square r2 = -0.99863 x -0.99863 = 0.997253 or 99.7253% – this is the probability that Y is caused by X.  This means that the probability that a higher average wager equates to a higher loss is 99.7253%!

    Step 5:

    Now, we can find b.

    b = r x (standard deviation of Y / standard deviation of X) = -0.99863 x (SQRT(2730/5-1) / SQRT(250/5-1)) = -0.99863 x 26.1247/7.905694 = -0.99863 x 3.304542 = -3.3

    Step 6:

    Let’s find a now.

    Y = bX +a

    Remember that we just use the means of win/loss (-47) and average wagers (15) as Y and X.

    -47 = -3.3 x 15 + a

    -47 – (-3.3 x 15) = a

    2.5 = a

    Step 7:

    Excellent.  Now that we have all the values for our equation, we can start projection.

    So, here’s our question again: If a player were to wager $50, what would his win/loss be, based on this data?

    Y = -3.3 x 50 + 2.5

    Y = $-162.5 – someone wagering $50 is thus expected to lose $162.50.  Done.

    Standard Error and T-Value

    There is an additional component to the linear regression model which gauges the likelihood of the 2 data sets used in the model being correlated.

    Standard Error = SQRT(((sum of (individual observed Y values – individual expected Y values from our model)2))/number of data pairs – number of parameters) / SQRT(sum of (individual X values – mean of X)2)

    Standard Error is the measure of how much the linear model would deviate either positively or negatively.

    Win/Loss Average Wager Expected Win/Loss from our Linear Model (Win/Loss – Expected Win/Loss from our Linear Model)2
    -15 5 5 x -3.3 + 2.5 = -14 1
    -30 10 10 x -3.3 + 2.5 = -30.5 0.25
    -45 15 15 x -3.3 + 2.5 = -47 4
    -65 20 20 x -3.3 + 2.5 = -63.5 2.25
    -80 25 25 x -3.3 + 2.5 = -80 0

    In our example, Standard Error = SQRT(((1+0.25+4+2.25+0)/5 – 2) / SQRT(250)

    = 1.581139 / 15.81139

    = 0.1

    This means that our linear model could deviate positively or negatively by 0.1 x σ, as probability goes according to the central limit theorem.

    T-Value = b/standard error

    = -3.3 / 0.1 = -33

    We now compare -33 against the T table with our degrees of freedom being 5-2 = 3.

    Linear Regression

    We see that our reading of -33 is way off the charts!  That means it is ALMOST CERTAIN that average wager correlates to a loss.

    Multivariate Regression

    How then do we calculate a linear regression model with 2 variables?  How would we calculate the win/loss of patrons by their average wagers AND time spent at the table?  Here’s our data again, but with an additional factor, TIME.

    Win/Loss Average Wager Time
    -15 5 15
    -30 10 30
    -45 15 35
    -65 20 45
    -80 25 60

    Now, our formula is a bit different.

    Y = bX1 + bX2 + a

    Y, X1 and X2 are still calculated the same way, by finding the means of the values.

    a can be found once we have the b values for X1 and X2.

    So, what about b, then?  There are now 2 b values, each being a multiplier of X1 and X2.  Let’s call them b1 and b2

    b1 = r1 x (standard deviation of Y/standard deviation of X1)

    b2 = r2 x (standard deviation of Y/standard deviation of X2)

    Now that more than 1 variable is being used, r is a lot different.

    r1 = (r(X1Y) – (r(X2Y) x r(X1 X2)) / 1- r(X1 X2)2

    r2 = (r(X2Y) – (r(X1Y) x r(X1 X2)) / 1- r(X1 X2)2

    I know, like WTF?  Yeah, I thought so too at first.  But remember that we KNOW how to get r for 2 different sets of values:

    r = sum of (individual X values – mean of X) x (individual Y values – mean of Y) / sum of (individual X values – mean of X)2 x (individual Y values – mean of Y)2

    So, r(X1Y) is just r with values from X1 and Y.  r(X2Y) is just r with values from X2 and Y.  r(X1 X2) is just r with values from X1 and X2.

    All we have to do, is to substitute values in our formula!  Here’s how.

    Win/Loss Average Wager Time Win/Loss – Mean Average Wager – Mean Time – Mean (Win/Loss – Mean)2 (Average Wager – Mean)2 (Time – Mean)2 (Win/Loss – Mean) x (Average Wager – Mean) (Win/Loss – Mean) x (Time – Mean) (Average Wager – Mean) x (Time – Mean)
    -15 5 15 32 -10 -22 1024 100 484 -320 -704 220
    -30 10 30 17 -5 -7 289 25 49 -85 -119 35
    -45 15 35 2 0 -2 4 0 4 0 -4 0
    -65 20 45 -18 5 8 324 25 64 -90 -144 40
    -80 25 60 -33 10 23 1089 100 529 -330 -759 230
    Mean -47 15 37
    Total 2730 250 1130 -825 -1730 525

    Step 1: Find the correlation values.

    r(X1Y) = -825 / SQRT(2730 x 250) = -0.998625429

    r(X2Y) = -1730 / SQRT(2730 x 1130) = -0.984975794

    r(X1 X2) = 525 /SQRT(250 x 1130) = 0.987756912

    Step 2: Determine the cross correlation values.

    r1 = (r(X1Y) – (r(X2Y) x r(X1 X2)) / 1- r(X1 X2)2

    = (-0.998625429 – (-0.984975794 x 0.987756912)) / 1-0.9877569122

    = -1.056397148

    r2 = (r(X2Y) – (r(X1Y) x r(X1 X2)) / 1- r(X1 X2)2

    = (-0.984975794 – (-0.998625429 x 0.987756912)) / 1-0.9877569122

    = 0.05848779

    Step 3: Determine b values

    b1 = r1 x (standard deviation of Y/standard deviation of X1)

    = -1.056397148 x (SQRT(2730/4-1)/SQRT(250/4-1))

    = -1.056397148 x (26.1247/7.90569415)

    = -3.490909091

    b2 = r2 x (standard deviation of Y/standard deviation of X2)

    = 0.05848779 x (SQRT(2730/4-1)/SQRT(1130/4-1))

    = 0.05848779 x (26.1247/16.8)

    = 0.090909091

    Step 4: Fill in the values in the formula

    Y = bX1 + bX2 + a

    -47 = -3.490909091 x 15 + 0.090909091 x 37 + a

    -47 = -52.36363636 + 3.363636364 + a

    -47-(-52.36363636 + 3.363636364) = a

    2 = a

    So, if we wanted to find the win/loss of someone who wagers $100 for 60 minutes, the answer would be:

    Y = -3.490909091 x 100 + 0.090909091 x 60 + a

    = $-341.6363636

    Standard Error and T-Value (Multivariate Regression)

    Here’s something extra.

    Standard Error = SQRT(((sum of (individual observed Y values – individual expected Y values from our model)2))/number of data pairs – number of parameters) / SQRT((sum of (individual X values – mean of X)2) x (1- r(X1 X2)2)

    T1 = b1/Standard Error

    T2 = b2/Standard Error

  • Creating A Casino Game

    We’ve discussed the process for the creation of a casino game, namely:

    1. Calculating possibilities using combinatorial analysis
    2. Calculating the expectation
    3. Setting the odds

    Let’s use a simple example – something I saw in a Chinese drama.

    The game involves using 5 coins and tumbling them in an opaque container.  The container is then placed base up and players are then invited to make their wagers based on the permutations of the coins.

    Here are the calculations based on some of the possible wager types I can think of:

    Combinations Permutations Probability Expectation Break-Even Odds
    Total (5 + 2 -1!) / (5! X 2-1!) = 6 25 = 32
    5 Tails 2! / 2! = 1 5! / 5! = 1 1/32 = 0.03125 0.03125 – (1-0.03125) =

    -0.9375

    0.96875/0.03125 = 31
    5 Heads 2! / 2! = 1 5! / 5! = 1 1/32 = 0.03125 0.03125 – (1-0.03125) =

    -0.9375

    0.96875/0.03125 = 31
    4 Tails 1 Head 2! / 1! X 1! =2 in total (1 for each variation) 5! / 4! X 1! = 5 5/32 = 0.15625 0.15625– (1-0.15625) =

    -0.6875

    0.84375/0.15625 = 5.4
    4 Heads 1 Tail 5! / 4! X 1! = 5 5/32 = 0.15625 0.15625 – (1-0.15625)=

    -0.6875

    0.84375/0.15625 = 5.4
    3 Tails 2 Heads 2! / 1! X 1! =2 in total (1 for each variation) 5! / 3! X 2! = 10 10/32 = 0.3125 0.3125– (1-0.3125)=

    -0.375

    0.6875/0.3125 = 2.2
    3 Heads 2 Tails 5! / 3! X 2! = 10 10/32 = 0.3125 0.3125– (1-0.3125)=

    -0.375

    0.6875/0.3125 = 2.2
    More Heads Than Tails 1 + 1 + 1 = 3 1 + 5 + 10 = 16 – 1 (for all Heads) = 15 15/32 =

    0.46875

    0.46875– (1-0.46875) =

    -0.0625

    0.53125/0.46875 =

    1.133333

    More Tails Than Heads 1 + 1 + 1 = 3 1 + 5 + 10 = 16 – 1 (for all Tails) =15 15/32 = 0.46875 0.46875– (1-0.46875) =

    -0.0625

    0.53125/0.46875 =

    1.133333

    Based on the above, so long as you do not pay beyond the breakeven odds, the expectation should always be in your favour.

    I hope the calculations are clear to you and help you understand the subject.

    As an additional consideration, you might want to think about how the central limit theorem plays into the variation of results.  Here’s how it is done.

    Recall that according to the theory, should everything be perfect, all results would fall within the 1 – 3σ ranges.

    bellcurve

    (Source: http://schools-wikipedia.org/)

    The table above details in essence, only 4 types of wagers.  Here is a condensed version for clarity.

    Combinations Permutations Probability Expectation Break-Even Odds
    5 Tails / Heads 2! / 2! = 1 5! / 5! = 1 1/32 = 0.03125 0.03125 – (1-0.03125) =

    -0.9375

    0.96875/0.03125 = 31
    4 Tails 1 Head / 4 Heads 1 Tail 2! / 1! X 1! =2 in total (1 for each variation) 5! / 4! X 1! = 5 5/32 = 0.15625 0.15625– (1-0.15625) =

    -0.6875

    0.84375/0.15625 = 5.4
    3 Tails 2 Heads / 3 Heads 2 Tails 2! / 1! X 1! =2 in total (1 for each variation) 5! / 3! X 2! = 10 10/32 = 0.3125 0.3125– (1-0.3125)=

    -0.375

    0.6875/0.3125 = 2.2
    More Tails Than Heads / More Heads Than Tails 1 + 1 + 1 = 3 1 + 5 + 10 = 16 – 1 (for all Tails) =15 15/32 = 0.46875 0.46875– (1-0.46875) =

    -0.0625

    0.53125/0.46875 =

    1.133333

    Now, we shall use the binomial distribution to find the mean probability and standard deviation of each wager to find the 1 σ, 2 σ and 3 σ probabilities of each wager.

    Why?  By knowing the limits of each σ range, we would be able to calibrate the odds again based on, in general, how much the house wants to win.

    Binomial Distribution

    Let’s try an example for a 5 Tails/Heads Wager.

    Mean: n x p = 1 x probability of winning = 1 x 0.03125 (for a 5 Tails/Heads wager)

    Standard Deviation: √n x p x q = √number of trials x prob. of winning x prob. of losing

    = √1 x 0.03125 x 0.96875 = 0.173993

    Mean

    (probability of winning)

    Probability

    of Losing

    Standard

    Deviation (SD)

    1 σ 2 σ 3 σ
    5 Tails / Heads 0.03125 0.96875 0.173993 Mean + (SD x 1)

    = 0.205243

    Mean + (SD x 2)

    = 0.379235

    Mean + (SD x 3)

    = 0.553228

    4 Tails 1 Head / 4 Heads 1 Tail 0.15625 0.84375 0.363092 Mean + (SD x 1)

    = 0.519342

    Mean + (SD x 2)

    = 0.882434

    Mean + (SD x 3)

    = 1.245527

    3 Tails 2 Heads / 3 Heads 2 Tails 0.3125 0.6875 0.463512 Mean + (SD x 1)

    = 0.776012

    Mean + (SD x 2)

    = 1.239525

    Mean + (SD x 3)

    = 1.703037

    More Tails Than Heads / More Heads Than Tails 0.46875 0.53125 0.499022 Mean + (SD x 1)

    = 0.967772

    Mean + (SD x 2)

    = 1.466795

    Mean + (SD x 3)

    = 1.965817

    This is an interesting analysis as we see that for 3 Tails 2 Heads / 3 Heads 2 Tails and More Tails Than Heads / More Heads Than Tails wagers at the 2 σ range, the expectation already goes against the house, being a positive expectation for the player.

    1 σ Breakeven Odds at 1 σ 2 σ Breakeven Odds at 2 σ 3 σ Breakeven Odds at 3 σ
    5 Tails / Heads Mean + (SD x 1)

    = 0.205243

    (1-0.205243)/ 0.205243

    = 3.872282

    Mean + (SD x 2)

    = 0.379235

    (1-0.379235)/ 0.379235

    = 1.636886

    Mean + (SD x 3)

    = 0.553228

    (1-0.553228)/ 0.553228

    = 0.807573

    4 Tails 1 Head / 4 Heads 1 Tail Mean + (SD x 1)

    = 0.519342

    (1-0.519342)/ 0.519342

    = 0.925513

    Mean + (SD x 2)

    = 0.882434

    (1-0.882434)/ 0.882434

    = 0.133229

    Mean + (SD x 3)

    = 1.245527

    (1-1.245527)/ 1.245527

    = -0.19713

    3 Tails 2 Heads / 3 Heads 2 Tails Mean + (SD x 1)

    = 0.776012

    (1-0.776012)/ 0.776012

    = 0.288639

    Mean + (SD x 2)

    = 1.239525

    (1-1.239525)/ 1.239525

    = -0.19324

    Mean + (SD x 3)

    = 1.703037

    (1-1.703037)/ 1.703037

    = -0.41281

    More Tails Than Heads / More Heads Than Tails Mean + (SD x 1)

    = 0.967772

    (1-0.967772)/ 0.967772

    = 0.033301

    Mean + (SD x 2)

    = 1.466795

    (1-1.466795)/ 1.466795

    = -0.31824

    Mean + (SD x 3)

    = 1.965817

    (1-1.965817)/ 1.965817

    = -0.49131

    Not to worry, as the 2 σ is expected to occur only 15% of the time and as σ swings bothways, going into the positive as well as negative, everyone else (85%) will lose either at the probability range or more.

    This should also tell you that you would expect a higher level of variation in your results with the 3 Tails 2 Heads / 3 Heads 2 Tails and More Tails Than Heads / More Heads Than Tails wagers, with the house winning almost all the time for the other wager types.

  • For My Driving Instructor

    Download: https://drive.google.com/file/d/0B1pEq2dN7H9AWi1qNHdBY2J1QVk/view?usp=sharing

    I came across an interesting situation with my driving instructor.  He was collating a list of all the lessons the instructors in his team had taught for the day and the result of the lesson, being a pass or fail.

    He was collating this data by hand and I asked if I could help him.  I don’t think he took me seriously, but here is the solution – dear instructor, this is for you if you happen across this site.

    The spreadsheet uses a macro that automates the creation of a pivot table – with some basic VBA thrown in.

    Remember to ‘Enable Macros’ when you open the file and press the button ‘Process Data’.

  • We have seen how knowing the expectation enables us to set the odds of games.  If you recall, the formula for calculating the expectation for any wager is :

    (Probability of winning x the amount a wager would win) – (Probability of losing x the amount a wager would lose)

    So, if you wanted to create your own casino game, you would have to go through the following process:

    1. Calculating Probabilities of outcomes
    2. Calculating the Expectation
    3. Setting the Odds

    From the previous posts, you would have already figured out 2 and 3.

    How do we then get the probabilities of games?  This is perhaps the most fundamental aspect of casino games.  To do this, we would need to learn about combinatorial analysis.

    Combinatorial analysis is about counting possibilities.  This is essential when trying to determine the probabilities of events, such as a pair in Baccarat or a full house in poker.  Knowing how to calculate these probabilities then allows you to derive expectation and from there, you can set the odds.

    The 2 basic categories of combinatorial analysis are permutations and combinations.

    Dr. James Tanton developed a brilliant method to calculate permutations and combinations.  His use of labelling is highly effective, fast and easy to learn.

     http://gdaymath.com/courses/permutations-and-combinations/

    However, if you are keen to learn the slower and conventional method, read on…

    Permutations and combinations can be further sub-divided into 2 categories, permutations or combinations with or without repeatable elements.  Ready?

    Permutations where you can repeat elements

    The alphabet has 26 letters from A to Z.  If you were to make a permutation of 3 REPEATABLE letters, you’d be able to repeat them, like AAA or BBA or BAB or ABB or XDX or DXX or XXD.

    In a permutation, ABB would count as 1 outcome, just as BAB would count as 1 and BBA would count as 1.  They contain the same letters, but in a different order.

    So, the number of permutations you’d be able to make would be 26 x 26 x 26 = 17,576

    A similar example would be 3 dice in 3 separate glasses.  Let’s call them D1, D2 and D3.  The dice are tumbled 3 times with the following results:

    D1 D2 D3
    1 2 2
    2 1 2
    2 2 1

    Although the number 1 appears once and 2 appears twice in each permutation, they each count as 1 separate outcome by themselves.  The total number of outcomes is then 3.  So, for 3 dice, the total number of permutations would be = 6 x 6 x 6 = 216

    Permutation where you can’t repeat

    Now, if you were to make a permutation of 3 UNREPEATABLE letters, every time you used a letter, it could not be used again, like ABC, TRF or ZLD.  This means that your pool of letters gets reduced each time you use one.

    But remember, just like permutations with repeatable letters, permutations like ABC or CAB or BAC would each count as 1 possible outcome in themselves.  They may contain the same letters, but their difference in order makes them each 1 distinct outcome.

    The number of permutations you’d then be able to get for a 3 unrepeatable letter permutation is = 26 x 25 x 24 = 15,600

    A similar example would be how many 52-card permutations you could make from a 52-card deck where each time a card is drawn, it is then discarded. The number of permutations for that would be = 52 x 51 x 50 x …x1

    = 80,658,175,170,943,900,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

    If you wanted only a 5-card permutation, the formula would be

    = 52 x 51 x 50 x 49 x 48

    = 311,875,200

    Permutations are generally used when we want to compute the total possible outcomes for all events.

    Factorials

    By now you would have noticed that there are certain formulas that multiply numbers in descending order, like 3 x 2 x 1 or 52 x 51 x 50 x 49…x1.  This is called a factorial number and is symbolised in this fashion 3! – being 3 x 2 x 1.  So, 6! would be 6 x 5 x 4 x 3 x 2 x 1.

    Combinations where you can repeat elements

    Combinations are sequences where we are only concerned with the appearance of certain elements.  Computing combinations is used mainly for determining the categories of possible outcomes.

    Let’s return to the 26-letter alphabet example.  If we wanted a 3-letter combination from the alphabet, sequences like ABB, BBA or BAB would count as 1, just as XXY, XYX and YXX would also count as 1.  The number of times the letters appear is what is important – how they are arranged is not.

    The number of 3 letter combinations from a 26 letter alphabet is

    = (total number of letters + 3 letters -1)! / (3 letters! X  26-1 letters!)

    = (26 + 3 – 1)! / (3! x 26-1!)

    = 28! / (3! X 25!) = 3,276

    A similar example would be the 3 dice in 3 glasses example.  If we just wanted to find the number of 3-dice combinations, the following sequences from 3 trials would count as 1 combination:

    D1 D2 D3
    1 2 2
    2 1 2
    2 2 1

    The number of times the numbers appear, number 1 once and number 2 twice, is all that matters.

    So, the number of 3-number combinations from a 3-dice roll would be =

    = (total number of numbers on 1 die + 3 dice -1)! / (3 dice! X  6-1 numbers!)

    =(6+3-1)! / (3! X 6-1!)

    = 8! / (3! X 5!) = 56

    Which, if you look at the table below, showing the possible combinations from a 3-dice roll, is accurate:

    S/No Combination
    1 111
    2 112
    3 113
    4 114
    5 115
    6 116
    7 122
    8 123
    9 124
    10 125
    11 126
    12 133
    13 134
    14 135
    15 136
    16 144
    17 145
    18 146
    19 155
    20 156
    21 166
    22 222
    23 223
    24 224
    25 225
    26 226
    27 233
    28 234
    29 235
    30 236
    31 244
    32 245
    33 246
    34 255
    35 256
    36 266
    37 333
    38 334
    39 335
    40 336
    41 344
    42 345
    43 346
    44 355
    45 356
    46 366
    47 444
    48 445
    49 446
    50 455
    51 456
    52 466
    53 555
    54 556
    55 566
    56 666

    Remember that computing the combinations where elements can be repeated ALSO counts in combinations where elements can’t be repeated.  They will all be counted.  This is essential to remember when you are designing your own games.

    Knowing how to count the possible combinations of events is helpful in planning the layout of a table game.

    Combinations where you can’t repeat elements

    A good example for this is when you want to determine how many 3-dice combinations there are when you cannot repeat numbers.  In Sic-Bo, this is known as a 3-Single-Dice Combination.  This counts 123, 321 and 231 as 1 possible outcome only.

    The formula for this is

    = number of numbers on 1 die! / number of dice! x (number of numbers on 1 die- number of dice)!

    = 6! / 3! X (6-3)!

    =6! / 3! X 3!

    = 20

    Which again, if you examine the table below, is accurate:

    S/No Combination
    1 123
    2 124
    3 125
    4 126
    5 134
    6 135
    7 136
    8 145
    9 146
    10 156
    11 234
    12 235
    13 236
    14 245
    15 246
    16 256
    17 345
    18 346
    19 356
    20 456

    These are foundational principles in combinatorial analysis.

    So, how do you count permutations and combinations in a practical way?

    A great example is the calculation of how many 3-of-a-kinds are possible from a 52-card deck in a 5-card poker hand.

    This will be deemed as a combination question as the order in which the cards appear is irrelevant – the casino pays if the hand contains a 3-of-a-kind, regardless of the order in which it appears in your hand.

    Dr. Tanton’s model solves this question easily (his model is so versatile, it ignores the permutation-combination issue entirely!  If you haven’t watched it, please do) :

    The issue is a matter of labelling the cards.  We have 52 cards and 5 are to be labelled as your hand and the other 47 as not, so:

    52! / (5! X 47!) = 2,598,960 possible combinations from a 52-card deck where your hand contains 5 cards.

    Now, we know that the 52-card deck is really 13 numbers from Ace to King, with 4 copies in the form of suits, Hearts, Clubs, Diamonds and Spades.

    So, following the labelling technique, we have 13 numbers in total.  Any one of these could be the 3-of-a-kind, so we label 1 number as the 3-of-a-kind, 2 numbers as the remaining cards in the hand (remember, that these 2 numbers should not form a pair, or we’d get a Full House!) and the remaining 10 numbers as those not included in the hand.

    Part 1 of the calculation looks like this:

    = 13!/(1! X 2! X 10!) = 858 (this determines the combinations by numbers only)

    We have to settle the suit portion.  So, we’ll decide the suits of the 3-of-a-kind as well as the other 2 cards. We have 4 suits, of which the 3-of-a-kind must have 3.  The other 2 cards will be of any suit as well.

    Part 2 of the calculation looks like this:

    = 4!/(3! X 1!) x 4!(1!/3!) x 4!(1!/3!) = 64

    Finally, the total combinations containing a 3-of-a-kind is =

    858 x 64 = 54,912.

    To determine the probability, we divide the possible outcomes for a 3-of-a-kind by the total possible outcomes of 2,598,960

    = 54,912/2,598,960 = 0.021128 or 2.1128%

    A royal flush has 4 combinations, with the following calculation:

    Total outcomes = 52!/(5! X 47!) = 2,598,960

    There are only 5 cards out of 13 that can be used for a royal flush (A,K,Q,J,10)  = 5!/5! = 1

    1 suit out of 4 = 4!/(1! X 3!) = 4

    Total outcomes for a royal flush = 1 x 4 = 4

    Probability = 4 / 2,598,960 = 0.000001539 or 0.0001539%

    Now, the following calculations are for a hypothetical situation where a wager wins on a 3-of-a-kind and loses on every other result – this part will help to explain a more complicated situation later on!

    Expectation

    What is the expectation of a 3-of-a-kind, then?

    = 0.021128 – (1-0.021128) = 0.021128 – 0.978872 = -0.95774

    Break-Even Payment

    And our break-even payment would be:

    The losing probability / the winning probability

    = 0.978872 /0.021128 = 46.33 (this is the point in terms of odds at which the expectation would be 0)

    Remember to add a 1 to this number if the wager is consumed whether the wager wins or not as is the case with jackpots. Alternatively, just take 1/0.021128 = 47.33. This works too.

    And now, the complicated situation I mentioned earlier…

    The above situation would be accurate if your wager only wins on a 3-of-a-kind and loses on every other result, but remember that your poker wager pays on other results as well! For this, we would need to table all the possible win and loss results:

    Player Wins With A… Combinations Permutations Outcomes Probability
    1 Royal Flush                       1                      4                  4   0.0000015391
    2 Straight Flush                       9                      4                36   0.0000138517
    3 4 of A Kind                   156                      4              624   0.0002400960
    4 Full House                   156                    24          3,744   0.0014405762
    5 Flush               1,287                      4          5,108   0.0019654015
    6 Straight                     10               1,024        10,200   0.0039246468
    7 3 of A Kind                   858                    64        54,912   0.0211284514
    8 2 Pairs                   858                  144      123,552   0.0475390156
    9 Pair               2,860                  384   1,098,240   0.4225690276
    Nothing               1,287               1,024   1,302,540   0.5011773940

    Step 1:

    An approach to determining a break-even payout for each winning result would be as follows:

    Player Wins With A… Probability Win/Loss Multiple Expectation
    1 Royal Flush     0.00000154               36,181.67 0.05568638
    2 Straight Flush     0.00001385                 4,020.19 0.05568638
    3 4 of A Kind     0.00024010                    231.93 0.05568638
    4 Full House     0.00144058                      38.66 0.05568638
    5 Flush     0.00196540                      28.33 0.05568638
    6 Straight     0.00392465                      14.19 0.05568638
    7 3 of A Kind     0.02112845                         2.64 0.05568638
    8 2 Pairs     0.04753902                         1.17 0.05568638
    9 Pair     0.42256903                         0.13 0.05568638
    Nothing     0.50117739 -1 -0.50117739
    Total Expectation 0.0000

    The above table gives an equal expectation for each winning result, with the break-even payment being the Win/Loss Multiple.

    Step 2:

    This method takes the expectation for a losing wager, being -0.50117739 and dividing the absolute number by the number of winning wager types, meaning 0.50117739 / 9 = 0.055686.

    Step 3:

    Then, taking 0.055686, we divide this number by the probability of the winning wager type, so for a Royal Flush, 0.055686 / 0.00000154 = 36,181.67. A Four-of-a-kind would yield  0.055686 / 0.00024010 = 231.93, this being the break-even payment.

    Remember to add a 1 to the break-even payment if the wager is consumed whether the wager wins or not as is the case with jackpots – this results in a different expectation for all the wagers. Alternatively, just take (1/9) / Probability of the Wager, to get equal expectation for all wagers.

    Jackpots

    BUT!  The jackpot has to be paid out as well. Remember that the jackpot wager wins only on a Straight Flush (usually 10% of the jackpot) or a Royal Flush (100% of the jackpot)

    So, as long as the wager + jackpot payout for a royal flush does not exceed 36,181.67 times of the original wager, expectation should still be in favour of the house.

    If the original back bet is $10 and assuming the payment for a royal flush is 100 times, then so long as the jackpot payout is LESS THAN 36,181.67 – 100 = 36,081.67 times the $10 wager or $360,816.70, the expectation should still be in the favour of the house.  Of course, there’s no need to do this, but this establishes the upper limits of the maths.

    Now, why is this even useful?

    1. Knowing the total possible outcomes for an event allows us to calculate its probability.
    2. Being able to do that then allows us to calculate the expectation of an event and to match payment odds according to the level of house edge desired.
    3. We would also know how much further we’d be able to calibrate the odds in our payments

    Now, the most important question

    How much can I increase my payment odds before the expectation goes against the house?

    The answer is simple = probability of losing / probability of winning

    You can test this in a simple manner.  Let’s have a single die roll. The probability of winning on number 1 is 1/6.  The probability of losing is 5/6.  Let’s assume a 1:1 payment.

    Our expectation for this kind of wager would be = (1/6 x 1) – (5/6 x 1) = -0.667

    If we divide 5/6 by 1/6, we get =0.833333 / 0.166667 = 5 (at this point, the expectation for the house would be 0)

    Let’s test this out.  Assuming now that we make our payment odds 5:1 for winning on number 1, our expectation would be = (0.166667 x 5) – (0.833333 x 1) = 0

    As long as you keep your payment odds below this level, the expectation will always be in favour of the house.

    Trust me, the players know this too.

    The odds for many games have already been optimized to their limit – any higher and the advantage would go to the player!

    Of, course the edge for the house has to be balanced with the ability to entice a player to wager in the first place.  Understanding the mechanics underpinning your casino’s games goes a long way to maximising their profitability.

    Who knows, you may even create your own best-selling game!

    Appendix:

    Sic-Bo Calculations

    Wager Combinations Permutations
    Specific Triples 6! / (1! X5!)

    = 720 / 1 x 120

    = 720 / 120

    = 6 (6/6 numbers = 1 combination per number from 1 to 6.)

    3! / (3!)

    = 6 / 6

    = 1 per combination

    Specific Doubles

    (this excludes specific triples)

    6! / (1! X 1! X 4!)

    = 720 / 24

    = 30 ((30/6 numbers = 5 combinations per number from 1 to 6.)

    3! / (2! X 1!)

    = 6 / 2

    = 3 per combination

    2 Dice and Single Die Combination 6! / (1! X 1! X 4!)

    = 720 / 24

    = 30

    3! / (2! X 1!)

    = 6 /2

    = 3 per combination

    3 Single Die Combination 6! / (3! X 3!)

    = 720 / 6 x 6

    =720 / 36

    =20

    3! / (1! X 1! X 1!)

    = 6 / 1

    = 6 per combination

    2 Dice Combination 6! / (2! X 4!)

    = 720 / 2 x 24

    = 720 / 48

    = 15

    Each combination would have 4 combinations where all 3 numbers are unique and 2 combinations where one of the numbers is a repeat, so:

    4 x 6 = 24

    2 x 3 = 6

    24 + 6 = 30 per combination

    Single Die Single:  6! / (3! X 3!) = 720 / 36 = 20 (each number appears in 10 of these 20 combinations)

    Double:6! / (1! X 1! X 4!) = 720 / 24 = 30/6 numbers = 5 combinations per number

    Triple:   6! / (1! X 5!) = 720 / 120 = 6/6 = 1 combination per number

    Single:    3! / (1! X 1! X 1!) = 6 x 10 = 60 + 15 (from the combinations where other numbers appear twice) = 75

    Double:  3! / (2! X 1!) = 3 x 5 = 15

    Triple:     3! / 3! = 1 x 1 =1

    Total (6+3-1)!/3! X (6-1)!

    = 40,320 / 720

    = 56

    6 x 6 x 6 = 216

    Poker Calculations:

    Hand Face Value Suit Total Combinations
    Royal Flush 5! / 5! = 1

    There are only 5 possible cards that can form a royal flush (A,K,Q,J and 10)

    4! / (1! X 3!) = 4 1 x 4 = 4
    Straight Flush (excluding Royal Flushes) 9 possible cards that can form a straight flush without being a royal flush (K,Q,J,10,9 – 5) 4! / (1! X 3!) = 4 9 x 4 = 36
    4 of a Kind 13! / (1! X 1! X 11!) = 156 (4! / 4!) x (4! / (1! X 3!))  = 1 x 4 = 4 156 x 4 = 624
    Full House 13! / (1! X 1! X 11!) = 156 (4! / (3! X 1!)) x (4! / (2! X 2!)) = 4 x 6 = 24 156 x 24 = 3,744
    Flush 13! / (5! X 8!) = 1287 4! / (1! X 3!) = 4 1287 x 4 = 5148 – 36 (straight flushes) and – 4 (royal flushes)

    = 5,108

    Straight There are 10 possible cards that can start a straight (in descending order of value), from A to 5. (4! / (1! X 3!))5 = 1024 10 x 1024 = 10,240 – 36 (straight flushes) – 4 (royal flushes) = 10,200
    3 of a Kind 13! / (1! X 2! X 10!) = 858 4! / (3! X 1!) x (4! / (1! X 3!)) x (4! / (1! X 3!)) = 64 858 x 64 = 54,912
    2 Pairs 13! / (2! X 1! X 10!) = 858 4! / (2! X 2!) x (4! / (2! X 2!)) x (4! / (1! X 3!)) = 144 858 x 144 = 123,552
    1 Pair 13! / (1! X 3! X 9!) = 2860 4! / (2! X 2!) x (4! / (1! X 3!)) x (4! / (1! X 3!)) x (4! / (1! X 3!)) = 384 2860 x 384 = 1,098,240
    Total 52! / (5! X 47!) = 2,598,960
  • Hi Everyone,

    Requirements: Excel ver. 2007
    Download: Essential Excel in a Day

    Excelpunks would like to present its very own Excel course, Essential Excel in A Day.

    The course includes:

    • Step-by-step instructions on some of the most useful Excel functions, like CONCATENATE, SUMIF and Pivot Tables
    • Sample data to practise with
    • Examples of each lesson for analysis
    • Video demonstrations on some of the more interesting functions

    It’s all at no charge.

    Please feel free to use, distribute and instruct.  Teach yourself and teach others!

    Excelpunks.

  • What if you wanted to compare different areas with different numbers of machines on your gaming floor? What if you wanted to know if a certain area was receiving more profit than another?

    In a previous post, we looked at how we can measure the effects of a change in machine settings on the earnings of a group of slot machines, using a dependent T-Test.

    For the post, see here: https://excelpunks.com/comparisons-using-t-tests/

    If you recall, a dependent T-test compares the differences in means of data with identical sample sizes before and after treatment – our data being the earnings of a slot machine and the treatment being a change in settings.

    An independent T-test allows us to compare data sets with different numbers of samples to determine if they are statistically different.

    Here’s an example:

    A casino has 2 slot zones, Zone 1, with 5 machines and Zone 2, with 10 machines.  We want to find out if one area is earning more than another.

    Here’s the data.

    Zone 1 Machines Earnings Zone 2 Machines Earnings
    1 $16 1 $8
    2 $12 2 $10
    3 $11 3 $15
    4 $20 4 $15
    5 $15 5 $14
    6 $15
    7 $12
    8 $8
    9 $13
    10 $13

    Step 1:

    Calculate the mean earnings of each zone.

    Zone 1 mean = (16 + 12 + 11 + 20 + 15) / 5 = $14.80

    Zone 2 mean = (8 + 10 + 15 + 15 + 14 + 15 + 12 + 8 + 13 + 13) / 10 = $12.40

    Step 2:

    Subtract each machine’s individual earnings from their respective zone means and square the result.

    Zone 1 Machines Earnings Earnings – Zone 1 Mean Square Zone 2 Machines Earnings Earnings – Zone 2 Mean Square
    1 $16 16-14.80 = 1.2 $1.44 1 $8 8-12.40 = -4.4 $19.36
    2 $12 12-14.80 = -2.8 $7.84 2 $10 10-12.40 = -2.4 $5.76
    3 $11 11-14.80 = -3.8 $14.44 3 $15 15-12.40 = 2.6 $6.76
    4 $20 20-14.80 = 5.2 $27.04 4 $15 15-12.40 = 2.6 $6.76
    5 $15 15-14.80 = 0.2 $0.04 5 $14 14-12.40 = 1.6 $2.56
    6 $15 15-12.40 = 2.6 $6.76
    7 $12 12-12.40 = -0.4 $0.16
    8 $8 8-12.40 =  -4.4 $19.36
    9 $13 13-12.40 = 0.6 $0.36
    10 $13 13-12.40 = 0.6 $0.36

    Step 3:

    Now add the results together and divide them by the total number of samples -2.

    Zone 1 = 1.44 + 7.84 + 14.44 + 27.04 + 0.04 = 50.80

    Zone 2 = 19.36 + 5.76 + 6.76 + 6.76 + 2.56 + 6.76 + 0.16 + 19.36 + 0.36 + 0.36 = 68.20

    50.80 + 68.20 = 119

    119 / 5+10-2 = 119/13 = 9.15 (this is known as the Pooled Variance)

    Step 4:

    Divide the pooled variance by the respective sample sizes of the 2 zones, add the result and finally square root that.

    (9.15 / 5) + (9.15/10) = 1.83 + 0.92 = 2.75

    Square Root 2.75 = 1.657

    Step 5:

    Now, we take the difference of the means for Zone 1 and 2 and divide it by 1.657.  This is known as your T-statistic.

    T = 14.80 – 12.40 / 1.657 = 2.40 / 1.657 = 1.448267583 or 1.448

    Step 6 (Finally):

    Compare the T-statistic with the T-table.  Looking at this table, we get our degrees of freedom, or df, by subtracting 2 from 5+10 = 13.  Now, we will find our T-statistic on this table.

    Ind T

    We see that our T-statistic of 1.448 is between 90% – 95% on a one-tailed test.  This means that we are between 90% – 95% sure that from this sample data, Zone 1’s earnings are higher than Zone 2’s earnings.

    Perhaps you might want to place more machines in Zone 1 then?

    Here’s the formula for an independent T-test:

    T = mean1 – mean2 / sqrt((pooled variance / n1) + (pooled variance / n2))

    Here’s a spreadsheet that allows you to compare data using the Independent T-test.  Just paste your data in the columns A and B and click ‘Compute’!

    https://drive.google.com/file/d/0B1pEq2dN7H9Aa3RTdng3b1d1M00/view?usp=sharing

  • Roulette – An Analysis

    Roulette is played by spinning a ball around a wheel.  The wheel contains 37 to 38 numbered pockets from 0 to 36 for a 37-numbered wheel and 00 and 0 to 36 for a 38-numbered wheel.

    The winning number is decided by which numbered pocket the ball comes to rest on.  Payment is then made based on where a player has wagered on a layout displaying all the numbers on the wheel.

    This table assesses the wagers for Single-Zero (European) Roulette:

    Double-0

    European Roulette (Single Zero)
    Wager Numbers covered Probability (Win) Probability (Loss) Expectation Break-even odds
    Straight Up 1 0.02703 0.97297 -0.94595 36.00
    Split 2 0.05405 0.94595 -0.89189 17.50
    Street 3 0.08108 0.91892 -0.83784 11.33
    Corner 4 0.10811 0.89189 -0.78378 8.25
    6-Line 6 0.16216 0.83784 -0.67568 5.17
    Dozen 12 0.32432 0.67568 -0.35135 2.08
    Column 12 0.32432 0.67568 -0.35135 2.08
    Small (1-18) 18 0.48649 0.51351 -0.02703 1.06
    Big (19-36) 18 0.48649 0.51351 -0.02703 1.06
    Red 18 0.48649 0.51351 -0.02703 1.06
    Black 18 0.48649 0.51351 -0.02703 1.06
    Even 18 0.48649 0.51351 -0.02703 1.06
    Odd 18 0.48649 0.51351 -0.02703 1.06

    This table assesses the wagers for Double-Zero (American) Roulette:

    Single-0

    American Roulette (Double Zero)
    Wager Numbers covered Probability (Win) Probability (Loss) Expectation Break-even odds
    Straight Up 1 0.02632 0.97368 -0.94737 37.00
    Split 2 0.05263 0.94737 -0.89474 18.00
    Street 3 0.07895 0.92105 -0.84211 11.67
    Corner 4 0.10526 0.89474 -0.78947 8.50
    6-Line 6 0.15789 0.84211 -0.68421 5.33
    Dozen 12 0.31579 0.68421 -0.36842 2.17
    Column 12 0.31579 0.68421 -0.36842 2.17
    Small (1-18) 18 0.47368 0.52632 -0.05263 1.11
    Big (19-36) 18 0.47368 0.52632 -0.05263 1.11
    Red 18 0.47368 0.52632 -0.05263 1.11
    Black 18 0.47368 0.52632 -0.05263 1.11
    Even 18 0.47368 0.52632 -0.05263 1.11
    Odd 18 0.47368 0.52632 -0.05263 1.11

    Wager lists the specific wager type players can make on the layout.

    Numbers covered indicates how many numbers the wager will be counted to be wagered on.  If the ball rests on any of the numbers covered by this wager, the wager is paid.

    Probability (Win) indicates the probability that this wager will win. This is calculated by:

    = Numbers covered/total numbers on the layout (37 for Single-Zero and 38 for Double-Zero)

    Example:

    For a Corner (Single-Zero) wager, 4/37 = 0.10811

    Probability (Loss) indicates the probability that the wager will lose.  The calculation for this is 1-Probability (Win).

    Example:

    For a Street (Double-Zero) wager, 3/38 = 1-0.07895 = 0.92105

    Expectation is the Probability (Win) – Probability (Loss).

    Example:

    For a Street (Double-Zero) wager, 0.07895 – 0.92105= -0.84211

    Break-even odds indicates the odds at which the expectation for the house is 0.  The house should ALWAYS pay BELOW these odds to maintain a positive expectation.

  • Chi2

    The Chi2 distribution tests for the difference between the observed and the expected in terms of frequencies.  We can apply this to a simple example:

    In double-zero roulette, we have 38 numbers and the expected probability of any one of these numbers appearing is 1/38 or 0.026316 or 2.6316%.  Now, assuming you track all the results that appear on your roulette tables, you’d be able to check for biased wheels or even if your dealers have developed the muscle memory to spin at a regular area of the wheel.

    As with all things probable, do note that nothing is impossible.  It may be unlikely, but never impossible.  Always correlate your findings with footage from surveillance.

    Number Probability
    0-0 0.026316
    0 0.026316
    1 0.026316
    2 0.026316
    3 0.026316
    4 0.026316
    5 0.026316
    6 0.026316
    7 0.026316
    8 0.026316
    9 0.026316
    10 0.026316
    11 0.026316
    12 0.026316
    13 0.026316
    14 0.026316
    15 0.026316
    16 0.026316
    17 0.026316
    18 0.026316
    19 0.026316
    20 0.026316
    21 0.026316
    22 0.026316
    23 0.026316
    24 0.026316
    25 0.026316
    26 0.026316
    27 0.026316
    28 0.026316
    29 0.026316
    30 0.026316
    31 0.026316
    32 0.026316
    33 0.026316
    34 0.026316
    35 0.026316
    36 0.026316

    Let’s say we have tracked 1,000 spins on a particular roulette table.  We are thus expecting that each number would have appeared 1,000 x 0.026316 = 26.316 times.  Do note that you would have to give or take an allowance of -1σ to 1σ based on the central limit theorem.

    Here are our results based on 1,000 spins:

    Number Probability Expected Occurrence
    00 0.0263 26.3158 13
    0 0.0263 26.3158 32
    1 0.0263 26.3158 32
    2 0.0263 26.3158 27
    3 0.0263 26.3158 39
    4 0.0263 26.3158 20
    5 0.0263 26.3158 33
    6 0.0263 26.3158 23
    7 0.0263 26.3158 10
    8 0.0263 26.3158 36
    9 0.0263 26.3158 29
    10 0.0263 26.3158 17
    11 0.0263 26.3158 38
    12 0.0263 26.3158 14
    13 0.0263 26.3158 11
    14 0.0263 26.3158 25
    15 0.0263 26.3158 20
    16 0.0263 26.3158 16
    17 0.0263 26.3158 11
    18 0.0263 26.3158 12
    19 0.0263 26.3158 28
    20 0.0263 26.3158 17
    21 0.0263 26.3158 45
    22 0.0263 26.3158 24
    23 0.0263 26.3158 43
    24 0.0263 26.3158 25
    25 0.0263 26.3158 10
    26 0.0263 26.3158 21
    27 0.0263 26.3158 43
    28 0.0263 26.3158 23
    29 0.0263 26.3158 42
    30 0.0263 26.3158 30
    31 0.0263 26.3158 18
    32 0.0263 26.3158 45
    33 0.0263 26.3158 40
    34 0.0263 26.3158 41
    35 0.0263 26.3158 17
    36 0.0263 26.3158 30

    To find the Chi2 value, the following formula applies:

    Sum of all (observed values – expected values)2 / expected values

    This works out to be the following:

    Number Probability Expected Occurrence Observed – Expected Observed – Expected2 Observed – Expected2/Expected Sum
    1 0.03 26.32 13 -13.32 177.31 6.74 172.984
    1 0.03 26.32 32 5.68 32.31 1.23
    1 0.03 26.32 32 5.68 32.31 1.23
    2 0.03 26.32 27 0.68 0.47 0.02
    3 0.03 26.32 39 12.68 160.89 6.11
    4 0.03 26.32 20 -6.32 39.89 1.52
    5 0.03 26.32 33 6.68 44.68 1.70
    6 0.03 26.32 23 -3.32 10.99 0.42
    7 0.03 26.32 10 -16.32 266.20 10.12
    8 0.03 26.32 36 9.68 93.78 3.56
    9 0.03 26.32 29 2.68 7.20 0.27
    10 0.03 26.32 17 -9.32 86.78 3.30
    11 0.03 26.32 38 11.68 136.52 5.19
    12 0.03 26.32 14 -12.32 151.68 5.76
    13 0.03 26.32 11 -15.32 234.57 8.91
    14 0.03 26.32 25 -1.32 1.73 0.07
    15 0.03 26.32 20 -6.32 39.89 1.52
    16 0.03 26.32 16 -10.32 106.42 4.04
    17 0.03 26.32 11 -15.32 234.57 8.91
    18 0.03 26.32 12 -14.32 204.94 7.79
    19 0.03 26.32 28 1.68 2.84 0.11
    20 0.03 26.32 17 -9.32 86.78 3.30
    21 0.03 26.32 45 18.68 349.10 13.27
    22 0.03 26.32 24 -2.32 5.36 0.20
    23 0.03 26.32 43 16.68 278.36 10.58
    24 0.03 26.32 25 -1.32 1.73 0.07
    25 0.03 26.32 10 -16.32 266.20 10.12
    26 0.03 26.32 21 -5.32 28.26 1.07
    27 0.03 26.32 43 16.68 278.36 10.58
    28 0.03 26.32 23 -3.32 10.99 0.42
    29 0.03 26.32 42 15.68 245.99 9.35
    30 0.03 26.32 30 3.68 13.57 0.52
    31 0.03 26.32 18 -8.32 69.15 2.63
    32 0.03 26.32 45 18.68 349.10 13.27
    33 0.03 26.32 40 13.68 187.26 7.12
    34 0.03 26.32 41 14.68 215.63 8.19
    35 0.03 26.32 17 -9.32 86.78 3.30
    36 0.03 26.32 30 3.68 13.57 0.52

    So, our Chi2 is 172.984.

    We now look for this figure on the chi2 table.  The numbers at the top are the probability percentages and the column on the left marked df just refer to the number of categories you are looking at -1.  In our case, it’ll be 38-1 or 37.  We’ll look at df=40 as it is the closest to 37.

    Chi2.1

    Our chi value of 172.984 exceeds all the probabilities on the chi2 table, which means that there is DEFINITELY a PROBABILITY of the wheel or the dealer being or doing something out of the ordinary.

    So, which ones?

    Residuals

    We can look at each number from 00 – 36 and identify which ones were out of the ordinary.  We do this by calculating what is called a residual.  This is just fancy for how different each result is from the expected.  Here’s the formula:

    Observed result – Expected result / Square root (Expected result)

    So, for 00, the formula would translate to:

    13 – 26.32 / square root(26.32) = -13.32/5.129 = -2.59573

    Number Probability Expected Occurrence Observed – Expected Residual
    0-0 0.03 26.32 13 -13.32 -2.59573
    0 0.03 26.32 32 5.68 1.108057
    1 0.03 26.32 32 5.68 1.108057
    2 0.03 26.32 27 0.68 0.133377
    3 0.03 26.32 39 12.68 2.472608
    4 0.03 26.32 20 -6.32 -1.23117
    5 0.03 26.32 33 6.68 1.302993
    6 0.03 26.32 23 -3.32 -0.64637
    7 0.03 26.32 10 -16.32 -3.18053
    8 0.03 26.32 36 9.68 1.8878
    9 0.03 26.32 29 2.68 0.523249
    10 0.03 26.32 17 -9.32 -1.81598
    11 0.03 26.32 38 11.68 2.277672
    12 0.03 26.32 14 -12.32 -2.40079
    13 0.03 26.32 11 -15.32 -2.9856
    14 0.03 26.32 25 -1.32 -0.25649
    15 0.03 26.32 20 -6.32 -1.23117
    16 0.03 26.32 16 -10.32 -2.01092
    17 0.03 26.32 11 -15.32 -2.9856
    18 0.03 26.32 12 -14.32 -2.79066
    19 0.03 26.32 28 1.68 0.328313
    20 0.03 26.32 17 -9.32 -1.81598
    21 0.03 26.32 45 18.68 3.642223
    22 0.03 26.32 24 -2.32 -0.45143
    23 0.03 26.32 43 16.68 3.252351
    24 0.03 26.32 25 -1.32 -0.25649
    25 0.03 26.32 10 -16.32 -3.18053
    26 0.03 26.32 21 -5.32 -1.03624
    27 0.03 26.32 43 16.68 3.252351
    28 0.03 26.32 23 -3.32 -0.64637
    29 0.03 26.32 42 15.68 3.057415
    30 0.03 26.32 30 3.68 0.718185
    31 0.03 26.32 18 -8.32 -1.62105
    32 0.03 26.32 45 18.68 3.642223
    33 0.03 26.32 40 13.68 2.667544
    34 0.03 26.32 41 14.68 2.86248
    35 0.03 26.32 17 -9.32 -1.81598
    36 0.03 26.32 30 3.68 0.718185

    All the residuals are now in terms of σ!  If you recall, the central limit theorem infers that all data should fall within the -3σ to 3σ region in relation to the mean.

    bellcurve

    (Source: http://schools-wikipedia.org/)

    The majority of outcomes would occur within the -1σ to 1σ region.  So a reading of -2.59573 means that the number 00 has been occurring less times than expected.

    Conversely, a reading of 3.642223 for number 32, indicates that the number 32 has occurred 3.642223σs more than the mean.  Definitely worth some time investigating.

  • Sic-Bo is really popular in Asia.  This game involves 3 dice in a tumbler or variant which is tumbled, with varying payments for specific combinations of the dice.

    There is an amazing way to calculate how many possible outcomes for a particular score from 3 six-sided dice there can be.  This involves the use of polynomial multiplication.

    Here’s a simple way to look at this…

    You have 3 dice with numbers from 1 to 6 on each of them.

    Die 1 1 2 3 4 5 6
    Die 2 1 2 3 4 5 6
    Die 3 1 2 3 4 5 6

    Now, add each number from Die 1 to the first number of Die 2 and then the second and so on like this.

    Die 1
    Die 2 1 2 3 4 5 6
    1 2 3 4 5 6 7
    2 3 4 5 6 7 8
    3 4 5 6 7 8 9
    4 5 6 7 8 9 10
    5 6 7 8 9 10 11
    6 7 8 9 10 11 12

    Now, add each of these 36 results to the first number of Die 3 and then the second and so on like this.

    Die 3
    Die 1 and 2 results 1 2 3 4 5 6
    2 3 4 5 6 7 8
    3 4 5 6 7 8 9
    4 5 6 7 8 9 10
    5 6 7 8 9 10 11
    6 7 8 9 10 11 12
    7 8 9 10 11 12 13
    3 4 5 6 7 8 9
    4 5 6 7 8 9 10
    5 6 7 8 9 10 11
    6 7 8 9 10 11 12
    7 8 9 10 11 12 13
    8 9 10 11 12 13 14
    4 5 6 7 8 9 10
    5 6 7 8 9 10 11
    6 7 8 9 10 11 12
    7 8 9 10 11 12 13
    8 9 10 11 12 13 14
    9 10 11 12 13 14 15
    5 6 7 8 9 10 11
    6 7 8 9 10 11 12
    7 8 9 10 11 12 13
    8 9 10 11 12 13 14
    9 10 11 12 13 14 15
    10 11 12 13 14 15 16
    6 7 8 9 10 11 12
    7 8 9 10 11 12 13
    8 9 10 11 12 13 14
    9 10 11 12 13 14 15
    10 11 12 13 14 15 16
    11 12 13 14 15 16 17
    7 8 9 10 11 12 13
    8 9 10 11 12 13 14
    9 10 11 12 13 14 15
    10 11 12 13 14 15 16
    11 12 13 14 15 16 17
    12 13 14 15 16 17 18

    Now, by counting the number of instances that each number appears in this table, we would have the number of possible outcomes for each score.  This works on any number of dice.

    Points Number of possible outcomes Probability (Win) Probability (Loss) Expectation Break-Even Odds
    3 1 0.0046 0.9954 -0.9907 215.00
    4 3 0.0139 0.9861 -0.9722 71.00
    5 6 0.0278 0.9722 -0.9444 35.00
    6 10 0.0463 0.9537 -0.9074 20.60
    7 15 0.0694 0.9306 -0.8611 13.40
    8 21 0.0972 0.9028 -0.8056 9.29
    9 25 0.1157 0.8843 -0.7685 7.64
    10 27 0.1250 0.8750 -0.7500 7.00
    11 27 0.1250 0.8750 -0.7500 7.00
    12 25 0.1157 0.8843 -0.7685 7.64
    13 21 0.0972 0.9028 -0.8056 9.29
    14 15 0.0694 0.9306 -0.8611 13.40
    15 10 0.0463 0.9537 -0.9074 20.60
    16 6 0.0278 0.9722 -0.9444 35.00
    17 3 0.0139 0.9861 -0.9722 71.00
    18 1 0.0046 0.9954 -0.9907 215.00

    The following table lists the most common wager types and their respective details.

    Wager Number of possible outcomes Probability (Win) Probability (Loss) Expectation Break-Even Odds
    Specific Triple 6 combinations and 1 possible outcome each 0.0046 0.9954 -0.9907 215
    Any Triple 6 0.0278 0.9722 -0.9444 35.00
    Specific Doubles 16 (15 + 1(the specific triple of that number)) 0.0741 0.9259 -0.8519 12.50
    Big/Small 105 (108 possible outcomes – 111,222,333 (for small) ,444,555 and 666 (for big)) 0.4861 0.5139 -0.0278 1.06
    Even/Odd 105 (108 possible outcomes – 111,333,555 (for odd) ,222,444 and 666 (for even)) 0.4861 0.5139 -0.0278 1.06
    2 Dice and Single Die Combination 30 combinations and 3 possible outcomes for each 0.0138 0.9861 -0.9722 71
    3 Single Die Combination 20 combinations and 6 possible outcomes for each 0.0277 0.9722 -0.9444 35

    Points refers to the total value from a 3-dice roll, from 3 to 18.

    The number of possible outcomes is derived from tabulating all possible outcomes from a 3-dice roll. The total number of possible outcomes is 216 or 6 x 6 x 6 (this is the formula for a permutation where repetition is allowed).

    Probability (Win) refers to the possible outcomes for each number divided by the total possible outcomes from a 3-dice roll.

    Example:

    For point 5, 6/216 = 0.0278

    For point 10, 27/216 = 0.1250

    Probability (Loss) is 1-Probability (Win).

    Example:

    For point 5, 1-0.0278=0.9722

    For point 9, 1-0.1157=0.8843

    Expectation is Probability (Win) – Probability (Loss).

    Example:

    For point 9, 0.1157 – 0.8843 = -0.7685

    In the table the expectation has a ‘-‘ in front as this is in the perspective of the player having a negative expectation; which is positive for the house.

    Break-even odds refers to the payment odds at which expectation is 0.  This means that the house should ALWAYS pay BELOW these odds in order to maintain a positive expectation for the house.

    The is derived from the Probability (Loss)/ Probability (Win),

    Example:

    For point 3,  0.9954/0.0046 = 215

    For point 6, 0.9537/0.0463 = 20.6

    After computing all the possible outcomes of a 3-dice roll, we can see that the possible outcomes and probability follow the central limit theorem nicely.  The expectation dovetails the probability, being the result of 1-probability.

    Single Die

    For Single Die wagers, the math is different as a single wager wins when the specific number appears 1, 2 or 3 times. So, what we have to do is consider all the probabilities together.

    Wager Permutations Probability Break Even Exp.
    1 Die 75 0.3472 0.56 0.19292
    2 Dice 15 0.0694 2.78 0.19292
    3 Dice 1 0.0046 41.67 0.19292
    Loss 125 0.5788 -1 -0.5788
    Total Exp. 0

    The method of getting the break even is the most straight-forward.

    Divide the Probability of a Loss by the total number of winning wager types as below:

    0.5788 / 3 = 0.19292

    Then divide this by the probability of the individual winning wager:

    Wager Working Probability Break Even
    1 Die 0.19292 / 0.3472 0.3472 0.5556551
    2 Dice 0.19292 / 0.0694 0.0694 2.7798769
    3 Dice 0.19292 / 0.00462963 0.00462963 41.671467

    You will find that by multiplying each wagers probability by the break even, you would have the same number, except positive, as that of the probability of losing. Adding the 2 numbers together would give you an expectation of 0.

    This is similar to slot mathematics, which we might get into later at some point.

    Number of possible outcomes for each point value from 3 to 18

    Sic-Bo1

    Probability for each point value from 3 to 18

    Sic-Bo2

    Expectation for each point value from 3 to 18

    Sic-Bo3

    The following table shows a similar tabulation for 3-Single Dice combinations and Double and Single Dice combinations.  Again, the total possible number of outcomes is 216, with the number of categories being 56:

    S/No Combination Possible Outcomes Probability (Win) Probability (Loss) Expectation Break-even odds
    1 666 1 0.0046 0.9954 -0.9907 215
    2 333 1 0.0046 0.9954 -0.9907 215
    3 111 1 0.0046 0.9954 -0.9907 215
    4 444 1 0.0046 0.9954 -0.9907 215
    5 222 1 0.0046 0.9954 -0.9907 215
    6 555 1 0.0046 0.9954 -0.9907 215
    7 244 3 0.0139 0.9861 -0.9722 71
    8 334 3 0.0139 0.9861 -0.9722 71
    9 144 3 0.0139 0.9861 -0.9722 71
    10 335 3 0.0139 0.9861 -0.9722 71
    11 166 3 0.0139 0.9861 -0.9722 71
    12 336 3 0.0139 0.9861 -0.9722 71
    13 223 3 0.0139 0.9861 -0.9722 71
    14 344 3 0.0139 0.9861 -0.9722 71
    15 225 3 0.0139 0.9861 -0.9722 71
    16 355 3 0.0139 0.9861 -0.9722 71
    17 233 3 0.0139 0.9861 -0.9722 71
    18 366 3 0.0139 0.9861 -0.9722 71
    19 114 3 0.0139 0.9861 -0.9722 71
    20 116 3 0.0139 0.9861 -0.9722 71
    21 266 3 0.0139 0.9861 -0.9722 71
    22 445 3 0.0139 0.9861 -0.9722 71
    23 155 3 0.0139 0.9861 -0.9722 71
    24 446 3 0.0139 0.9861 -0.9722 71
    25 224 3 0.0139 0.9861 -0.9722 71
    26 455 3 0.0139 0.9861 -0.9722 71
    27 113 3 0.0139 0.9861 -0.9722 71
    28 466 3 0.0139 0.9861 -0.9722 71
    29 115 3 0.0139 0.9861 -0.9722 71
    30 122 3 0.0139 0.9861 -0.9722 71
    31 226 3 0.0139 0.9861 -0.9722 71
    32 556 3 0.0139 0.9861 -0.9722 71
    33 112 3 0.0139 0.9861 -0.9722 71
    34 566 3 0.0139 0.9861 -0.9722 71
    35 255 3 0.0139 0.9861 -0.9722 71
    36 133 3 0.0139 0.9861 -0.9722 71
    37 235 6 0.0278 0.9722 -0.9444 35
    38 236 6 0.0278 0.9722 -0.9444 35
    39 135 6 0.0278 0.9722 -0.9444 35
    40 125 6 0.0278 0.9722 -0.9444 35
    41 124 6 0.0278 0.9722 -0.9444 35
    42 245 6 0.0278 0.9722 -0.9444 35
    43 346 6 0.0278 0.9722 -0.9444 35
    44 456 6 0.0278 0.9722 -0.9444 35
    45 356 6 0.0278 0.9722 -0.9444 35
    46 246 6 0.0278 0.9722 -0.9444 35
    47 146 6 0.0278 0.9722 -0.9444 35
    48 156 6 0.0278 0.9722 -0.9444 35
    49 345 6 0.0278 0.9722 -0.9444 35
    50 256 6 0.0278 0.9722 -0.9444 35
    51 234 6 0.0278 0.9722 -0.9444 35
    52 126 6 0.0278 0.9722 -0.9444 35
    53 145 6 0.0278 0.9722 -0.9444 35
    54 123 6 0.0278 0.9722 -0.9444 35
    55 136 6 0.0278 0.9722 -0.9444 35
    56 134 6 0.0278 0.9722 -0.9444 35

    So, how do you calculate the combinations and permutations mathematically?

    Here’s a great method created by Dr. James Tanton, known as labelling – it’s effective and easy to learn!  (http://gdaymath.com/courses/permutations-and-combinations/)

    Combinations

    For combinations, we use 6 factorial or 6! as our numerator (due to the die being 6-sided). Our denominator would be a multiplication of the numbers involved in the combination and those not, with the total being 6 as well. Here’re some examples:

    Specific Triples: 6! / (1! X 5!) = 720 / (1 x 120) = 6 combinations. (Notice that 6! / (1! X 5!) has the numerator equalling 6 and the denominator also equalling 6 – that’s how you check the maths!)

    Remember that there are 6 numbers, so we have 6/6 = 1 combination for each number. This would apply in the next example too.

    Specific Doubles: 6! / (1! X 1! X 4!) = 720 / (1 x 1 x 24) = 30 combinations (Notice how the numerator and denominator also equal 6? Notice the denominator 1! X 1! X 4!, as 1 of the numbers would be a double, 1 of the numbers would be a single and the other 4 numbers would not be in the combination.)

    Remember that for Specific Doubles there are 6 numbers, so each number would have 30 / 6 = 5 combinations for each number.

    3 Single Die Combination: 6!/(3! X 3!) = 720 / (6 x 6) = 720 / 36 = 20 combinations. (We have 3! as 3 of the numbers of the 6 are singles included in the combination, with the other 3 numbers out of the combination.)

    Total Combinations: (3 + 6 – 1)! / (3! x (6 – 1)! = 8!/(3! x 5!) = 40,320 / 720 = 56 total combinations

    Permutations

    For permutations, we use 3 factorial or 3! as our numerator (due to there being 3 dice in the game).

    Specific Triples: 3!/3! = 6/6 = 1 permutation per combination (our denominator is 3! as all 3 numbers would have to be the same in order to make a triple.)

    Specific Doubles: 3!/2! X 1! = 6/2 = 3 permutations per combination (our denominator is 2! X 1! as 2 of the numbers must be the same to make a double, with the last being any other number.)

    3 Single Die Combination: 3!/(1! X 1! X 1!) = 6 permutations per combination (our denominator is 1! X 1! X 1! as all 3 numbers have to be difference to make a 3 die combination.)

    Total permutations: 6 x 6 x 6 = 216 total permutations

    Appendix: Here is a table listing all the possible outcomes on Sic-Bo.

    D1 D2 D3 Points Combination
    1 1 1 3 111
    2 1 1 4 112
    3 1 1 5 113
    4 1 1 6 114
    5 1 1 7 115
    6 1 1 8 116
    1 2 1 4 112
    2 2 1 5 122
    3 2 1 6 123
    4 2 1 7 124
    5 2 1 8 125
    6 2 1 9 126
    1 3 1 5 113
    2 3 1 6 123
    3 3 1 7 133
    4 3 1 8 134
    5 3 1 9 135
    6 3 1 10 136
    1 4 1 6 114
    2 4 1 7 124
    3 4 1 8 134
    4 4 1 9 144
    5 4 1 10 145
    6 4 1 11 146
    1 5 1 7 115
    2 5 1 8 125
    3 5 1 9 135
    4 5 1 10 145
    5 5 1 11 155
    6 5 1 12 156
    1 6 1 8 116
    2 6 1 9 126
    3 6 1 10 136
    4 6 1 11 146
    5 6 1 12 156
    6 6 1 13 166
    1 1 2 4 112
    2 1 2 5 122
    3 1 2 6 123
    4 1 2 7 124
    5 1 2 8 125
    6 1 2 9 126
    1 2 2 5 122
    2 2 2 6 222
    3 2 2 7 223
    4 2 2 8 224
    5 2 2 9 225
    6 2 2 10 226
    1 3 2 6 123
    2 3 2 7 223
    3 3 2 8 233
    4 3 2 9 234
    5 3 2 10 235
    6 3 2 11 236
    1 4 2 7 124
    2 4 2 8 224
    3 4 2 9 234
    4 4 2 10 244
    5 4 2 11 245
    6 4 2 12 246
    1 5 2 8 125
    2 5 2 9 225
    3 5 2 10 235
    4 5 2 11 245
    5 5 2 12 255
    6 5 2 13 256
    1 6 2 9 126
    2 6 2 10 226
    3 6 2 11 236
    4 6 2 12 246
    5 6 2 13 256
    6 6 2 14 266
    1 1 3 5 113
    2 1 3 6 123
    3 1 3 7 133
    4 1 3 8 134
    5 1 3 9 135
    6 1 3 10 136
    1 2 3 6 123
    2 2 3 7 223
    3 2 3 8 233
    4 2 3 9 234
    5 2 3 10 235
    6 2 3 11 236
    1 3 3 7 133
    2 3 3 8 233
    3 3 3 9 333
    4 3 3 10 334
    5 3 3 11 335
    6 3 3 12 336
    1 4 3 8 134
    2 4 3 9 234
    3 4 3 10 334
    4 4 3 11 344
    5 4 3 12 345
    6 4 3 13 346
    1 5 3 9 135
    2 5 3 10 235
    3 5 3 11 335
    4 5 3 12 345
    5 5 3 13 355
    6 5 3 14 356
    1 6 3 10 136
    2 6 3 11 236
    3 6 3 12 336
    4 6 3 13 346
    5 6 3 14 356
    6 6 3 15 366
    1 1 4 6 114
    2 1 4 7 124
    3 1 4 8 134
    4 1 4 9 144
    5 1 4 10 145
    6 1 4 11 146
    1 2 4 7 124
    2 2 4 8 224
    3 2 4 9 234
    4 2 4 10 244
    5 2 4 11 245
    6 2 4 12 246
    1 3 4 8 134
    2 3 4 9 234
    3 3 4 10 334
    4 3 4 11 344
    5 3 4 12 345
    6 3 4 13 346
    1 4 4 9 144
    2 4 4 10 244
    3 4 4 11 344
    4 4 4 12 444
    5 4 4 13 445
    6 4 4 14 446
    1 5 4 10 145
    2 5 4 11 245
    3 5 4 12 345
    4 5 4 13 445
    5 5 4 14 455
    6 5 4 15 456
    1 6 4 11 146
    2 6 4 12 246
    3 6 4 13 346
    4 6 4 14 446
    5 6 4 15 456
    6 6 4 16 466
    1 1 5 7 115
    2 1 5 8 125
    3 1 5 9 135
    4 1 5 10 145
    5 1 5 11 155
    6 1 5 12 156
    1 2 5 8 125
    2 2 5 9 225
    3 2 5 10 235
    4 2 5 11 245
    5 2 5 12 255
    6 2 5 13 256
    1 3 5 9 135
    2 3 5 10 235
    3 3 5 11 335
    4 3 5 12 345
    5 3 5 13 355
    6 3 5 14 356
    1 4 5 10 145
    2 4 5 11 245
    3 4 5 12 345
    4 4 5 13 445
    5 4 5 14 455
    6 4 5 15 456
    1 5 5 11 155
    2 5 5 12 255
    3 5 5 13 355
    4 5 5 14 455
    5 5 5 15 555
    6 5 5 16 556
    1 6 5 12 156
    2 6 5 13 256
    3 6 5 14 356
    4 6 5 15 456
    5 6 5 16 556
    6 6 5 17 566
    1 1 6 8 116
    2 1 6 9 126
    3 1 6 10 136
    4 1 6 11 146
    5 1 6 12 156
    6 1 6 13 166
    1 2 6 9 126
    2 2 6 10 226
    3 2 6 11 236
    4 2 6 12 246
    5 2 6 13 256
    6 2 6 14 266
    1 3 6 10 136
    2 3 6 11 236
    3 3 6 12 336
    4 3 6 13 346
    5 3 6 14 356
    6 3 6 15 366
    1 4 6 11 146
    2 4 6 12 246
    3 4 6 13 346
    4 4 6 14 446
    5 4 6 15 456
    6 4 6 16 466
    1 5 6 12 156
    2 5 6 13 256
    3 5 6 14 356
    4 5 6 15 456
    5 5 6 16 556
    6 5 6 17 566
    1 6 6 13 166
    2 6 6 14 266
    3 6 6 15 366
    4 6 6 16 466
    5 6 6 17 566
    6 6 6 18 666