7The Chi-Square StatisticAssume there arerrows in the two-way table andccolumns, whichmeans there arerccells.The test statistic that makes the comparison is thechi-square statistic.Thechi-square statisticis a measure of how far the observed countsare from the expected counts. The formula for the statistic is:where“observed”represents an observed cell count,“expected”represents the expected count for the same cell, and the sum is over allrccells in the table.2(Observed - Expected)2ExpectedTo see if the data give convincing evidence against the nullhypothesis, we compare the observed counts from our sample withthe expected counts assumingH0is true.