**Introduction**

^{2}) can provide information not only on the significance of any observed differences, but also provides detailed information on exactly which categories account for any differences found. Thus, the amount and detail of information this statistic can provide renders it one of the most useful tools in the researcher’s array of available analysis tools. As with any statistic, there are requirements for its appropriate use, which are called “assumptions” of the statistic. Additionally, the χ

^{2}is a significance test, and should always be coupled with an appropriate test of strength.

- The level of measurement of all the variables is nominal or ordinal.
- The sample sizes of the study groups are unequal; for the χ
^{2}the groups may be of equal size or unequal size whereas some parametric tests require groups of equal or approximately equal size. - The original data were measured at an interval or ratio level, but violate one of the following assumptions of a parametric test:

a) The distribution of the data was seriously skewed or kurtotic (parametric tests assume approximately normal distribution of the dependent variable), and thus the researcher must use a distribution free statistic rather than a parametric statistic.

b) The data violate the assumptions of equal variance or homoscedasticity.

c) For any of a number of reasons (1), the continuous data were collapsed into a small number of categories, and thus the data are no longer interval or ratio.

**Assumptions of the Chi-square**

^{2}assume the data were obtained through random selection. However, it is not uncommon to find inferential statistics used when data are from convenience samples rather than random samples. (To have confidence in the results when the random sampling assumption is violated, several replication studies should be performed with essentially the same result obtained). Each non-parametric test has its own specific assumptions as well. The assumptions of the Chi-square include:

- The data in the cells should be frequencies, or counts of cases rather than percentages or some other transformation of the data.
- The levels (or categories) of the variables are mutually exclusive. That is, a particular subject fits into one and only one level of each of the variables.
- Each subject may contribute data to one and only one cell in the χ
^{2}. If, for example, the same subjects are tested over time such that the comparisons are of the same subjects at Time 1, Time 2, Time 3, etc., then χ^{2}may not be used. - The study groups must be independent. This means that a different test must be used if the two groups are related. For example, a different test must be used if the researcher’s data consists of paired samples, such as in studies in which a parent is paired with his or her child.
- There are 2 variables, and both are measured as categories, usually at the nominal level. However, data may be ordinal data. Interval or ratio data that have been collapsed into ordinal categories may also be used. While Chi-square has no rule about limiting the number of cells (by limiting the number of categories for each variable), a very large number of cells (over 20) can make it difficult to meet assumption #6 below, and to interpret the meaning of the results.
- The value of the cell
*expecteds*should be 5 or more in at least 80% of the cells, and no cell should have an expected of less than one (3). This assumption is most likely to be met if the sample size equals at least the number of cells multiplied by 5. Essentially, this assumption specifies the number of cases (sample size) needed to use the χ^{2}for any number of cells in that χ^{2}. This requirement will be fully explained in the example of the calculation of the statistic in the case study example.

**Case study**

^{2}statistic, the following case example will be used:

**Group 1:**Not provided with the vaccine (unvaccinated control group, N = 92)**Group 2:**Provided with the vaccine (vaccinated experimental group, N = 92)

*versus*unvaccinated). The dependent variable is health outcome with three levels:

- contracted pneumoccal pneumonia;
- contracted another type of pneumonia; and
- did not contract pneumonia.

^{2}statistic was used to test the question, “Was there a difference in incidence of pneumonia between the two groups?” At the end of the winter, Table 1 was constructed to illustrate the occurrence of pneumonia among the employees.

*Table 1. Results of the vaccination program.***Calculating Chi-square**

^{2}statistic to find out if the vaccination program made any difference in the health outcomes of the employees. The formula for calculating a Chi-Square is:

^{2}=The cell Chi-square value

*=*Formula instruction to sum all the cell Chi-square values

*i-j*is the correct notation to represent all the cells, from the first cell (

*i*) to the last cell (

*j*); in this case Cell 1 (

*i*) through Cell 6 (

*j*).

^{2}is to calculate the sum of each row, and the sum of each column. These sums are called the “marginals” and there are row marginal values and column marginal values. The marginal values for the case study data are presented in Table 2.

*Table 2. Calculation of marginals.**expected*values for each cell. In the Chi-square statistic, the “expected” values represent an estimate of how the cases would be distributed if there were NO vaccine effect. Expected values must reflect both the incidence of cases in each category and the unbiased distribution of cases if there is no vaccine effect. This means the statistic cannot just count the total N and divide by 6 for the expected number in each cell. That would not take account of the fact that more subjects stayed healthy regardless of whether they were vaccinated or not. Chi-Square expecteds are calculated as follows:

