Probability Generating Functions — The Casino Owner’s Best Friends

Probability Generating Functions — The Casino Owner’s Best Friends

Let’s imagine that you own a Casino, and one of the most popular games there is Craps. Craps involves the throw of two normal dice, and its all about the total score from the dice — which can range from 2 to 12. You are looking to spice things up for your customers and offer them some fun variations on their favourite game.

One variation you are considering is offering them to choose alternative ‘biased’ dice to play with. For example, maybe they can choose a die that has the numbers 1, 2, 2, 4, 5, 6 along with a regular 1, 2, 3, 4, 5, 6 die. The possible score range is still 2 to 12, but maybe the probabilities of a given total score have changed, and as a Casino owner you probably would want to know that to make sure that you aren’t going to be out of pocket on the odds from a specific choice of dice.

Let me introduce you to a powerful tool to solve problems like this — the probability generating function.

What is a Probability Generating Function?

Let X be a discrete random variable, for example the result of a die throw. The probability generating function of X is defined as the power series polynomial where the coefficient of the term in index n is the probability that X = n. Written mathematically, it looks like this:

So, for example, with X as a standard die throw with sides 1, 2, 3, 4, 5, 6, each one having equal probability, we have:

Probability Generating Functions have several interesting properties. First, taking the value of the function at t = 0 gives P(X = 0), so:

Second, taking the value of the function at t = 1 gives you the sum of the probabilities of all possible outcomes, which of course equals 1, so:

Third, you can always derive the P(X = k) from the function, by differentiating it k times and then setting t=0. More precisely:

An important consequence of this is that if two random variables have the same probability generating function, then they have the same probability mass function. Which means that the probabilities of all the outcomes are the same. This fact will be very important to you as a casino owner.

Fourth, as you’d expect based on the laws of probability, if you have two independent events with outcomes represented by discrete random variables, then the probability generating function for the random variable representing the outcome of the combined events is the product of their respective probability generating functions. So, for independent random variables X and Y:

Finally, look what happens if we differentiate our probability generating function once and set t = 1:

so we can easily derive the expected value from the probability generating function.

So how does this help you spice up your dice?

OK, so let’s go back to our probability generating function for a normal 1, 2, 3, 4, 5, 6 die, and let’s factorize it into the product of some simpler polynomials, so we can play around with it later:

Now, a regular game of crabs involves the sum of the throw of two normal dice, both of which are independent random variables, so our probability generating function for the sum of the throw of two normal dice can be obtained as the square of the probability generating function for a single normal die:

So now that we have our probability generating function for the sum of a throw of two normal dice, let’s ask ourselves if there are other ways we can decompose this function. One way we could decompose would be two new valid probability generating functions whose product is exactly the same, for example:

Note, importantly, that the following conditions are satisfied for these functions:

Now let’s expand our new functions and see if they can help us find two different dice that we could safely use in our spiced up crabs game. If we expand our first new function we get:

which is a generating function for a die with sides 1, 2, 2, 3, 3, 4.

For our second function we get:

which is a generating function for a die with sides 1, 3, 4, 5, 6, 8.

So our casino owner would be safely able to offer an alternative pair of dice labelled 1, 2, 2, 3, 3, 4 and 1, 3, 4, 5, 6, 8 to his customers without changing the odds of the game.

Another example

Imagine we have a game that involves the sum of the throws of two tetrahedral dice that have the numbers 1, 2, 3, 4 (where the outcome is the number that cannot be seen). The probability generating function for this random variable is:

So for two of the same tetrahedral dice, the function for the sum would by:

An alternative decomposition into two valid probability generating functions is:

Expanding these will reveal that our dice could be replaced by two dice with the numbers 1, 2, 2, 3 and 1, 3, 3, 5 without any impact on the odds of the game.


Special thanks to Archie Smith for sending me a problem which inspired this article. If you found any part of this article interesting, please feel free to comment.

Richard Carter

Principal Data Scientist at Kevel

9mo

To give credit where it’s due these are termed Sicherman dice, named after their inventor George Sicherman.

Like
Reply
Brian C.

Teacher, Statistician, Engineer.

9mo

I didn't know there was a dice game called crabs. I've heard of craps though.

Like
Reply
Srijanie Dey, PhD

AI Research Scientist | ML Engineer | Applied Mathematician

9mo

Your articles are always such a great read Keith McNulty, thank you!

Like
Reply
Lee Jin

Co-Founder & COO at Tictag.io | Linkedin AI Community Top Voice

9mo

Interesting insights!

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics