Example of Chi-Square Test for Association

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 chi-square test for association 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 > Chi-Square Test for Association.
  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' '3rd shift'.
  5. Under Labels for the table (optional), in Rows, enter Machine ID.
  6. Click Statistics.
  7. Select Each cell’s contribution to chi-square. Leave the default selections of Chi-square test, Display counts in each cell, Display marginal counts, and Expected cell counts selected.
  8. Click OK in each dialog box.

Interpret the results

For this data, the Pearson chi-square statistic is 11.788 (p-value = 0.019) and the likelihood ratio chi-square statistic is 11.816 (p-value = 0.019). Both p-values are less than the significance level of 0.05. Thus, the engineer concludes that the variables are associated and that the performance of the presses varies depending on the shift.

The first shift produces the most rejected handles (160), and a large proportion of the bad handles come from press 2 (76). The number of bad handles produced on press 2 during shift 1 is much larger than would be expected if the variables were independent. The engineer uses this information to investigate the rejected handles from Press 2, made on the first shift.

Rows: Machine ID   Columns: Worksheet columns

1st shift2nd shift3rd shiftAll
         
1484748143
  56.0846.9739.96 
  1.16370.00001.6195 
         
2764732155
  60.7850.9143.31 
  3.80880.29982.9530 
         
3364034110
  43.1436.1330.74 
  1.18090.41510.3468 
         
All160134114408
Cell Contents
      Count
      Expected count
      Contribution to Chi-square

Chi-Square Test

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