Chi-square (X ) test may be used for different purposes but the most common one is perhaps the assessment of the association between two categorical variables. The null and the alternative hypotheses are
H : no association against H : an association, respectively.
Therefore, rejection of the null hypothesis implies the conclusion of a significant association between the two variables.
For the IRS study described in Example 1, we can certainly use X test to determine if IRS is superior to placebo in improving pain.
Since X test is available in almost all statistical software such as the SPSS, it can be easily operated. However, to be able to determine when to use the test among other statistical methods, we need to know the following.
Most significance tests involve a quantity called test statistic that is an interim quantity before the corresponding p-value is calculated. Test statistic measures how far the observed data deviate from the null hypothesis. The X2 test statistic involves the calculation of observed and expected frequencies of each cell in the contingency table. It is written as
The p-value is then computed from the test statistics and its statistical distribution. What we need to know is the distribution of X2 in the c2 test is "approximated" by a c2 distribution which depends on a parameter called degrees of freedom (Pearson, 1900). That's how the test was labelled. The degrees of freedom equals (number of rows - 1)(number of columns - 1) in the contingency table.
The accuracy of the approximation increases when the sample size increases. In the sequel, the c2 test bears a requirement that the observed frequency in each cell cannot be too small; otherwise, the approximation may be poor. A suggested rule is
at least 80% of the cells have expected frequencies ≥ 5; and
all cells have expected frequencies ≥ 1.
So, we need to cross our fingers and wish the required condition will not be challenged. Unfortunately, small expected frequencies do occur from time to time! Do we have other options?