Professional Documents
Culture Documents
7/14/2015 1
Learning Objectives
7/14/2015 2
1
7/14/2015
Test statistic:
( x1 x2 ) ( 1 2 )
T
( S12 / n1) ( S 2
2 /n )
2
s12 s22 2
)
(
n1 n2
2
( s1 / n1 ) 2 ( s22 / n2 ) 2
n1 1 n2 1
If is not an integer, round down to the nearest integer.
7/14/2015 3
Case 2: 12 22
Critical region:
H1 : 1 2 T t / 2 , v or T t / 2 , v
H1 : 1 2 T t , v
H1 : 1 2 T t , v
7/14/2015 4
2
7/14/2015
Confidence interval:
A 100(1 )% two sided confidence interval for 1 2
when variance is unknown & unequal:
Case 2: 12 22
s12s2
x1 x2 t / 2, 2 1 2
n1 n2
s12s2
x1 x2 t / 2, 2
n1 n2
Example 1:
Two companies manufacture a rubber material intended for use in
an automotive application. 25 samples of material from each
company are tested, and the amount of wear after 1000 cycles are
observed. For company 1, the sample mean and standard deviation
of wear are
x1 20.12mg / 1000cycles and s1 1.9mg / 1000cycles
and for company 2, we obtain
x2 11.64mg / 1000cycles and s2 7.9mg / 1000cycles
3
7/14/2015
H 0 : 1 2 0 H1 : 1 2 0
( x1 x 2 ) ( 1 2 )
T
( S12 / n1 ) ( S 22 / n2 )
7/14/2015 7
Re ject H0 if T 2.479
7/14/2015 8
4
7/14/2015
(20.12 11.64) 0
T 5.22
2 2
(1.9) (7.9)
25 25
7. Conclusion
7/14/2015 9
Example 2:
The following data represent the running times of films produced
by 2 motion-picture companies. Test the hypothesis that the
average running time of films produced by company 2 exceeds the
average running time of films produced by company 1 by 10
minutes against the one-sided alternative that the difference is less
than 10 minutes? Use 0.01 and assume the distributions of
times to be approximately normal with unequal variances.
Time
Company
X1 102 86 98 109 92
7/14/2015 10
5
7/14/2015
H 0 : 2 1 10 H1 : 2 1 10
( x2 x1 ) ( 2 1 )
T
( S12 / n1 ) ( S 22 / n2 )
7/14/2015 11
s12 s22 2
)
(
n1 n2 (78.8 / 5 913.333 / 7) 2
2 7.38
( s1 / n1 ) 2 ( s22 / n2 ) 2 (78.8 / 5) 2 / 4 (913.333 / 7) 2 / 6
n1 1 n2 1
Re ject H0 if T 2.998
7/14/2015 12
6
7/14/2015
( x2 x1 ) ( 2 1 )
T
( S12 / n1 ) ( S 22 / n2 )
(110 97.4) 10
0.22
78.8 / 5 913.333 / 7
7. Conlusion
7/14/2015 13
H1 : p1 p2 Z z / 2 or Z z / 2
H1 : p1 p2 Z z
H1 : p1 p2 Z z
7/14/2015 14
7
7/14/2015
Confidence interval:
A 100(1 )% two sided confidence interval for p1 p2 is:
pˆ 1 (1 pˆ 1 ) pˆ 2 (1 pˆ 2 )
LL ( pˆ 1 pˆ 2 ) z / 2
n1 n2
pˆ 1 (1 pˆ 1 ) pˆ 2 (1 pˆ 2 )
UL ( pˆ 1 pˆ 2 ) z / 2
n1 n2
LL p1 p2 UL
7/14/2015 15
Example 3:
In a study on the effects of sodium restricted diets on hypertension, 24
out of 55 hypertensive patients were on sodium restricted diets, and 36
out of 149 non-hypertensive patients were on sodium restricted diets.
i. Test the hypothesis that the proportion of patients on sodium
restricted diets is higher for hypertensive patients at a=0.05.
ii. What is the P-value for this test?
iii. Construct a two sided 95% CI and comment.
Solution
Step 1 Problem: Test about two proportions large samples
Step 2 H0 : p A = p B H1 : p A > p B
pˆ A p ˆB
Z N(0,1) if p A p B
ˆ (1 p
p ˆ )( n1A 1
nB )
XA XB X A XB
ˆA
where p ˆB
, p ˆ
, p
nA nB n A nB
7/14/2015 16
8
7/14/2015
7/14/2015 17
Step 7. Conclusion
7/14/2015 18
9
7/14/2015
Example 4
A vote is to be taken among residents of a town and the
surrounding county to determine whether a proposed chemical
plant should be constructed. If 120 of 200 town voters favour the
proposal and 240 of 500 county residents favour it, would you
agree that the proportion of town voters favouring the proposal is
higher than the proportion of county voters? Use 0.05
Solution
Step 1 Problem: Test about two proportions large samples
Step 2 H0 : p 1 = p 2 H1 : p 1 > p 2
Step 3 Determine the appropriate test statistic
pˆ1 p ˆ2
Z N(0,1) if p1 p 2
ˆ (1 p
p ˆ )( n11 1
n2 )
X1 X2 X X2
ˆ1
where p ˆ2
, p ˆ 1
, p
n1 n2 n1 n 2
7/14/2015 19
Z 2.9
7/14/2015 20
10
7/14/2015
Step 7. Conclusion
7/14/2015 21
H1 : 12 22 F0 f ,n1 1,n2 1
H1 : 12 22 F0 f ,n1 1,n2 1
7/14/2015 22
11
7/14/2015
Confidence interval:
A 100(1 )% two sided confidence interval for 12 22 is:
s12 12 s12
f
2 1 / 2, n2 1, n1 1
2 2 f / 2,n2 1,n1 1
s2 2 s2
7/14/2015 23
Example 5
A random sample of 12 air pollution index at UTP station produced a
variance 0.0340 while a random sample of another 13 air pollution index
at Tronoh station produced a variance 0.0525.
Step 2 H 0 : 12 22 vs H1 : 12 22
s12
F0 2
s2
7/14/2015 24
12
7/14/2015
s12 0.0340
F0 2 0.648
s 2 0.0525
Step 7 Conclusion
Since 0.32<F0 < 3.15, then we fail reject H0. It means that not
enough evidence to say that the variances of the two pollution
indexes are different.
7/14/2015 25
Confidence interval:
A 95% two sided confidence interval for 12 22 is:
s12 12 s12
f 1 / 2 , n2 1, n1 1 2 f / 2 , n2 1, n1 1
s 22 22 s2
s12 1 12 s12
2 f / 2 , n2 1, n1 1
s 22 f / 2 , n2 1, n1 1 22 s2
0.0340 1 12 0.0340
(3.15)
0.0525 3.15 2 2
0.0525
12
0.206 2.041
22
7/14/2015 26
13
7/14/2015
END
7/14/2015 27
14