At School A, 5 students are enrolled in Arts and 5 students are enrolled in Science. At School B, 4 students are enrolled in Arts and 6 students are enrolled in Science. To test the null hypothesis that the distribution of the number of students enrolled in Arts is similar to the number of students enrolled in Science at two different schools, let:
a = # of students at School A enrolled in Arts
b = # of students at School A enrolled in Science
c = # of students at School B enrolled in Arts
b = # of students at School B enrolled in Science
To begin calculating the test statistic, the expected proportions for a, b, c and d are calculated first:
Expected a = = 4.5
Expected b = = 5.5
Expected c = = 4.5
Expected d = = 5.5
Now that both the observed and expected proportions for a, b, c and d have been determined, the chi-square test statistic can be calculated using the formula:
In the following interactive example, try to change the proportion of students in the arts and sciences in order to see the effect on the test statistic.