text
stringlengths
0
6.73k
This gives estimated expected cell counts identical to those in the case of homo-
geneity.
by = NB -ppone tt
non n
__ (ith row total)(jth column total)
7 n
The test statistic is also identical to that used in testing for homogeneity, as is
the number of degrees of freedom. This is because the number of freely determined
cell counts is /J — 1, since only the total 7 is fixed in advance. There are / estimated
P;.’s, but only J — 1 are independently estimated since X p;. = 1, and similarly J — 1
p.js are independently estimated, so J + J — two parameters are independently
estimated. The rule of thumb now yields df = J —1-(/+J-2)=I-I-
J+1=(-1)-V-1).
--- Trang 762 ---
13.3 Two-Way Contingency Tables 749
Null hypothesis: Ho: py =pi.-pj f=1,--.0) f= lyeeeJd
Alternative hypothesis: H, : Ho is not true
Test statistic value:
i sti say? tt 3..\2
pu y (observed — estimated expected) _ y ys (ny — éy)
fi - estimated expected ey
all cells i=l jt
Rejection region: 77 > 73,4_1)y-1)
Again, P-value information can be obtained as described in Section 13.1.
The test can safely be applied as long as é;; > 5 for all cells.
A study of the relationship between facility conditions at gasoline stations and
aggressiveness in the pricing of gasoline (“An Analysis of Price Aggressiveness in
Gasoline Marketing,” J. Market. Res., 1970: 36-42) reports the accompanying data
based on a sample of n = 441 stations. At level .01, does the data suggest that
facility conditions and pricing policy are independent of one another? Observed
and estimated expected counts are given in Table 13.10.
Table 13.10 Observed and estimated expected counts for Example 13.14
Observed Pricing Policy
Aggressive Neutral Nonaggressive Expected Pricing Policy
mi
ny 134 174 133 441 134 174 133 441
Thus
2 2
> (24— 17.02) (36 — 54.29)
| aN cc M7
i T7021 S349
and because 7%;,4 = 13.277, the hypothesis of independence is rejected.
We conclude that knowledge of a station’s pricing policy does give informa-
tion about the condition of facilities at the station. In particular, stations with an
aggressive pricing policy appear more likely to have substandard facilities than
stations with a neutral or nonaggressive policy. a
Ordinal Factors and Logistic Regression
Sometimes a factor has ordinal categories, meaning that there is a natural ordering.
For example, there is a natural ordering to freshman, sophomore, junior, senior. In
such situations we can use a method that often has greater power to detect relation-
ships. Consider the case in which the first factor is ordinal and the other has two
categories. Denote by X the level of the first (ordinal) factor, the rows, which will
be the predictor in the model. Then Y designates the column, either one or two, and
--- Trang 763 ---
750 carrer 13 Goodness-of-Fit Tests and Categorical Data Analysis
Y will be the dependent variable in the model. It is convenient for purposes of
logistic regression to label column 1 as Y = 0 (failure) and column 2 as Y = 1
(success), corresponding to the usual notation for binomial trials. In terms of
logistic regression, p(x) is the probability of success given that X = x:
, . Px2
P(x) = P(Y = 1|X =x) = P(j = 2|i = x) = ——~_
Px + Pro
Then the logistic model of Chapter 12 says that
bot Bix — P(x) _ Po
1—p(x) pa
In terms of the odds of success in a row (estimated by the ratio of the two counts),
the model says that the odds change proportionally (by the fixed multiple e’') from
row to row. For example, suppose a test is given in grades 1, 2, 3, and 4 with
successes and failures as follows
Grade Failed Passed Estimated Odds
1 45 45 1
2: 30 60. 2
3 18 ip 4
4 10 80 8
Here the model fits perfectly, with odds ratio e#: = 2, so 8; = In(2) and Bo = —In(2).
In general, it should be clear that f is the natural log of the odds ratio between
successive rows. If a table with J rows and 2 columns has roughly acommon odds ratio
from row to row, then the logistic model should be a good fit if the rows are labeled
with consecutive integers.
We focus on the slope f; because the relationship between the two factors
hinges on this parameter. The hypothesis of no relationship is equivalent to Ho:
B, = 0, which is usually tested against a two-tailed alternative.
Is there a relationship between TV watching and physical fitness? For an answer