Review 2

advertisement
Review 2
91.6.13
Chapter 10
 Interval estimate, hypothesis tests, and p-value of the
population mean difference
1   2 .
 Two methods, independent samples and matched samples, can
be used for the population mean difference
1   2 .
 ANOVA for testing the equality of k population means.
Example:
To determine the effectiveness of a new weight control diet, ten randomly
selected students observed the diet for 4 weeks with the results shown
below.
Dieter
Weight (before)
Weight (after)
A
138
135
B
151
147
C
129
132
D
125
127
E
168
155
F
139
131
G
152
144
H
140
142
I
137
137
J
180
180
We like to test the hypothesis H 0 : 1   2 , where
1
and
2
are
the mean weights of the students before and after taking the weight
control diet, respectively.
(a) For   0.1, test the above hypothesis using the classical hypothesis
test.
(b) For   0.05 , please use the confidence interval method to test the
above hypothesis.
(c) For   0.2 , please use p-value to test the above hypothesis.
1
[solution:]
(a)
d1
d2
d3
d4
d5
d6
d7
d8
d9
d 10
3
4
-3
-2
13
8
8
-2
0
0
Therefore, d  2.9, s d  5.322 . Thus,
t
d
 sd



n


2.9
 5.322



10 

 1.723  t  1.723  1.833  t 9,0.05  t n 1, .
2
We do not reject H 0 .
(b)
A 95% confidence interval for
d  t n1,
Since
sd
2
n
 2.9  t9,0.025 
1   2 is
5.322
5.322
 2.9  2.262 
 2.9  3.807   0.907, 6.707 .
10
10
0   0.907, 6.707 , we do not reject H 0 .
(c)
p  value  PT n  1  t   PT 9  1.723  0.2  PT 9  1.383 .
Therefore, we reject H 0 .
Example:
The following data are the number of products of 3 different production
lines.
Line 1
Line 2
Line 3
Number of Products
210
215
205
180
160
195
145
170
165
2
180
190
160
175
170
155
190
155
175
Let
1 ,  2
3
and
be the mean number of products of the 3
production lines. Please test the hypothesis H 0 : 1   2   3 with
  0.05 .
[solution:]
n1  n2  n3  6, nT  n1  n2  n3  18 .
and
x1  195.83, x2  175, x3  161.6, x  177.5.
Then,
 n x
k
MSB 
j
j 1
 x
2
j
k 1
6  195.8  177.5  6  175  177.5  6  161.6  177.5

 1779.4
3 1
2
2
2
and
 n  1s  x
k
MSW 

k
2
j
j
j 1
nT  k

nj
j 1 i 1
 xj 
2
j ,i
nT  k
210  195.82    190  195.82  180  1752    155  1752  145  161.62    175  161.62
18  3
 216.91
Therefore,
f 
MSB 1779.4

 8.2  3.63  f 2,15, 0.05  f k 1,nT k , ,
MSW 216.91
we reject H 0 .
3
Chapter 11
 Interval estimate, hypothesis tests, and p-value of the
population mean difference p1  p2 .

2
test for proportions of a multinomial population and for the
independence (contingency table).
Example:
The results of a recent poll on the preference of voters regarding two
candidates are shown below:
Candidate
Voters Surveyed
Voters Favoring This
Candidate
A
400
192
B
450
225
(a) Please construct a 90% confidence interval for the difference between
the preference for the two candidates ( p1
 p2 ).
(b) With   0.05 , please test whether or not there is a significant
difference between the preference for the two candidates
( H0 :
p1  p2 ).
[solution:]
(a)
p1 
192
225
 0.48, p 2 
 0.5
400
450
A 90% confidence interval for
 p1 
p 2   z
2
p1 1  p1 
p 1  p 2 
 2
n1
n2
0.48  0.52 0.5  0.5

400
450
 0.2  1.645  0.0343   0.076498, 0.036498
 0.48  0.5  z 0.05
4
(b)
p
n1 p1  n2 p2 400  0.48  450  0.5 192  225


 0.4906
n1  n2
400  450
400  450
Thus,
p1  p 2
z
1
1 

p 1  p  
n
n
2 
 1

0.48  0.5
1 
 1
0.4906  0.5094  


 400 450 
 0.582
Since
z  0.582  1.96  z 0.025  z ,
2
we do not reject H 0 .
Example:
The following data are the frequencies of products of throwing a dice 120
times:
Point
1
2
3
4
5
6
Frequency
13
24
18
22
19
24
1
H
:
p

p



p

2
6
Please test if the dice is fair (i.e., 0 1
6 ) with
[solution:]
ei  120 
1
 20, i  1,2, ,6.
6
Then,
6
 
2
i 1
 f i  ei 2 13  202 24  202 18  202



ei
20
20
20
2
2
2

22  20 19  20 24  20



20
20
Since
5
20
 4.5
 2  4.5  11.0705   52,0.05   k21, ,
we do not reject H 0 .
Example:
The following data are the number of people who are in favor of, are not
in favor of, and have no comment on, some proposal:
Favor
Not Favor
No Comment
Male
252
145
203
Female
148
105
147
Please test if female and male differ in their opinions about the proposal.
[solution:]
The column totals are 252  148  400,145  105  250,203  147  350
while the row totals are 252  145  203  600,148  105  147  400 . In
addition, the total number is 1000.
The table for the expected numbers
eij
is
Favor
Not Favor
No Comment
Male
600  400
 240
1000
600  250
 150
1000
600  350
 210
1000
Female
400  400
 160
1000
400  250
 100
1000
400  350
 140
1000
400
Column
Total
400
250
350
1000
Thus,
6
Row
Total
600
p
m
  
2
i 1 j 1
f
 eij 
2
ij
eij
3
2
 
i 1 j 1
f
 eij 
2
ij
eij
2
2
2



252  240 
145  150 
203  210 



240
150
210
2
2
2



148  160 
105  100 
147  140 



 2.5
160
100
140
Since
 2  2.5  5.99   22,0.05   23121,0.05   2p1m1, , we do not
reject H 0 .
7
Download