Next Page Previous Page Home Tools & Aids Search Handbook
7. Product and Process Comparisons
7.4. Comparisons based on data from more than two processes

7.4.5.

How can we compare the results of classifying according to several categories?

Contingency Table approach When items are classified according to two or more criteria, it is often of interest to decide whether these criteria act independently of one another.

For example, suppose we wish to classify defects found in wafers produced in a manufacturing plant, first according to the type of defect and, second, according to the production shift during which the wafers were produced. If the proportions of the various types of defects are constant from shift to shift, then classification by defects is independent of the classification by production shift. On the other hand, if the proportions of the various defects vary from shift to shift, then the classification by defects depends upon or is contingent upon the shift classification and the classifications are dependent.

In the process of investigating whether one method of classification is contingent upon another, it is customary to display the data by using a cross classification in an array consisting of r rows and c columns called a contingency table. A contingency table consists of r x c cells representing the r x c possible outcomes in the classification process. Let us construct an industrial case:

Industrial example A total of 309 wafer defects were recorded and the defects were classified as being one of four types, A, B, C, or D. At the same time each wafer was identified according to the production shift in which it was manufactured, 1, 2, or 3.
Contingency table classifying defects in wafers according to type and production shift These counts are presented in the following table.


  Type of Defects

Shift A B C D Total

1 15(22.51) 21(20.99) 45(38.94) 13(11.56) 94
2 26(22.9) 31(21.44) 34(39.77) 5(11.81) 96
3 33(28.50) 17(26.57) 49(49.29) 20(14.63) 119

Total 74 69 128 38 309

(Note: the numbers in parentheses are the expected cell frequencies).

Column probabilities Let pA be the probability that a defect will be of type A. Likewise, define pB, pC, and pD as the probabilities of observing the other three types of defects. These probabilities, which are called the column probabilities, will satisfy the requirement

pA + pB + pC + pD = 1
Row probabilities By the same token, let pi (i=1, 2, or 3) be the row probability that a defect will have occurred during shift i, where

p1 + p2 + p3 = 1
Multiplicative Law of Probability Then if the two classifications are independent of each other, a cell probability will equal the product of its respective row and column probabilities in accordance with the Multiplicative Law of Probability.
Example of obtaining column and row probabilities For example, the probability that a particular defect will occur in shift 1 and is of type A is (p1) (pA). While the numerical values of the cell probabilities are unspecified, the null hypothesis states that each cell probability will equal the product of its respective row and column probabilities. This condition implies independence of the two classifications. The alternative hypothesis is that this equality does not hold for at least one cell.

In other words, we state the null hypothesis as H0: the two classifications are independent, while the alternative hypothesis is Ha: the classifications are dependent.

To obtain the observed column probability, divide the column total by the grand total, n. Denoting the total of column j as cj, we get

phat(A) = c(1)/n = 74/309;
 phat(B) = c(2)/n = 69/309;
 phat(C) = c(3)/n = 128/309;
 phat(D) = c(4)/n = 38/309
Similarly, the row probabilities p1, p2, and p3 are estimated by dividing the row totals r1, r2, and r3 by the grand total n, respectively
    phat(1) =r1/n = 94/309;  phat(2) = r2/n = 96/309;
  phat(3) = r3/n = 119/309
Expected cell frequencies Denote the observed frequency of the cell in row i and column jof the contingency table by nij. Then we have
Ehat(n(ij) = n(phat(i)*phat(j)) = n(r(i)/n)*(c(j)/n) = r(i)*c(j)/n
Estimated expected cell frequency when H0 is true. In other words, when the row and column classifications are independent, the estimated expected value of the observed cell frequency nij in an r x c contingency table is equal to its respective row and column totals divided by the total frequency.
Ehat(n(ij) = r(i)*c(j)/n
The estimated cell frequencies are shown in parentheses in the contingency table above.
Test statistic From here we use the expected and observed frequencies shown in the table to calculate the value of the test statistic

Chi-Square =
 SUM[i=1 to 3]SUM[j=1 to 4][(n(ij) - Ehat(n(ij))**2/Ehat(n(ij)]

Chi-Square = (15 - 22.51)**2/22.51
 + (26 - 22.99)**2/22.99 + ... + (20 - 14.63)**2/14.63 = 19.18

df = (r-1)(c-1) The next step is to find the appropriate number of degrees of freedom associated with the test statistic. Leaving out the details of the derivation, we state the result:
The number of degrees of freedom associated with a contingency table consisting of r rows and c columns is (r-1) (c-1).
So for our example we have (3-1) (4-1) = 6 d.f.
Testing the null hypothesis In order to test the null hypothesis, we compare the test statistic with the critical value of Χ 21-α/2 at a selected value of α. Let us use α = 0.05. Then the critical value is Χ 20.95,6 = 12.5916 (see the chi square table in Chapter 1). Since the test statistic of 19.18 exceeds the critical value, we reject the null hypothesis and conclude that there is significant evidence that the proportions of the different defect types vary from shift to shift. In this case, the p-value of the test statistic is 0.00387.
Home Tools & Aids Search Handbook Previous Page Next Page