Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 6 (Week 9)
Hypothesis Testing for Single Population
Dr.S.Rajalingam
L6 - Determine the Confidence Interval for hypothesis
test with Variance Unknown (t-test)
L7 - (3) Hypothesis Test about a Proportion &
(4) Hypothesis Test for variance
1
July 15
Learning Outcomes:
At the end of the lesson student should be able to
variance Unknown.
Perform hypothesis test about a proportion
Perform hypothesis test for variance
July 15
7/8/2015
[ x ( t a / 2 , n 1 )(
s
s
), x ( t a / 2,n 1 )(
)]
n
n
Or equivalently
x ( t a / 2,n 1 )(
s
s
) m x ( t a / 2,n 1 )(
)
n
n
July 15
Example 1
The flow discharge of Perak River (measured in m3/s) was obtained at
random. 40 readings were collected and the mean flow discharge was
found to be 3.815m3/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;
(b) Use the P-value approach to test the hypothesis null.
(c) Construct a 95% two-sided CI on mean flow discharge. What is
conclusion?
July 15
7/8/2015
Solution: (a)
1.
2.
Hypothesis :
3.
4.
Critical value:
H0 : m 4
vs H1 : m 4
T
X m0
s/ n
July 15
July 15
7/8/2015
Rejection region:
T 2 .021 or T 2 .021
6.
3.185 4
2.34
0.5 / 40
7.
Conclusion:
Since -2.34 < -2.021, so we reject the null hypothesis and conclude
the true mean flow discharge is significantly different from 4m 3/s
at = 0.05.
7
July 15
July 15
7/8/2015
July 15
July 15
10
7/8/2015
n
n
0.5
0.5
3.185 (2.021)
m 3.185 (2.021)
40
40
so the 95% two sided CI is 3.025 m 3.345
Conclusion - Since m 4 is falls outside of the CI, so we
reject the null hypothesis and conclude the true mean flow
discharge is significantly different from 4m3/s at = 0.05.
Same results as in (a) and (b).
11
July 15
Example 2:
A practical brand of diet margarine was analyzed to
determine the level of polyunsaturated fatty acid (in
percent). A sample of six packages resulted in the
following data: 16.8, 17.2, 17.4, 16.9, 16.5 and 17.1.
i. Test the hypothesis that the mean is not equal to
17.0 at a = 0.01.
ii. Find the P-value of this test. What is your
comment?
iii. Construct 95% two-sided CI on the mean and
what is your conclusion?
12
July 15
7/8/2015
Solution: (i)
2.
3.
Test statistics:
4.
Critical value:
= 0.01
5.
Reject region:
T 4.032 or T 4.032
6.
1.
7.
Conclusion:
X m0
s/ n
x 16.98, s 0.3188
t0
16.98 17
0.1537
0.3188 / 6
Since - 0.1537 > - 4.032, so we fail to reject the null hypothesis and
conclude the true mean is 17.0 at = 0.01.
July 15
13
Solution: (ii)
From a t-distribution table, for a t distribution
with 5 df, that t0 = 0.1537 is falls at less then
0.267 for which a= 0.4
so the P-value > 2(0.4) = 0.8
Since P-value = 0.8 > 0.01, thus we fail reject
H0 and conclude that the mean is 17. Same
result as in (a).
July 15
14
7/8/2015
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
July 15
p p 0
p 0 (1 p 0 ) / n
, p
X
n
Z N(0,1)
when p = p0
Z z /2 or Z z /2 , | Z | z /2
July 15
7/8/2015
Example 3:
Regardless of age, about 20% of Malaysian adults participate in
fitness activities at least twice a week. In a local survey of 100 (nsurvey sample size) adults over 40 years old, a total of 15 people
(X from n) indicated that they participated in a fitness activity at
least twice a week. Do these data indicate that the participation rate
for adults over 40 years of age is significantly less than 20%?
Carry out a test at 10% significance level and draw appropriate
conclusion.
Solution:
1. Problem. Test about a proportion p
2. Hypothesis.
p p 0
p 0 (1 p 0 ) / n
N(0,1) , if p p 0 , where p
X
n
July 15
p 15 / 100 0.15
p p0
X
N (0,1) , if p p0 , where p
n
p0 (1 p0 ) / n
Z
p p0
0.15 0.2
1.25
p 0 (1 p0 ) / n
(0.2)(0.8) / 100
July 15
7/8/2015
CI FOR PROPORTION p
Key: X: number of Success-items in an n- sample
p p
X
N(0,1) , where p
n
p (1 p ) / n
Condition:
np 5, n (1 p ) 5
p (1 p )
) p p ( za / 2 )(
n
p (1 p )
)
n
19
July 15
Example 4:
Find the 90% CI for the proportion p of defective items produced
by a manufacturer if in a random sample of 250 items there are 12
defectives.
Solution:
Problem: CI for the proportion p of defective items.
Large sample.
Apply
p ( za / 2 )(
20
p (1 p )
) p p ( za / 2 )(
n
p (1 p )
)
n
July 15
10
7/8/2015
(1 p
)
p
( za / 2 )(
) p p
n
(1 p
)
p
)
n
July 15
H 0 :s 2 s 02
2
(n 1) S 2
2
0
Alternative Hypothesis
H1 :s 2 s 02
22
( or
H 0 : s 2 s 02 , H 0 : s 2 s 02
~ 2 (n 1) if s 2 s 02
Rejection Criteria ( Reject H0)
2 12a / 2, n 1 or 2 a2 / 2, n 1
H1 :s 2 s 02
2 a2 , n 1
H1 :s 2 s 02
2 12a , n 1
July 15
11
7/8/2015
CI FOR VARIANCE
s2
(n 1) s 2
a / 2,n 1
2
23
s
2
s2
(n 1) s 2
12a / 2,n 1
July 15
Example 5
An Aerospace Engineers claim that the standard deviation of the
percentage in an alloy used in aerospace casting is greater than
0.3. 51 parts were randomly selected and the sample standard
deviation of the percentage in an alloy used in aerospace casting
is s =0.37.
(i) At = 0.05, do these data support the claim of the engineers?
(ii) What is the P-value for this test?
(iii) Construct a 95% two-sided CI for s. What is conclusion?
24
July 15
12
7/8/2015
Solution:
1. Parameter of interest
2. Hypothesis
H0: s2 = 0.09
vs
H1: s2 >0.09
( n 1) S 2
s 02
20.05 , 50 67.5
Re j ect H 0 if 2 67.5
(n 1) S 2 (50)( 0.1369)
76.056
2
0.09
7. Conclusion
Since
26
July 15
13
7/8/2015
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
Since P < 0.05, thus we reject H0 and conclude that the
variance is less than 0.09. Same result as in (a).
CI FOR VARIANCE
Therefore the Approximate 95% two sided CI for
(n 1) s 2
a2 / 2,n 1
s
2
s2
s2
is:
(n 1) s 2
12a / 2,n 1
50(0.1369)
50(0.1369)
s2
71.42
32.36
0.0958 s 2 0.2115
28
July 15
14
7/8/2015
Example 6:
Engineers designing the front-wheel-drive half shaft of a new
model automobile claim that the variance in the displacement of
the constant velocity joints of the shaft is less than 1.5 mm. 20
simulations were conducted and the following results were
obtained, x 3.39 and s = 1.41.
i) At = 0.05, do these data support the claim of the engineers?
(ii) What is the P-value for this test?
(iii) Construct a 95% two-sided CI for s. What is conclusion?
July 15
Solution (i):
2. Hypothesis
H0: s2 = 1.5
vs
30
(n 1) S 2
2
July 15
15
7/8/2015
5. Critical region
20.95 , 19 10.12
Re ject H 0 if 2 10.12
(n 1) S 2 (19)(1.988)
21.8
2
1.55
7. Make a decision
July 15
July 15
32
16
7/8/2015
CI FOR VARIANCE
Therefore the Approximate 95% two sided CI for
(n 1) s 2
a2 / 2,n 1
s
2
s2
s2
is:
(n 1) s 2
12a / 2,n 1
19(0.15)
19(0.15)
s 2
32.85
8.91
0.0868 s 2 0.3199
33
July 15
END
17