]> The Chi-Square Dice Experiment

The Chi-Square Dice Experiment

The ChiSquareExperiment applet requires the latest version of the Java plug-in. Please check your browser settings to make sure that Java applets are allowed. Visit the Java site to download and install the latest plug-in.

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 separately by clicking on the die probability buttons; these buttons bring up the die probability dialog box. You can define your own distribution by typing probabilities into the text fields of the dialog box (but be sure to press enter after typing each probability). Alternately, you can click on one of the buttons in the dialog box to specify one of the following special distributions:

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 scroll bars.

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

On each update, 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 U and I are recorded in the data table on each update. The goodness of fit table shows the expected frequencies, and on each update, the observed frequencies.