The Dice Goodness of Fit Experiment

Sampling Distribution
Test Distribution
Reject Distribution

Description

The experiment is to select a random sample from a specified distribution and perform the chi-square goodness of fit test to another specified distribution, at a specified level of significance. The distributions are discrete distributions on \(\{1, 2, 3, 4, 5, 6\}\), and thus the experiment corresponds to rolling \(n\) dice, each governed by the same distribution.

The true distribution and test distribution can be specified with the list boxes. The following distributions can be chosen:

The probability density function of the true distribution is shown in blue in the first graph; the probability density function of the test distribution is shown in green. The significance level and the sample size can be varied with input controls.

The test statistic \(V\) has (approximately) the chi-square distribution with 5 degrees of freedom. The probability density function of \(V\) and the critical value are shown in blue in the second graph.

On each run, the sample density function is shown in red in the first graph. The value of the test statistic \(V\) is shown in red in the second graph. Note that the null hypothesis is rejected if and only if \(V\) falls outside of the critical values. Random variable \(I\) indicates the event that the null hypothesis is rejected. On each update, the empirical density of \(I\) is shown in red in the distribution graph and is recorded in the distribution table. The values of \(V\) and \(I\) and the \( P \)-value are recorded in the data table on each run. The goodness of fit table shows the expected frequencies, and on each run, the observed frequencies.