Two cool things about dice!

Just discover two cool things about dice, Suppose we have two (fair) 6-sided dice, let $Y$ be the reminder of the product of the two numbers divided by 7, i.e., $Y = X1 \times X2 (\text{ mod } 7)$, guess what the distribution of $Y$ is? Uniform 1,…, 6

If it doesn’t surprise you, now consider two n-sided dice and repeat the above with $Y = X_1 \times X_2 (\text{ mod } n+1)$. Guess what values of $n$ will yield a uniform distribution? It turns out that the values of $n$ are prime numbers minus 1. (As 6 = 7-1 and 7 is a prime number, a regular 6-sided dice has this property).

Randy Lai
Randy Lai
Data Scientist