3

Contingency Tables With Ordinal Variables

David Howell presents a nice example of how to modify the usual Pearson c2 analysis if you wish to take into account the fact that one (or both) of your classification variables can reasonably be considered to be ordinal (Statistical Methods for Psychology, 8th ed., 2013, pages 317-319). Here I present another example.

The data are from the article "Stairs, Escalators, and Obesity," by Meyers et al. (Behavior Modification 4: 355359). The researchers observed people using stairs and escalators. For each person observed, the following data were recorded: Whether the person was obese, overweight, or neither; whether the person was going up or going down; and whether the person used the stairs or the escalator. The weight classification can reasonably be considered ordinal.

Before testing any hypotheses, let me present the results graphically:

Percentage Use of Staircase Rather than Escalator Among Three Weight Groups

Initially I am going to ignore whether the shoppers were going up or going down and test to see if there is a relationship between weight and choice of device. Here is the SPSS output:

Notice that the Person Chi-Square is significant. Now we ask “is there a linear relationship between our weight categories and choice of device?” The easy way to do this is just to use a linear regression to predict device from weight category.

As you can see, the linear relationship is not significant. If you look back at the contingency table you will see that the relationship is not even monotonic. As you move from obese to overweight the percentage use of the stairs rises dramatically but then as you move from overweight to normal weight it drops a bit.

A chi-square for the linear effect can be computed as
c2 = (N – 1)r2 = 3215(.324) / 383.444 = 2.717, within rounding error of the “Linear by Linear Association” reported by SPSS.

We could also test the deviation from linearity by subtracting from the overall c2 the linear c2: 11.752 – 2.717 = 9.035. The df are also obtained by subtraction, overall less linear = 2 – 1 = 1. P(c2 > 9.035 | df = 1) = .0026. There is a significant deviation from linearity.

Now let us split the file by the direction of travel. If we consider only those going down, there is a significant overall effect of weight category but not a significant linear effect:

If we consider only those going up, there is a significant linear effect, and the deviation from linearity is not significant c2(1, N = 1362) = 2.626, p = .105

·  Equivalence of the Linear-by-Linear Chi-Square and the N-1 Chi-Square for 2×2 Tables

·  Return to Wuensch’s Stats Lessons Page

Karl L. Wuensch, East Carolina University, September, 2013.