# Dice and Binomial Probability

I few weeks ago some of my friends introduced me to a game called “DICE”. It turns out that I was terrible at this game the first time around. But I was still fascinated by it’s simplicity and that you could actually work out a pretty solid strategy by just calculating probabilities. Turns out that the game also has some more “human”-strategy to it by people either lying or telling the truth (i.e. guessing after their own dice) but at least knowing your probability gives you an edge. I’ll divide this post in sections. First, I’ll describe the game and it’s rules. Second, I get into how to more formally go about calculating the probability in order to get a solid strategy. Lastly, I end with developing a rule of thumb for optimal decisions in the game. One note on notation: I use digits (1,2,…,6) exclusively to symbolize an outcome of a die. Number written in text (one,two,..,six) refer to other stuff (e.g. number of dice) which should be clear from the context.

###### The Game of DICE

The rules are rather simple. Each player gets five dice (naturally fair dice as any self-respecting statistician would have to point out). All players throw their dice simultaneously and hides them under their hands. You are to look at your own dice and then the first player “bids” how many e.g. 3’s there are on the table. Then player two have to either raise the bet in the number of dice with 3’s or by the figure itself. Example: If player 1 said “there are four 3’s among all dice” player two can either say “there are four 4’s (or some higher number) or there are five 2’s (or any number). No matter what, you have to “raise the bid” in some sense. Eventually, a player will end up with a bid that is highly unlikely e.g. twenty-five 3’s out of 30 dice. The next player can then choose to “call” the previous betters bet. When a call is made, all dice are counted to see if the bid is correct or not. If it is correct and there are at least as many similar dice as the bidder said, the “caller” losses a die. If the bid is wrong the “bidder” losses a die. He or she who wins the game is the one with the last die standing. There is one caveat, and that is that the 1’s are Jokers. I.e. they are free numbers so if the total count of 6’s are say eight and there are three 1’s then the total number of similar dice are eleven 6’s.

###### Calculation of Binomial Probability

As dice games are a classic probability example I thought I would freshen up the old knowledge hidden somewhere. Formally, dice follows a Binomial distribution. This since the four main assumptions are meet. i) the outcome can be considers binary (either it is e.g. a 6 or it is not). ii) every toss is independent of one another. iii) each outcome of a die has a known an constant probability. iv) Every experiment (round) has a fixed sample size. Most people know that the probability of hitting any number e.g. a 3 on one (fair) die is  $\displaystyle \frac{1}{6}$ . If you have two numbers to choose from e.g. 3’s and 1’s the probability of getting any of those are naturally  $\displaystyle\frac{2}{6}=\frac{1}{3}$ . The probability mass function (PMF) for the Binomial distribution can be written as,

\begin{aligned} \Pr(X=x \mid n) = \frac{n!}{(n-k)!k!} \; p^x(1-p)^{n-x} \end{aligned}

where $p$ is the probability of success (i.e.  $\frac{1}{3}$ in this case). $X$ is the random variable which has realization $x$ (i.e. how many dice have the “correct” number). $n$ is the total number of dice in that particular round. Note that $n$ is not a random variable. Finally,  $\frac{n!}{(n-x)!x!}$ is the binomial coefficient often abbreviated by  $\binom{n}{x}$. It’s a formula for all possible combinations choosing $x$ dice out of $n$. For those of you who have not seen factorials (“!”) it just means e.g.  $4!=4\times3\times2\times1$.
Lets see if the formula works with our trivial one die example above,

\begin{aligned} \Pr(X=1 \mid n=1) = \frac{1!}{(1-1)!1!} \; \left(\frac{1}{3}\right)^1 \left(1 - \frac{1}{3}\right)^{1-1} = 1 \; \left(\frac{1}{3}\right)^1 \left(\frac{2}{3}\right)^{0} = \frac{1}{3} \end{aligned}

MY GOD! It works! Let’s take a bit more sophisticated example. What’s the probability of hitting 4 similar dice (including 1’s) out of 10. Applying the Binomial distribution above and the given probabilities we get,

\begin{aligned} Pr(X=4 \mid n=10) &=& \frac{10!}{(10-4)!4!} \; \left(\frac{1}{3}\right)^4 \left(1 - \frac{1}{3}\right)^{10-4} \\\ &=& \frac{10\times9\times 8 ... \times 1 }{(6 \times 5 ... \times 1) 4\times3\times2\times1} \; \left(\frac{1}{3}\right)^4 \left(\frac{2}{3}\right)^{6} \\\ &\approx& 210 \times 0.012345 \times 0.08779 \\\ &\approx& 0.227 \end{aligned}

