Chapter 6 - L5 L6
Chapter 6 - L5 L6
Chapter 6 - L5 L6
Hypothesis Testing –
Single Population
Week 9
L5 - Confidence Interval for Mean,
Variance Unknown
L6 - Hypothesis Test about a Proportion
and Hypothesis Test for variance
December 17 1
Learning Outcomes:
At the end of the lesson student should be able
to
December 17 2
CI FOR NORMAL MEAN
WHEN VARIANCE IS UNKNOWN
A 100 (1- a )% confidence level for the mean m of a normal
Population when the value of s is not known is given by
s s
[ x ( t a / 2 , n 1 )( ), x ( t a / 2,n 1 )( )]
n n
Or equivalently
s s
x ( t a / 2,n 1 )( ) m x ( t a / 2,n 1 )( )
n n
December 17 3
Example 1
The flow discharge of Perak River (measured in m3/s) was obtained at
random. 20 readings were collected and the mean flow discharge was
found to be 3.85m3/s with a standard deviation of 0.5m3/s.
(a) Test the hypothesis that mean flow discharge at Perak River is not
equal to 4m3/s . Use a=0.05;
December 17 4
Solution: (a)
1. Problem: To test about the mean, variance unknown.
2. Hypothesis : H 0 : m 4 vs H1 : m 4
X m0
3. Test statistics: T
s/ n
4. Critical value: Critical value: α = 0.05
t a/2, n-1= t 0.025, 19 = 2.093
5. Rejection region: Reject Ho IF
T 2 .0 9 3 o r T 2 .0 9 3
6. Calculation: 3.85 4
T 1.34
0.5 / 20
7. Conclusion:
Since -1.34 > -2.093, so we fail to reject the null hypothesis and
conclude the true mean flow discharge is not significantly different
from 4m3/s at α = 0.05.
December 17 5
Solution: (b)
From a t-distribution table, for a t – distribution with
19 degree of freedom, that T=1.34 is falls between
two values: 1.328 for which a=0.1 and 1.729 for
which a=0.05. So the P-value is :
December 17 6
Solution: (c)
A 95% two-sided CI flow discharge is
December 17 8
Solution: (i)
1. Problem: To test about the mean, variance unknown.
2. Hypothesis : H 0 : m 17.0 vs H1 : m 17.0
X m0
3. Test statistics: T
s/ n
4. Critical value: Critical value: α = 0.01
t a, n-1= t 0.01, 5 = 3.365
5. Reject region: Reject Ho IF
T 3 .3 6 5
6. Calculation: x 16.98, s 0.3188
16.98 17
T 0.1537
7. Conclusion: 0.3188 / 6
Since - 0.1537 > - 3.365, so we fail to reject the null hypothesis and
conclude the true mean is 17.0 at α = 0.01.
December 17 9
Solution: (ii)
From a t-distribution table, for a t – distribution with 5
degree of freedom, that T = 0.1537 is falls at less
then 0.267 for which a= 0.4, so the P-value > 0.4
December 17 10
Solution: (c)
A 95% two-sided CI flow discharge is
s s
x t0.025,5 m x t0.025,5
n n
0.3188 0.3188
16.98 2.571 m 16.98 2.571
6 6
Thus the 95% CI is 16.645 m 17.3146
(a) Test the hypothesis that mean flow discharge at Perak River is not
equal to 4m3/s . Use a=0.05;
December 17 12
Solution: (a)
1. Problem: To test about the mean, variance unknown (Large Sample ).
2. Hypothesis : H 0 : m 4 vs H1 : m 4
X m0
3. Test statistics: Z
s/ n
4. Critical value: Critical value: α = 0.05
z a/2= Z 0.025= 1.96
5. Rejection region: Reject Ho IF
Z 1 . 96 or Z 1 . 96
6. Calculation: 3.85 4
Z 3.0
0.5 / 100
7. Conclusion:
Since -3.0 < -1.96, so we reject the null hypothesis and conclude the
true mean flow discharge is significantly different from 4m3/s at
α = 0.05.
December 17 13
Solution: (b)
P-value is :
December 17 14
Solution: (c)
A 95% two-sided CI flow discharge is
H 0 : P 0.2 vs H1 : P 0.2
Test statistic used:
p̂ p 0 X
Z N(0,1) , if p p 0 , where p̂
p 0 (1 p 0 ) / n n
December 17 17
Critical region: Reject Ho IF Z > za
pˆ p0 X
Z N (0,1) , if p p0 , where pˆ
p0 (1 p0 ) / n n
pˆ p0 0.30 0.2
Z 2.5
p0 (1 p0 ) / n (0.2)(0.8) / 100
December 17 19
Example 5:
Find the 90% two-sided CI for the proportion of age, about 20% of
Malaysian adults participate in fitness activities at least twice a week
if a total of 30 out of 100 people indicated that they participated in a
fitness activity.
Solution:
Problem: Two-side CI for the proportion of age, about 20% of
Malaysian adults participate in fitness activities at least twice a
week.
pˆ (1 pˆ ) pˆ (1 pˆ )
pˆ ( za / 2 )( ) p pˆ ( za / 2 )( )
n n
December 17 20
Given Sample Data: n = 100, X = 30, a / 2 = 0.05, z0.05 = 1.65
Calculations:
pˆ X / n 30 / 100 0.3
s
Test Problems about variance, :
2
Null Hypothesis: H 0 :s 2 s 02 ( or H 0 : s 2 s 02 , H 0 : s 2 s 02 )
Test statistic:
(n 1) S 2
2 ~ 2 (n 1) if s 2 s 02
s 02
Alternative Hypothesis Rejection Criteria ( Reject H0)
H1 :s s
2 2 2 12 a / 2 , n 1 o r 2
a2 / 2 , n 1
0
H1 :s 2 s 02 2 2
a , n 1
H1 :s 2 s 02 2 12 a , n 1
December 17 22
CI FOR VARIANCE s 2
(n 1) s 2
( n 1) s 2
s
2
a / 2,n 1
2
2
1a / 2 , n 1
December 17 23
Example 6
(n 1) S 2
χ 2
σ
0 2
0
December 17 25
4. Critical value given a 0.05 χ 2
0 .0 5 , 5 0
6 7 .5 0
5. Critical region Re ject H if 67.50 0
2
0
n 5 1, s 2
0 .0 9 , s 2 0 .1 3 6 9
(n 1) S 2
( 50 )( 0 . 1369 )
χ
2
76 . 056
σ 2
0 . 09
7. Make a decision
Since 76.056
0
2 2
0.95 , 50
67.50
Conclusion: We reject H0 , and conclude that the engineers
claim is true at the 0.05 level of significance. 26
Solution: (ii)
From a 2 - distribution table, 2 for a0.025 and 50
degree of freedom, that 2 = 71.42 and 2 for a0.01
and 50 degree of freedom, that 2 = 76.15. Since 2
= 76.056 is falls in between these two values for
a=0.025 and a=0.01, so the P-value 0.01<P< 0.025
December 17 27
CI FOR VARIANCE s 2
(n 1) s 2
(n 1) s 2
s
2
a / 2,n 1
2
2
1a / 2 , n 1
50(0.1369) 50(0.1369)
s
2
71.42 32.36
0.0958 s 0.2115
2
σ2
December 17 29
4. Critical value given a 0.05 χ 20 .9 5 , 1 9 1 0 . 1 2
5. Critical region Re ject H 0 if 2 10.12
n 20, s 2
1 .5 5 , s 2 1 .9 8 8
(n 1) S 2
(19 )(1 . 988 )
χ
2
21 . 8
σ 2
1 . 55
7. Make a decision
December 17 31
CI FOR VARIANCE s 2
(n 1) s 2 (n 1) s 2
s
2
a / 2,n 1
2
2
1a / 2 , n 1
2 2
50(0.37) 50(0.37)
s 2
71.42 32.35
0.096 s 2 0.212
Since the variance 0.15 is falls inside of the CI, thus we
fail to reject H0 and conclude that the variance is 0.15.
32
Same
December 17 result as in (a) and (b).