Chi-Square Test for Multiple Categories

See: Schneiter, K. (2008). Two Applets for Teaching Hypothesis Testing. Journal of Statistics Education. 16(3).


Objective: Investigate and implement the chi-square test to determine if a die is fair.

This tool consists of two 'views': the investigate view and the test view. Use "Choose view" menu to move between views.

Test view

The probabilities of rolling each of the die faces are unknown. Roll the die to investigate whether the die is fair (all faces have the same probability). The number of times each face is rolled (observed rolls) is shown, along with the number of times each face should turn up if the die is fair (expected rolls). These are used to compute the chi-square statistic (shown below the die) and the probability that the statistic is at least that big if the die is fair (the p-value).

Use the p-value to decide whether the die is fair. A small probability signifies that it is unlikely to get a chi-square value at least as large as the one observed if the die is fair.


Investigate view

Choose to roll either a fair die or a loaded die. The probabilities of observing each of the faces are displayed. Check boxes at the bottom allow investigation of The chi-square statistic and the p-value (both found assuming that the die is fair) can also be displayed.

Press the "New die" button or one of the radio buttons to begin again.


The chi-square statistic

The chi-square statistic is the sum of the scaled differences of all die faces.