So the probability getting exactly(!) (no more no less) four similar dice (including ones) out of ten is about 22.7 percent. However, what you really wanna know for this game is not the probability of getting exactly 4, 5 or 12 similar dice, but the probability of hitting that or more! So the probability you are after is not  $\Pr(X=x)$ but rather $\Pr(X\geq x)$. So in fancy statistical jargon you wanna find the complement of the cumulative distribution function (CDF). By the laws of probability we know that  $\Pr(X\geq x) = 1 - \Pr(X < x)$. Getting to the last term is just summing up all the  $\Pr(X=i)$ probabilities where  $i < x \leq n$. To exemplify, let’s reuse the example above. What is the probability of getting four or more dice out of ten that are similar? Well it’s just,

\begin{aligned} \Pr(X \geq 4 \mid n=10) &=& 1 - [ \Pr(X=3) + \Pr(X=2) + \Pr(X=1) + \Pr(X=0) ] \\ &\approx& 1- [ 0.086 + 0.195 + 0.26 + 0.017 ] \\\ &\approx& 1- 0.6 \\\ &\approx& 0.44 \end{aligned}

So if you where to guess (not having seen your own dice!) the probability of there being four or more similar dice are about 44 percent.

###### Calculation of “Bayesian ” Binomial Probability

Note however, and this is important and what I got wrong the first time I played. You have information about your own dice and you should use it as it updates your beliefs and probabilities (to talk Bayesian statistics). If someone has guessed that there are four 3’s and you yourself have 5 out of the 10 dice and two of them are say e.g. 3’s (you have zero 1’s) well you one only needs 2 more dice to be right about there being four 3’s out of 10. The question you are asking and probability you are really interested in is “how many 3’s, additional to my own, are there on the table?”. Your own dice are not random variables! They are already realized and known! Formally, let $m$ be the number of dice you have left and let $k$ be the number of dice that has the similar number to what the bid foretells so  $k \leq m < n$. The probability you have to calculate is then,

\begin{aligned} \Pr(X \geq x-k \mid n-m) = 1 - \sum_{i=0}^{x-k-1} \binom{n-m}{x-k} \Pr(X=x-k)^{x-k} \times [1 - \Pr(X = x -k )]^{n - m - x + k} \end{aligned}

where again  $x$ is your guess and  $n$ is the total amount of dice that are in play. Lets call this in lack of a better term the Bayesian probability and let’s refer to the former (the one that is not adjusted for your own dice) the Naive probability.

As soon as the probability is below 50 percent you should think about “calling”. But after all, there might be information in what bids people have been giving earlier and whether or not they are pathological lairs but I’ll abstract from that in this analysis. So I ran some simulations in order to give me hints when to “call” someones bet. The figure above is an illustration of the Naive probability and to get the Bayesian ditto you only subtract the number of dices you have $m$ and how many of them have the number you guessed $k$ (including your ones). You then read of the x-axis as the guess and then go to the line which corresponds to $n-m$ dice in total in the round. You can also have a look in the table (here) that underpins the graph do exactly the same thing in the table, read of which $x-k$ you are at in the row and then go to the column $n-m$ for how many dices there are in the game (excluding you own ones). The intersection of the row and the column is the probability that there are $x-k$ dice out of $n-m$.

###### Rule of Thumb in “DICE”

Actually after having done the analysis I realized that you don’t really need the probability table to make an informed choice. As I said, you would probably wanna call when the probability is less than fifty percent. As the rule of thumb you should always “call” when

\begin{aligned} \mathbb{E}[X \mid m ,n ] < x-k - \frac{1}{2} \qquad where \quad \mathbb{E}[X \mid m ,n ] = (n-m)p \end{aligned}

as is obvious from the equation above you should never call when $x \leq k$ i.e. when the guess is less dice than you yourself have on hand. If $\mathbb{E}[X \mid m ,n ]=x - k - \frac{1}{2}$ it is just a coin-flip so a fifty-fifty chance of you getting it right. In conclusion, here is the decision rule,

which ensures that you are only making making decisions that have a probability above .5 (50 percent). Nevertheless, as the Binomial distribution is discrete you can end up in a catch 22 where you based on probability have to choose to not call the previous bidder but when you bet you will bet on something that has a lower probability than 50 percent at occurring. Confusing, I know. But I guess thats also one of the reasons this game is quite fun, no matter how much you analyze it you might not be able to make a correct decision.