# Calculating the odds of the next dice throw with sample

Today I came across a question that I've been trying to find an answer to and I was un-able to do so.

How do I calculate what's the highest probable number to come out in the next dice throw when I have a large sample?

So I have 10.000 dice throws and I registered all of the results.

+----+-------+
| nr | count |
+----+-------+
|  1 | 2000  |
+----+-------+
|  2 | 2200  |
+----+-------+
|  3 | 1000  |
+----+-------+
|  4 | 2800  |
+----+-------+
|  5 | 1200  |
+----+-------+
|  6 |  800  |
+----+-------+


So, what's the most probable outcome of the 10.001 throw?

I thought about calculating the odds of each of them like (number of times it came out) / (total number of throws), and them the highest number will be the most probable one, in this case 4.

However, in large number of samples the results tend to be normalized, so, with this in mind, the most probable outcome would be the number 6.

Can anyone help me out in this? There's a very big chance that I am confusing a lot of concepts here as I haven't looked into probabilities in a very long time.

• Specific location in your reasoning of what has been called the "Gambler's Fallacy": However, in large number of samples the results tend to be normalized, so, with this in mind, the most probable outcome would be the number 6. – cladelpino Jan 24 '17 at 22:56

## 2 Answers

Your logic for why $6$ might be the most probable outcome of the next throw is often referred to as the gambler's fallacy and as its name suggests it is logic you want to stay away from.

If you can assume that the dice throws are independent of one another (usually an ok assumption), it's certainly not the case that $6$ is any more likely just cause it didn't come up a lot. In fact it usually means the opposite unless there are some involved dependencies between the different throws.

If you can assume that all $6$ faces of the die are equally likely on each independent throw then the probability of each face coming up is still $1/6$ for the next throw. It doesn't matter if one face has been 'unlucky' so far; each trial is independent and has no memory of the past.

However, your data appear very inconsistent with the notion that each face is equally likely, as you've done a large number of trials and have large percentage fluctuations between the different faces. It seems like the die is probably biased toward $4$, $1$, and $2$ and away from $3,5,6$

Ascertaining how unlikely your die is to be fair and what a good guess for the true probabilities for each side are is a matter for statistical inference.

Long story short, based on the data and some reasoning, my best guess for the most likely next face is face $4$ since it came up the most before to such an extent that it appears unlikely to be a statistical fluke (although I would want to justify this quantitatively).

(There is one scenario in which $6$ could be more likely, but we can't test for it since you've only included aggregated data. What it would look like would be if the data was mostly $4$'s and $2$'s and $1$'s first, then drifted to be more $3$'s and $5$'s and $6$'s as time went on . Not entirely implausible, but it's hard to imagine why a die's bias would change with time like that.)

EDIT

As for quantification, the 'classic' method for testing fairness of a die is a chi-squared test. If the dice were fair and trials were independent, in the limit of a large number of trials, ($n=10000$ in this case) the test statistic $$\chi^2 = \frac{6}{n}\sum_{i=1}^6\left(n_i-\frac{n}{6}\right)^2$$ would be $\chi^2$-distributed on $6-1 = 5$ degrees of freedom. When I compute this from OP's data I get $\chi^2 = 1856$. For reference, $99\%$ of the time, a chi-squared variable on 5 degrees of freedom is less than $15$ so the data is ridiculously unlikely to occur from a fair die.

A more refined approach would be needed to see whether $4$ is more likely than $2$ or what-have-you. One might approach it from a Bayesian angle as well and try and infer a distribution for the 5 numbers describing the probabilities of the different faces and then see how probable the region $p_4<p_2$ is.

• +1 for quantification. How can one test for any kind of unbiased modality ? I think I have seen this kind of tests done with information theoretical criteria. – cladelpino Jan 24 '17 at 23:02
• @cladelpino I'm not that fancy, but I think doing a chi-square test counts as quantification :). – spaceisdarkgreen Jan 25 '17 at 0:12

If the dice are fair, then all possible rolls are equally likely. If we are to assume, though, that they fall on face $n$ with probability proportional to the numbers you gave above, then $n=4$ would be the most likely roll.

Since the next roll on a die is independent of the last roll, there's no reason to think that $n=6$ will be most likely (if the dice are fair) just because it's come up the least number of times so far – this is called the Gambler's Fallacy.