_{R}= represents the row marginal for that cell,

_{C}= represents the column marginal for that cell, and

*n*= represents the total sample size.

^{2}values are calculated with the following formula:

^{2}for the first cell in the case study data is calculated as follows: (23-13.93)

^{2}

**/**13.93 = 5.92. The cell χ

^{2}value for each cellis the value in parentheses in each of the cells in Table 3.

*Table 3.*

*Cell expected values and (cell Chi-square values).*^{2}values have been calculated, they are summed to obtain the χ

^{2}statistic for the table. In this case, the χ

^{2}is 12.35 (rounded). The Chi-square table requires the table’s degrees of freedom (df) in order to determine the significance level of the statistic. The degrees of freedom for a χ

^{2}table are calculated with the formula:

^{2}value of 12.35 with each of these different df levels (1, 4, and 12), the significance levels from a table of χ

^{2}values, the significance levels are: df = 1, P < 0.001, df = 4, P < 0.025, and df = 12, P > 0.10. Note, as degrees of freedom increase, the P-level becomes less significant, until the χ

^{2}value of 12.35 is no longer statistically significant at the 0.05 level, because P was greater than 0.10.

^{2}table, the significance of a Chi-square value of 12.35 with 2 df equals P < 0.005. This value may be rounded to P < 0.01 for convenience. The exact significance when the Chi-square is calculated through a statistical program is found to be P = 0.0011.

^{2 }values.

**Interpreting cell χ**^{2} values

^{2}values

^{2}value of 5.92 occurs in Cell 1. This is a result of the observed value being 23 while only 13.92 were expected. Therefore, this cell has a much larger number of observed cases than would be expected by chance. Cell 1 reflects the number of unvaccinated employees who contracted pneumococcal pneumonia. This means that the number of unvaccinated people who contracted pneumococcal pneumonia was significantly greater than expected. The second largest cell χ

^{2}value of 4.56 is located in Cell 2. However, in this cell we discover that the number of observed cases was much lower than expected (Observed = 5, Expected = 12.57). This means that a significantly lower number of vaccinated subjects contracted pneumococcal pneumonia than would be expected if the vaccine had no effect. No other cell has a cell χ

^{2}value greater than 0.99.

^{2}value less than 1.0 should be interpreted as the number of observed cases being approximately equal to the number of expected cases, meaning there is no vaccination effect on any of the other cells. In the case study example, all other cells produced cell χ

^{2}values below 1.0. Therefore the company can conclude that there was no difference between the two groups for incidence of non-pneumococcal pneumonia. It can be seen that for both groups, the majority of employees stayed healthy. The meaningful result was that there were significantly fewer cases of pneumococcal pneumonia among the vaccinated employees and significantly more cases among the unvaccinated employees. As a result, the company should conclude that the vaccination program did reduce the incidence of pneumoccal pneumonia.

^{2}values as part of the default output. Some programs will produce those tables as an option, and that option should be used to examine the cell χ

^{2}values. If the program provides an option to print out only the cell χ

^{2}value (but not cell expecteds), the direction of the χ

^{2}value provides information. A positive cell χ

^{2}value means that the observed value is higher than the expected value, and a negative cell χ

^{2}value (e.g. -12.45) means the observed cases are less than the expected number of cases. When the program does not provide either option, all the researcher can conclude is this: The overall table provides evidence that the two groups are independent (significantly different because P < 0.05), or are not independent (P > 0.05). Most researchers inspect the table to estimate which cells are overrepresented with a large number of cases versus those which have a small number of cases. However, without access to cell expecteds or cell χ

^{2}values, the interpretation of the direction of the group differences is less precise. Given the ease of calculating the cell expecteds and χ

^{2}values, researchers may want to hand calculate those values to enhance interpretation.

**Chi-square and closely related tests**

*versus*no pneumonia, the table would have 2 rows and 2 columns and the correct test would be the Fisher’s exact. The case study example requires a 2 x 3 table and thus the data are not suitable for the Fisher’s exact test.

*Table 4. Example of a table that violates cell expected values.*^{2}test assumption. This table should be tested with a maximum likelihood ratio Chi-square test.

**Strength test for the Chi-square**

*n*is the number of rows or number of columns, whichever is less. For the example, the V is 0.259 or rounded, 0.26 as calculated below.