EXAMPLE 5 Constructing a crosstabulation

Table 6 contains information about the size (compact, midsize, or large) and the recommended gasoline (regular or premium) for a sample of ten 2014 automobiles.

46

  1. Construct a crosstabulation of the variables size and gasoline.
  2. Identify any patterns.
Table 2.6: Table 6 Size and recommended gasoline for ten 2014 automobiles
Car Car size Recommended gasoline
BMW 328i Compact Premium
Chevrolet Camaro Compact Regular
Honda Accord Compact Regular
Cadillac CTS Midsize Premium
Nissan Sentra Midsize Regular
Subaru Legacy AWD Midsize Premium
Toyota Camry Midsize Regular
Ford Taurus Large Regular
Hyundai Genesis Large Premium
Rolls-Royce Large Premium
Table 2.6: Source: www.fueleconomy.gov.

Solution

    • Step 1 We use the values of the two variables to create the crosstabulation given in Table 7. Note that the categories for the variable gasoline are shown at the top, whereas the categories for the variable size are shown on the left. Each car in the sample is associated with a certain cell in the crosstabulation, in the appropriate row and column. For example, the Chevrolet Camaro is one of the two cars that appear in the “Compact” car size row and the “Regular” gasoline column.
    • Step 2 For each row and column combination in the crosstabulation, enter the number of observations that fall in the two categories.
    • Step 3 The “Total” column contains the sum of the counts of the cells in each row (category) of the size variable and represents the frequency distribution for this variable. Similarly, the “Total” row along the bottom sums the counts of the cells in each column (category) of the gasoline variable and represents the frequency distribution for this variable. In the lower right-hand corner we have the grand total, which should equal the sample size.

    carsizegas

    Table 2.7: Table 7 Crosstabulation of car size and recommended gasoline
    Recommended gasoline
    Car size Regular Premium Total
    Compact 2 1 3
    Midsize 2 2 4
    Large 1 2 3
    Total 5 5 10
  1. We can use the crosstabulation to look for patterns in the data set. One possible pattern is the following: Compact cars tend to use regular gasoline, whereas large cars tend to use premium gasoline. Of course, this sample size is too small to form any conclusions about such a relationship.

NOW YOU CAN DO

Exercises 21, 37, 41, and 45.