text
stringlengths
0
6.73k
can safely be applied as long as é;; > 5 for all cells.
eee =A company packages a particular product in cans of three different sizes, each one
using a different production line. Most cans conform to specifications, but a quality
control engineer has identified the following reasons for nonconformance: (1)
blemish on can; (2) crack in can; (3) improper pull tab location; (4) pull tab
missing; (5) other. A sample of nonconforming units is selected from each of the
three lines, and each unit is categorized according to reason for nonconformity,
resulting in the following contingency table data:
Reason for Nonconformity
Blemish Crack Location Missing Other Sample Size
Production 1 34 65 17 21 13 150
Line 2 23 52 25 19 6 125
3 32 28 16 14 10 100
Total 89 145 58 54 29 375
Does the data suggest that the proportions falling in the various nonconformance
categories are not the same for the three lines? The parameters of interest are the
various proportions, and the relevant hypotheses are
Ho: the production lines are homogeneous with respect to the five non-
conformance categories; that is, pj; = p2j = p3j for j = 1, ...,5
Hi: the production lines are not homogeneous with respect to the categories
The estimated expected frequencies (assuming homogeneity) must now be calcu-
lated. Consider the first nonconformance category for the first production line.
When the lines are homogeneous,
estimated expected number among the 150 selected units that are blemished
__ (first row total)(first column total) — (150)(189) _ 5860
7 total of sample sizes - 375
The contribution of the cell in the upper-left corner to 7? is then
(observed — estimated expected)” _ (34— 35.60)° =07n
estimated expected ~ 35.60
--- Trang 760 ---
13.3 Two-Way Contingency Tables 747
The other contributions are calculated in a similar manner. Figure 13.4 shows
MINITAB output for the chi-squared test. The observed count is the top number in
each cell, and directly below it is the estimated expected count. The contribution of
each cell to 7? appears below the counts, and the test statistic value is 77 = 14.159.
All estimated expected counts are at least 5, so combining categories is unnecessary.
The test is based on (3 —1)(5— 1) = 8 df. Appendix Table A.10 shows that the values
that capture upper-tail areas of .08 and .075 under the 8 df curve are 14.06 and 14.26,
respectively. Thus the P-value is between .075 and .08; MINITAB gives P-value
= .079. The null hypothesis of homogeneity should not be rejected at the usual
significance levels of .05 or .01, but it would be rejected for the higher « of .10.
Expected counts are printed below observed counts
blem crack loc missing other Total
1 34 65 17 21 13 150
35.60 58.00 23.20 21.60 11.60
2 23 52 25 29 6 125
29.67 48.33 19.33 18.00 9.67
3 32 28 16 14 10 100
23: 73. 38.67 iSna% 14.40 ac
Total 89 145 58 54 29 375
Chisq = 0.072 + 0.845 + 1.657 + 0.017 + 0.169 + 1,498 + 0.278 +
1.661 + 0.056 + 1.391 + 2.879 + 2.943 + 0.018 + 0.011 +
0.664 = 14.159
df = 8, p = 0.079
Figure 13.4 MINITAB output for the chi-squared test of Example 13.13 /
Testing for Independence
We focus now on the relationship between two different factors in a single
population. The number of categories of the first factor will be denoted by / and
the number of categories of the second factor by J. Each individual in the popula-
tion is assumed to belong in exactly one of the / categories associated with the first
factor and exactly one of the J categories associated with the second factor. For
example, the population of interest might consist of all individuals who regularly
watch the national news on television, with the first factor being preferred network
(ABC, CBS, NBC, PBS, CNN, or FOX, so J = 6) and the second factor political
philosophy (liberal, moderate, conservative, giving J = 3).
For a sample of n individuals taken from the population, let n,; denote the
number among the n who fall both in category i of the first factor and category j of
the second factor. The 7,;’s can be displayed in a two-way contingency table with
T rows and J columns. In the case of homogeneity for / populations, the row totals
were fixed in advance, and only the J column totals were random. Now only the
total sample size is fixed, and both the ,.’s and n,;’s are observed values of random
variables. To state the hypotheses of interest, let
--- Trang 761 ---
748 = cuarrer 13 Goodness-of-Fit Tests and Categorical Data Analysis
pi = the proportion of individuals in the population who
belong in category i of factor 1 and category j of factor 2
= P(a randomly selected individual falls in both category
i of factor 1 and category j of factor 2)
Then
Pi.= Spi = P(arandomly selected individual falls in category i of factor 1)
J
Pj= Spi = P(arandomly selected individual falls in category j of factor 2)
Recall that two events A and B are independent if P(A 9 B) = P(A) - P(B). The
null hypothesis here says that an individual's category with respect to factor | is
independent of the category with respect to factor 2. In symbols, this becomes
Pi = Pi. p; for every pair (i,j).
The expected count in cell (i,j) is n - pjj, So When Ho is true, E(Njj) = n= pj. pj.
To obtain a chi-squared statistic, we must therefore estimate the p;.’s (i = 1, ...,/)
and p,’s (j = 1, ...,/). The (maximum likelihood) estimates are
Bi. = i sample proportion for category i of factor 1
n
and
«0 z ¢
2 = sample proportion for category j of factor 2