Chi Square Test
Chi Square Test
Let's say you want to know if gender has anything to do with political party preference. You poll
440 voters in a simple random sample to find out which political party they prefer. The results of
the survey are shown in the table below:
To see if Gender
ender is linked to political party preference, perform a Chi-Square
Chi
test of independence using the steps below.
Similarly, you can calculate the expected value for each of the cells.
2
Step 3: Calculate (O-E) / E for Each Cell in the Table
Now you will calculate the (O - E)2 / E for each cell in the table.
Where
O = Observed Value
E = Expected Value
2
Step 4: Calculate the Test Statistic X
= 9.837
Before you can conclude, you must first determine the critical statistic, which requires
determining our degrees of freedom. The degrees of freedom in this case are equal to the table's
number of columns minus one multiplied by the table's number of rows minus one, or (r-1) (r (c-1).
We have (3-1)(2-1) = 2.
Finally, you compare our obtained statistic to the critical statistic found in the chi-square table.
As you can see, for an alpha level of 0.05 and two degrees of freedom, the critical statistic is
5.991, which is less than our obtained statistic of 9.83. You can reject our null hypothesis
because the critical statistic is higher than your obtained statistic.
This means you have sufficient evidence to say that there is an association between gender and
political party preference.