Professional Documents
Culture Documents
Microsoft Excel
6th Edition
Contingency Tables
Useful in situations comparing multiple
population proportions
Used to classify sample observations according
to two or more characteristics
Also called a cross-classification table.
Hand Preference
sample size = n = 300:
Gender Left Right
120 Females, 12
were left handed
Female 12 108 120
180 Males, 24 were
left handed Male 24 156 180
36 264 300
Decision Rule:
2 2
χ
If STAT χ α , reject H 0,
otherwise, do not reject
H0
0
Do not Reject H0 2
reject H0
2α
The average X1 X 2 X
p
proportion is: n1 n2 n
i.e., based on all 180 children the proportion of left handers is 0.12,
that is, 12%
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-9
Finding Expected Frequencies
DCOVA
Hand Preference
2
The test statistic is χ STAT 0.7576; χ 02.05 with 1 d.f. 3.841
Decision Rule:
2
If χ STAT < 3.841, reject H0,
otherwise, do not reject H0
Here,
2 2
0.05 χ STAT = 0.7576< χ 0.05 = 3.841,
so we do not reject H0 and
0 conclude that there is not
Do not Reject H0 2 sufficient evidence that the two
reject H0
20.05 = 3.841 proportions are different at =
0.05
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-13
2 Test for Differences Among
More Than Two Proportions
DCOVA
Extend the 2 test to the case with more than
two independent populations:
H 0: π 1 = π2 = … = πc
H1: Not all of the πj are equal (j = 1, 2, …, c)
The overall X1 X 2 Xc X
p
proportion is: n1 n2 nc n
H 0: π 1 = π 2 = π 3
H1: Not all of the πj are equal (j = 1, 2, 3)
2
χ STAT 12.792 χ 02.01 9.2103so reject H 0
Other Data
Level of significance 0.01 Chi-sq Critical Value 9.2103
d.f 2
Q Statistic 3.034854
At 1% level of significance, there is evidence of a difference
in attitude between students and faculty
( fo fe )2
2
χ STAT
all cells
fe
where:
fo = observed frequency in a particular cell of the r x c table
fe = expected frequency in a particular cell if H0 is true
Where:
row total = sum of all frequencies in the row
column total = sum of all frequencies in the column
n = overall sample size
If χ STAT
2
χ α2 , reject H0,
2
Where χ α is from the chi-squared distribution
with (r – 1)(c – 1) degrees of freedom
30 70 Total 70 88 42 200
10.5
200
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-28
Example: The Test Statistic
(continued)
DCOVA
The test statistic value is:
( f o f e )2
2
χ STAT
all cells
fe
( 24 24.5 ) 2 ( 32 30.8 ) 2 ( 10 8.4 ) 2
0.709
24.5 30.8 8.4
2
The test statistic is χ STAT 0.709 ; χ 02.05 with 6 d.f. 12.592
Decision Rule:
2
If χ STAT > 12.592, reject H0,
otherwise, do not reject H0
0.05 Here,
2
χ STAT = 0.709 < χ 0.2 05 = 12.592,
so do not reject H0
0
Do not Reject H0 2 Conclusion: there is not
reject H0 sufficient evidence that meal
20.05=12.592 plan and class standing are
related at = 0.05
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-30
McNemar Test (Related Samples)
DCOVA
Condition 2
Yes A B A+B
No C D C+D
A C
p2 proportion of respondent s who answer yes to condition 2
n
Test H0: π1 = π2
(the two population proportions are equal)
H1: π1 ≠ π2
(the two population proportions are not equal)
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-33
McNemar Test (Related Samples)
(continued)
DCOVA
The test statistic for the McNemar test:
BC
Z STAT
BC
BC 2 22
Yes 118 2 120 Z STAT 4.08
BC 2 22
No 22 158 180
Totals 140 160 300
Since ZSTAT = -4.08 < -1.645, you reject H0 and conclude that the
change in loan terms significantly increase business for the
mortgage company.
n(n 1)
T1 T2
2
where n = n1 + n2
a n1
Lower and
n2 One- Two-
Upper 4 5
Tailed Tailed
Critical
Values for 4
T1 from .05 .10 12, 28 19, 36
Appendix .025 .05 11, 29 17, 38
table E.6: 5
.01 .02 10, 30 16, 39
.005 .01 --, -- 15, 40
6
standard deviation σ T : 1
n1(n 1 ) n1 n2 (n 1)
μ T1 σT1
2 12
12
Where ZSTAT approximately follows a
standardized normal distribution
n1 n 2 ( n 1 ) 4 ( 5 )( 9 1 )
σT 4.082
1 12 12
groups
Compute the H test statistic
12 c T2
H j
3(n 1)
n(n 1) j1 n j
where:
n = sum of sample sizes in all groups
c = Number of groups
Tj = Sum of ranks in the jth group
nj = Number of values in the jth group (j = 1, 2, … , c)
DCOVA
Complete the test by comparing the
calculated H value to a critical 2 value from
the chi-square distribution with c – 1
degrees of freedom
Decision rule
Reject H0 if test statistic H > 2α
Otherwise do not reject H0
0 2
Do not Reject H0
reject H0
2α
The H statistic is
12 c T2
H j
3(n 1)
n(n 1) j1 n j
12 44 2 56 2 20 2
3(15 1) 6.72
15(15 1) 5 5 5
2
Since H = 6.72 > 0.05 5.991,
χ
reject H0
On Line Topic
2
(n - 1)S 24 * 49
χ 2
STAT 2
14.185
σ 81
Since 0.975 12.401 < 14.185 < 0.025 39.364 you fail to reject H0
2 2