Workshop Statistics: Discovery with Data, Second
Edition
Topic 26: Inference for Two-Way Tables
Activity 26-1: Suitability for Politics (cont.)
(a) observational units = sample of American adults
variable 1: whether or not they agree with the statement; categorical
binary
variable 2: their political view: categorical
(b) Tend to have more agreement with statement as lean more conservative.
While there is definitely a trend it may not be all that strong.
(c) agreement proportion = 382/1685 = .227
(d) Liberals: 484(.227) =109.87
(e) Moderates: 610(.227)=138.47
Conservatives: 591(.227)=134.16
(f) 382(484)/1685=109.73
(g) rest of row is 138.47 and 134.16
(h) (74-109.87)2/109.87 = 11.632
(139-138.47)2/138.47 = .004
(169-134.16)2/134.16 =9.152
(410-374.27)2/374.27 =3.140
(471-471.71)2/471.71 = .001
(422-457.02)2/457.02 = 2.683
sum = 26.881
(i) large values of the test statisitc will be evidence against the
null hypothesis (indicate larger discrepancies between the observed and
the expected)
(j) df = (3-1)(2-1) = 2
26.881 is off the chart so p-value is < .0005
(k) It would be highly unusual to observe these sample data by chance
alone if there was independence between agreement and political leaning.
We have very strong evidence that political leaning is related to people’s
agree with the statement "Most men are better suited emotionally for politics
than are
most women."
Activity 26-2: Government Spending
(a) Ho: There is no association between opinionon spending and
political leaning
Ha: There is an association between opinionon spending and
political leaning
(b) 133(376)/1235 = 40.49
590(435)/1235 = 207.81
512(424)/1235 = 175.78
(c) (40.49-50)2/50 = 2.232
(214-207.81)2/207.81 = .184
(176-175.78)2/175.78 = .000
sum=6.724
(d) with df=(3-1)(3-1)=4, find .1 < p-value < .2
(e) There is no evidence of an association between opinion and spending
on space program.
Activity 26-3: Newspaper Reading (cont.)
(a) MTB > chisq c1 c2
Chi-Square Test: men, women
Expected counts are printed below
observed counts
men women Total
1
375 430 805
349.12 455.88
2
182 238 420
182.15 237.85
3
121 173 294
127.50 166.50
4
133 218 351
152.23 198.77
Total
811 1059 1870
Chi-Sq = 1.918 + 1.469
+
0.000 + 0.000 +
0.332 + 0.254 +
2.428 + 1.859 = 8.261
DF = 3, P-Value = 0.041
Ho: There is no association between gender and newspaper
reading
Ha: There is an association between gender and newspaper
reading
test statistic: 8.261, p-value = .041
We would reject the null hypothesis at the .05 level and conclude there
is a relationship between gender and newspaper reading. (We would not reject
at the .01 level.)
(b) The 2.428 is the largest. This corresponds to the male, reading
less than once per week cell. There are fewer males (133) reading less
than once per week
than we would’ve expected (152.23) if there was no relationship.
(c) Next three: 1.918, 1.859, 1.469
There are more men than we would have expected reading every day, there
are fewer women then we would expected reading every day and more women
than expected reading less than once per week. Seems men read more
than women.
Activity 26-4: Suitability for Politics (cont.)
(a)Ho: There is no association between gender and suitability
opinion
Ha: There is an association between gender and suitability
opinion
MTB > chisq c4 c5
Chi-Square Test: men, women
Expected counts are printed below
observed counts
men women Total
1
169 236 405
170.16 234.84
2
565 777 1342
563.84 778.16
Total
734 1013 1747
Chi-Sq = 0.008 + 0.006
+
0.002 + 0.002 = 0.018
DF = 1, P-Value = 0.894
With our large p-value, there is no evidence of an association
between gender and their opinion on whether men are more suitable for politics
than women.
(b) Let q1=proportion
of men who agree with the statement and q2=proportion
of women who agree with the statement
Ho: q1=q2
(men
and women agree in equal proportions)
Ha: q1¹q2(the
proportions of men and women who agree differs)
MTB> PTwo 405 169 1342 565;
SUBC> Pooled.
Test and CI for Two Proportions
Sample
X N Sample p
1
169 405 0.417284
2
565 1342 0.421013
Estimate for p(1) - p(2):
-0.00372946
95% CI for p(1) - p(2):
(-0.0585395, 0.0510806)
Test for p(1) - p(2) = 0 (vs
not = 0): Z = -0.13 P-Value = 0.894
Again, with this large p-value, we would fail to reject Ho:
q1=q2,
indicating
that men and women agree in the same proportion.
(c) The p-values are equal, and
the conclusion is the same.
(d) z=-.13, z2=.0169
which is close to .018.
Activity 26-5: Government Spending (cont.)
Note: The answers
to (a) and (b) below comprise the answer to (a) in the Calculator version.
The answers to (c)-(f) below are the answers to (b)-(e) in the Calculator
version.
Answers will
vary. These are sample answers.
(a) Sample
output:
|
liberal |
moderate |
conservative |
too little |
41 |
41 |
51 |
just right |
180 |
217 |
193 |
too much |
155 |
177 |
180 |
(b) chi-square
value for above table: 2.386
(c) This is
smaller than 6.724
(d)
(e) There
were 20 values in this graph larger than 6.725. This is 20% of the repetitions.
(f) Earlier
found p-value to be between .1 and .2 so we are close. They should
match since the p-value tells us how often we expect to get a chi-square
value at least this extreme when the null hypothesis is true.