Free Statistics Help Book
An Interactive Multimedia introductory-level statistics book.
The book features interactive demos, simulations and case studies.
Chapter
Section
Chi Square :  

Testing Distributions Demo



Questions to be answered before the simulation are not yet implemented in this test version.


Begin by answering the questions, even if you have to guess. The first time you answer the questions you will not be told whether you are correct or not.


Once you have answered all the questions, answer them again using the simulation to help you. This time you will get feedback about each individual answer.


General Instructions


In this simulation, 100 numbers are either sampled from a normal distribution or a uniform distribution. The frequencies in each of 10 “bins” is then displayed in the “observed” column. The expected frequencies based on both a normal distribution (on the left) or a uniform distribution (on the right) are shown just to the left of the observed frequencies. For each bin the value (E-O)2/E is computed where E is the expected frequency and O is the observed frequency. The sum of these quantities is the value of Chi Square shown at the bottom.


Step By Step Instructions


1. The default is to sample from a normal distribution. Click the sample button and 100 values will be sampled from a normal distribution. Compare the observed values in the “From a Normal Distribution” section to the expected values. Is the Chi Square test significant at the 0.05 level? How often would you expect it to be significant.


2. Compare the observed frequencies from the “From a Uniform Distribution” section to the expected frequencies. In what way are they different? Is the difference significant? If so, then the null hypothesis that the numbers were sampled from a uniform distribution could be rejected. Of course, in this simulation, you know where the numbers were sampled so you know the null hypothesis is false.


3. Simulate several experiments and see if the significance for the test of a uniform distribution is always significant.


4. Make the actual distribution a uniform distribution and do more simulated experiments. Compare the results to when the actual distribution was normal.


Summary


Uniform and normal distributions are very different in shape. If the null hypothesis is that the values are sampled from a normal distribution and, in fact, the 100 values are sampled from a uniform distribution, then teh Chi Square Test has a very high probability of rejecting the null hypothesis.


Copyright 2011