Dice Fairness Checker

In the article "Be Thy Die Ill-Wrought?", Dragon issue 78, pages 62-65, David G. Weeks describes how to use the chi-squared test to check dice for fairness. The following JavaScript allows you to check a die for fairness, using this methodology:

  1. Select the type of die you want to check.
  2. Select the significance level, α, which is the conditional probability of incorrectly rejecting the null hypothesis H0 that the dice is fair when it actually is true. If that sounds like gibberish, then don't panic and just leave it set to its default value of 5%.
  3. Roll your die a bunch of times. Count how many times each face is rolled and enter the tallies into the table below. Weeks suggests rolling your die ten times per face. So, for example, you would roll a d8 a total of 80 times. He says never roll fewer than 5 times per face. Unfortunately, Weeks never supports these statements. I address this issue in the post, How many times must you roll a die to test for fairness?
  4. Click the 'Calculate' button and the program will spew out the results.

This code uses a public domain JavaScript function for calculating chi-square probabilities.




1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.