Which would you rather have?

A new skateboard.
A new guitar.
A new outfit.
A new iPod.

View Results

Chi‐Square (χ2)

The statistical procedures that you have reviewed thus far are appropriate only for variables at the interval and ratio levels of measurement. The chi-square2) test can be used to evaluate a relationship between two nominal or ordinal variables. It is one example of a non-parametric test. Non-parametric tests are used when assumptions about normal distribution in the population cannot be met or when the level of measurement is ordinal or less. These tests are less powerful than parametric tests.

Suppose that 125 children are shown three television commercials for breakfast cereal and are asked to pick which they liked best. The results are shown in Table 1 .

TABLE 1 Commercial Preference for Boys and Girls

A

B

C

Totals

Boys

30

29

16

75

Girls

12

33

5

50

Totals

42

62

21

125

You would like to know if the choice of favorite commercial was related to whether the child was a boy or a girl or if these two variables are independent. The totals in the margins will allow you to determine the overall probability of (1) liking commercial A, B, or C, regardless of gender, and (2) being either a boy or a girl, regardless of favorite commercial. If the two variables are independent, then you should be able to use these probabilities to predict approximately how many children should be in each cell. If the actual count is very different from the count that you would expect if the probabilities are independent, the two variables must be related.

Consider the first (upper left) cell of the table. The overall probability of a child in the sample being a boy is 75 ÷ 125 = .6. The overall probability of liking Commercial A is 42 ÷ 125 = .336. The multiplication rule states that the probability of both of two independent events occurring is the product of their two probabilities. Therefore, the probability of a child both being a boy and liking Commercial A is .6 × .336 = .202. The expected number of children in this cell, then, is .202 × 125 = 25.2.

There is a faster way of computing the expected count for each cell: Multiply the row total by the column total and divide by n . The expected count for the first cell is, therefore, (75 × 42) ÷ 125 = 25.2. If you perform this operation for each cell, you get the expected counts (in parentheses) shown in Table 2 .

TABLE 2 Chi-Square Results for Table 1

A

B

C

Totals

Boys

30 (25.2)

29 (37.2)

16 (12.6)

75

Girls

12 (16.8)

33 (24.8)

5 (8.4)

50

Totals

42

62

21

125

Note that the expected counts properly add up to the row and column totals. You are now ready for the formula for χ2, which compares each cell's actual count to its expected count:




The formula describes an operation that is performed on each cell and which yields a number. When all the numbers are summed, the result is χ2. Now, compute it for the six cells in the example:




The larger χ2, the more likely that the variables are related; note that the cells that contribute the most to the resulting statistic are those in which the expected count is very different from the actual count.

Chi-square has a probability distribution, the critical values for which are listed in a χ2 critical values table . As with the t-distribution, χ2 has a degrees-of-freedom parameter, the formula for which is




or in your example:



A chi-square of 9.097 with two degrees of freedom falls between the commonly used significance levels of .05 and .01. If you had specified an alpha of .05 for the test, you could, therefore, reject the null hypothesis that gender and favorite commercial are independent. At a = .01, however, you could not reject the null hypothesis.

The χ2 test does not allow you to conclude anything more specific than that there is some relationship in your sample between gender and commercial liked (at α = .05). Examining the observed vs. expected counts in each cell might give you a clue as to the nature of the relationship and which levels of the variables are involved. For example, Commercial B appears to have been liked more by girls than boys. But χ2 tests only the very general null hypothesis that the two variables are independent.

Cite this article

cover
Get Up to Speed on the Math You Really Need!
Basic math for use in the real world.
Get Math You Can Really Use — Every Day!
Feeling Trapped by Trapezoids?
Get Help with Geometry Now!