A "Begin" button will appear on the left when the applet is finished loading. This may take a minute or two depending on the speed of your internet connection and computer. Please be patient.

Starting the Applet and setting the conditions
Press the "Begin" button to start the applet in another window. Specify the probability of success, P(S), and sample size, N, for the experimental conditions (Cond 1 and Cond 2). For each simulation, two Chi Square Tests are conducted. One test does not use the Yates correction for continuity. The other uses the Yates correction when the smallest expected frequency is less than 5.

If you press the "Simulate 1" button, one simulated experiment will be conducted. The observed and expected frequencies and the Chi Square statistic are displayed on the right side of the screen. The statistical significance of the Chi Square is determined and stored in the table on the lower right.

If you push the "Simulate 1000" or "Simulate 5000" buttons then many experiments are simulated and the counts of significant outcomes are reported in the table in the lower right.

This applet simulates experiments testing whether two categorical variables are independent. For example, an experimenter might be interested in whether first-borns are more likely than others to be prefer Republicans to Democrats. Subjects would be classified into, two levels of birth order: first born and not first born, and two levels of party preference: Republican and Democratic. (People who were neither Democrats nor Republicans were still asked to state their preference.) A relationship between two variables such as these can be tested using a Chi Square Test of Independence.

The Chi Square Test is only approximate. This simulation allows you to vary the sample size and the population proportions to see their effects on the validity of the test. It also allows you to examine the effect of the Yates correction for continuity which some suggest should be used when the sample sizes are small.