Dice Fairness Checker (Chi-Square Test)
Test whether a die is fair with a chi-square goodness-of-fit test. Enter the count for each face to get the chi-square statistic, degrees of freedom, p-value, and a verdict at the 5% level.
Input
Enter how many times each face from 1 to 6 came up, and a chi-square goodness-of-fit test will judge whether the die is fair.
Enter the observed count for each face. The larger the total, the more reliable the test.
Result
Chi-square statistic χ²
8.00
χ² = sum of (observed − expected)² ÷ expected
Degrees of freedom
5
p-value
0.1562
Significance level
0.05
No evidence the die is unfair
The p-value 0.1562 is at or above the 0.05 level, so the null hypothesis is not rejected and the die cannot be called biased.
Comparison against the expected count 20.00
| Face | Observed | Expected | χ² contribution |
|---|---|---|---|
| 1 | 18 | 20.00 | 0.20 |
| 2 | 22 | 20.00 | 0.20 |
| 3 | 16 | 20.00 | 0.80 |
| 4 | 20 | 20.00 | 0.00 |
| 5 | 14 | 20.00 | 1.80 |
| 6 | 30 | 20.00 | 5.00 |
| Total | 120 | 120 | 8.00 |
How it works
- Enter the observed count O_i for each face. From the total N the tool computes the expected count E = N / 6, assuming a fair die where every face has probability 1/6.
- The chi-square statistic is chi2 = sum of (O_i - E)^2 / E. The further the observed counts fall from the expected count, the larger the value.
- Degrees of freedom equal the number of categories 6 minus 1, which is 5. The p-value is the upper-tail probability of the chi-square distribution with 5 degrees of freedom, the chance of a statistic at least as large.
- If the p-value is below the significance level 0.05, the null hypothesis that the die is fair is rejected, indicating evidence of bias. If it is 0.05 or above, there is no evidence that the die is unfair.
- The chi-square approximation is more reliable when each expected count is roughly 5 or more. With few rolls, interpret the verdict with caution.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Dice Fairness Checker (Chi-Square Test)