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.

Tabulated Statistics: Machine ID, Worksheet columns

Rows: Machine ID Columns: Worksheet columns 1st shift 2nd shift 3rd shift All 1 48 47 48 143 56.08 46.97 39.96 -1.0788 0.0050 1.2726 2 76 47 32 155 60.78 50.91 43.31 1.9516 -0.5476 -1.7184 3 36 40 34 110 43.14 36.13 30.74 -1.0867 0.6443 0.5889 All 160 134 114 408 Cell Contents Count Expected count Standardized residual
Chi-Square Test Chi-Square DF P-Value Pearson 11.788 4 0.019 Likelihood Ratio 11.816 4 0.019
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy