# Scenario

We are given a single six-sided die. We produce a sequence of $n$ dice rolls, all of them rolling six. We do not know whether the die is fair or not.

How can we calculate the probability that the die is loaded or rigged given $n$ rolls of six?

In other words, what is the probability $q$ that the null hypothesis is false, given a series of $n$ successful Bernoulli trials?

# Common fallacy

I heard a non-mathematician say that the probability of one six on a fair die is $\frac{1}{6}$, and so the probability of rolling 4 sixes in a row on a fair die is $\frac{1}{6^4} = \frac{1}{1296}$. So far, so good.

But then, he said that the probability that the die is not loaded is $\frac{1}{1296}$, and so the probability that the die is loaded is $\frac{1295}{1296}$.

This does not add up to me. By the same logic, if I roll the die once and get six, the probability that the die is loaded is $\frac{5}{6}$, which cannot be true. You don't call a person a cheat for rolling a six once.

I think that to answer this question, I have to use the binomial distribution somehow, since:

• the probability of a six, fair or not, remains constant and equal to $p$
• I am only interested in success/failure

At this point, I get lost. The problem is that I only know the probability for the null hypothesis $p_0 = \frac16$, and I don't know what the actual value for $p$ is. I don't know where to go from here.

Am I asking the wrong question? Must I set a confidence level $\alpha$? If so, suppose I set $\alpha = 0.05$? $\alpha = 0.01$? I apologize for any incorrect terminology. I am a computer programmer, not a statistician or mathematician.

Edit: It looks like I have to specify how badly the dice must be loaded before I call them unfair. Suppose I say rolling a six has to be at least $r = 10\%$ more likely than a fair die (i.e. $p \ge p_0\cdot\left(1 + r\right) = \frac{11}{60}$) before I call it rigged?

In classical statistics, there is no way to measure "the probability that the die is loaded". The confidence level in a statistical test tells you the probability of getting a false positive. That is, you're asking, if the die was actually fair, what would be the probability of getting a result as bad as this?

In Bayesian statistics, you can ask for "the probability that the die is loaded, given the result of the experiment", but you need to start with a prior: a probabilistic model that gives you, before the experiment, probabilities for the die to be fair or loaded in some particular way (or, perhaps, a probability distribution for just how loaded the die is). The choice of a prior tends to be a rather subjective thing, so you still can't really point to one number as "the probability that the die is loaded'.

You suspect that a die is unfair, resulting in more sixes than $1$ in $6$ throws. To check this hypothesis you device a laboratory test in which you throw the die $N$ times and you record $M$, the number of sixes.

We know that for a fair die the expectation value for the number of sixes in $N$ throws is given by $< M > = N / 6$, whereas the standard deviation is given by $\sigma = (1/6) \sqrt {N*5}$. We choose our criterion for rejecting the die as unfair when $M$ exceeds the expected value by a few times the standard deviation:

$$M > N/6 + X * (1/6) * \sqrt {N*5}$$

Now we want to minimize the chance of a false positive test result. Therefore we should choose our parameter $X$ sufficiently large. I would say $X = 5$ is a reasonable value.

Let us apply this test to your case, in which you throw the die only a few times, $n$, and all throws result in a six. We see that for $n \le 4$ the result is still acceptable, for $n \ge 6$ the die can be considered unfair, and $n = 5$ is a border-case.

• How do we choose X? Why 5? – MusashiAharon Nov 5 at 21:58

We are checking an event $X\sim Ber(p,n)$ where $p=\frac{1}{6}$.

$\mu = p\times n = \frac{n}{6}$ and $\sigma=\sqrt{p\times (1-p)}=\sqrt{\frac{5}{36}}$

Now we'll use Central Limit Theorem.

$P(X\geq n)\sim P(Z\geq \frac{n-\mu}{\frac{\sigma}{\sqrt{n}}})=P(Z\geq \sqrt{5 \times n^3})$

Now it all depends on how sure you want to be your friend is a cheater, but you'll quickly see that it's easy to be $99\%$ sure he is.

Your question, regarding that is clear: Does it mean somebody is a cheater just because he rolled 2 6's? Of course not, but note that when doing hypothesis tests, you use the Central Limit Theorem, which is used for great numbers. When you have only one, two or in general few observations, the results are not actually reliable.