Chi-Square Goodness of Fit
April 12, 2026
Problem
Are dice rolls {18, 22, 16, 20, 24, 20} consistent with fair dice? Show observed vs expected.
Explanation
The chi-square test
Tests whether observed frequencies match expected frequencies.
Step-by-step
Observed: {18, 22, 16, 20, 24, 20}. Total = 120. If fair: Expected = 20 each.
Step 1 — Compute :
Step 2 — Degrees of freedom: .
Step 3 — Critical value at : .
Step 4 — Decision: . Fail to reject . No evidence the die is unfair.
Try it in the visualization
Bar chart shows observed vs expected side by side. The chi-square value and p-value update as you change observed counts.
Interactive Visualization
Parameters
18.00
22.00
16.00
20.00
24.00
20.00
Your turn
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.
Sign Up Free to Try It30 free visualizations every day