This installment of Probability in Games will explore conditional probabilities using Bayes Rule (aka Bayes Law and Bayes Theorem). Bayes Rule can be used to analyze probabilities in many popular bluffing and deduction style games. However, many of the interesting probabilities in these games are also accessible through more straight forward calculations. In this article, I will propose a variant of the popular game Zombie Dice to help illustrate the concept and application of Bayes Rule.

Let’s begin by reviewing the notion and notation of conditional probabilities, which Bayes Rule will express a relationship between. Conditional probabilities are probabilities that rely on a specific condition in order to be true. In the game Zombie Die, there are three different colors of six-sided dice: green, yellow, and red, that show brains on different number of sides: three, two, and one, respectively. We can use conditional probabilities to express the chances of rolling brains in a way that relies on the color of the die being rolled. The notation P(X|Y) is the probability of X, when Y is guaranteed to be true. So in Zombie Dice:

    P(Rolling A Brain | Rolling A Green Die) = 3/6
    P(Rolling A Brain | Rolling A Yellow Die) = 2/6
    P(Rolling A Brain | Rolling A Red Die) = 1/6

Notice that the order here is critical. There is an important difference between P(Rolling A Brain | Rolling A Green Die) and P(Rolling A Green Die | Rolling A Brain). A common mistake is for people to expect these conditional probabilities to always be equal. These conditional probabilities are illustrated in the diagram below, using a blue background to indicate all outcomes that satisfy the condition, and a white background to indicate which of those outcomes represent a success. On the left, P(Rolling a Brain | Rolling One Green Die) illustrates the chances of rolling a brain when you know that you are rolling a green die. On the right, P(Rolling One Green Die | Rolling A Brain) illustrates the chances that you are rolling a green die when a brain is rolled.


Notice that the successful events on each side of this diagram are the same: they include the green brain. The difference between these conditional probabilities comes from the different groups of possible outcomes that satisfy each probability’s condition. Here’s a classic Venn diagram showing this same relationship. The intersection of these two groups of events (X∩Y) represents the shared successes of both P(X|Y) and P(Y|X). Any difference in these conditional probabilities comes exclusively from the relative sizes of X and Y. Can you see in this diagram which will be larger between P(X|Y) and P(Y|X)?


Another way to express the conditional probabilities illustrated in this diagram is as follows:

    1. P(X|Y) = P(X∩Y) / P(Y)
    2. P(Y|X) = P(X∩Y) / P(X)

From these two formulas, we can derive Bays rule, which relates P(X|Y) to P(Y|X). We do this by solving for P(X∩Y) in the second equation, and then substitute that expression in for (X∩Y) in the first equation.

    3. P(X∩Y) = P(Y|X) * P(X) <= solve for P(X∩Y) in equation 2
    4. P(X|Y) = P(Y|X) * P(X) / P(Y) <= substitute result from 3 into equation 1 (Bayes Rule)

With Bayes in mind, let's return the our Zombie Dice example. We've already seen how this game's dice are color coded to bring attention to the conditional probabilities of their results, and it was pretty easy to determine P(Rolling a Brain | Rolling a Green Die). So now let's try using Bayes Rule to calculate P(Rolling a Green Die | Rolling a Brain). To save space, I'll abbreviate “Rolling a Green Die” as G, and “Rolling a Brain” as B. Bayes tells us that:

    P(G|B) = P(B|G) * P(G) / P(B)
    P(B|G) = 3/6 <= as discussed above
    P(G) = 6/13 <= because six of the thirteen dice are green
    P(B) = (3*6 green dice + 2*4 yellow dice + 1*3 red dice) / (13dice*6sides) = 29/78

    Therefore, P(G|B) = (3/6) * (6/13) / (29/78) = 1404 / 2262 = 62%

Now, can you imagine an expansion for Zombie Dice that would encourage players to consider conditional probabilities in this direction: asking how likely a particular color would be giving a specific symbol? I have a proposal that is completely untested, but absolutely inspired by thinking about how games might challenge players to consider some of the implications of Bayes Rule. I'd love to hear if anyone can think of an existing game that already does this, or of a fun new game concept that you or someone else reading this might try.

My idea for this expansion is to give players the option of spending some of their their hard earned brains to buy one of three different colors of armors. Each armor protects you from one future shotgun blast during the current round, but only protects you from a blast on a die with a matching color. Remember that green, yellow, and red dice have one, two, and three sides showing shotgun blasts respectively. So when you are considering the color of the armor you should purchase you are estimating P(Rolling a Specific Color of Die | Rolling a Shotgun). This seems like an interesting decision, since it will change depending on the number and colors of dice that have already been drawn and rolled. However it could also completely unbalance and break the game, since it is untested.

If you'd like more practice working with Bayes Theorem, I encourage you to try calculating P(Rolling a Red Die | Rolling a Shotgun). From there, you might also try to calculate some strategic thresholds for when each color of armor is most useful, based on the composition of dice left to be drawn and rolled. As always, post any questions or requests you have for this or future installments of the blog in the comments below. Thanks for reading!


Bryan Koch says:

Could you also find P (G|B) by taking the 18 total brains on green dice out of 29 total brains on all dice, or is it just chance that this gives you the exact same answer? I’m guessing that is one of the more straightforward calculations you mentioned at the beginning of the post.

Gary Dahl says:

Yes, that’s right Bryan! I was referring to the fact that P(X?Y) is usually either known, or can be found by counting (as in this case).

Leave a Comment

Related Posts

Tuesday, January 24th, 2012