Example of Cross Tabulation and Chi-Square

At an umbrella manufacturing facility, umbrella handles are measured and then removed from the assembly line if they don't meet specifications. A daily report indicates how many rejected handles were produced by each of three presses at the facility during each of three shifts. A quality engineer wants to determine whether press and shift are associated.

The engineer performs a cross tabulation analysis to determine whether the press and the shift that produced the rejected handles are associated.

  1. Open the sample data, UmbrellaHandles.MTW.
  2. Choose Stat > Tables > Cross Tabulation and Chi-Square.
  3. From the data drop-down list, select Summarized data in a two-way table.
  4. In Columns containing the table, enter '1st shift' '2nd shift' and '3rd shift'.
  5. Under Labels for the table (optional), in Rows, enter Machine ID.
  6. Click the Chi-Square button, and select Chi-square test.
  7. Under Statistics to display in each cell, select Expected cell counts and Standardized residuals. You can select any other statistics that you want to display in your output table.
  8. Click OK in each dialog box.

Interpret the results

The engineer uses the Pearson test and the Likelihood-Ratio test to determine whether an association between machine and shift exists. Because the p-values for the Pearson test and the Likelihood-Ratio test are less than 0.05, the engineer rejects the null hypothesis and concludes that there is an association between the variables of machine and shift.

In these results, there were a total of 408 defective umbrella handles. 143 defective handles were made by Machine 1, 155 defective handles were made by Machine 2, and 110 defective handles were made by Machine 3. Also, more of the defective handles were made during the first shift than during the other shifts. A total of 160 defective handles were made on the first shift, 134 defective handles were made on the second shift, and 114 defective handles were made on the third shift.

In each cell, Minitab displays the actual count, the expected count, and the standardized residual, which indicates the magnitude and direction of the difference between the actual and expected counts. For instance, from Machine 3, during the 3rd shift, 34 defective handles were made, and 30.74 were expected. The small positive residual indicates that the actual and expected counts are fairly close. But from Machine 2, during the 3rd shift, 32 defective handles were made, and 43.31 were expected. The larger negative residual indicates that less defective handles were produced than expected.

Rows: Machine ID   Columns: Worksheet columns

1st shift2nd shift3rd shiftAll
         
1484748143
  56.0846.9739.96 
  -1.07880.00501.2726 
         
2764732155
  60.7850.9143.31 
  1.9516-0.5476-1.7184 
         
3364034110
  43.1436.1330.74 
  -1.08670.64430.5889 
         
All160134114408
Cell Contents
      Count
      Expected count
      Standardized residual

Chi-Square Test

Chi-SquareDFP-Value
Pearson11.78840.019
Likelihood Ratio11.81640.019