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.

Chi-Square Test for Association: 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.1637 0.0000 1.6195 2 76 47 32 155 60.78 50.91 43.31 3.8088 0.2998 2.9530 3 36 40 34 110 43.14 36.13 30.74 1.1809 0.4151 0.3468 All 160 134 114 408 Cell Contents Count Expected count Contribution to Chi-square
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