Concepts 9: Creating a Casino Game

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. This model assumes the players only win on their specific chosen permutations and lose on every other result.

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s