Вы находитесь на странице: 1из 17

7/8/2015

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

Determine the CI for hypothesis test with

variance Unknown.
Perform hypothesis test about a proportion
Perform hypothesis test for variance

July 15

7/8/2015

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

[ 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.

Parameter of interest: To test about the mean, variance unknown.

2.

Hypothesis :

3.

Determine the Test statistics:

4.

Critical value:

H0 : m 4

vs H1 : m 4
T

X m0
s/ n

Critical value: = 0.05


t /2, n-1= t 0.025, 39 = 2.021

July 15

July 15

7/8/2015

Solution: (a) cont.


5.

Rejection region:

T 2 .021 or T 2 .021

6.

Compute test statistic

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

Solution: (b) Use the P-value approach

The compute test statistic is t0 =2.34 (step 6)

July 15

7/8/2015

The compute test statistic is t0 =2.34 (step 6)


From a t-distribution table, for a t distribution with 39 df,
that t0 =2.34 is falls between two values: 2.423 for which
a=0.01 and 2.021 for which a=0.025.
So the P-value is : 2(0.01 < P < 0.025)= 0.02 < P < 0.05
Since P<0.05, thus we reject H0 and conclude that the
mean flow discharge is significantly different from 4m3/s.
Same result as in (a).

July 15

Solution: (c) Construct a 95% two-sided CI on mean flow


discharge. What is the conclusion?
A 95% two-sided CI flow discharge is

July 15

10

7/8/2015

Solution: (c) Cont.


A 95% two-sided CI flow discharge is
x 3.185, s 0.5, n 40, ta / 2,n 1 t0.025,39 2.021
s
s
x ta / 2,n 1
m x ta / 2,n 1

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.

Parameter of interest: To test about the mean, variance unknown.


Hypothesis : H 0 : m 17.0 vs H1 : m 17.0

3.

Test statistics:

4.

Critical value:

= 0.01

5.

Reject region:

T 4.032 or T 4.032

6.

Compute the test statistic:

1.

7.

Conclusion:

X m0
s/ n

t /2, n-1= t 0.005, 5 = 4.032

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

Thus the 95% CI is 16.645 m 17.3146


Since m 17 is falls inside of the CI, so we fail to reject the null
hypothesis and conclude the true mean is 17.
Same results as in (a) and (b).
15

July 15

3.TEST ABOUT A PROPORTION p


Three Test Problems about a proportion p:
1. H0: p = p0 (or p p 0 ) against
H1: p p0
2. H0: p = p0 (or p p 0 ) against
H1: p p0
3. H0: p = p0
against
H1: p p 0
Key: Test
Statistic:

p p 0
p 0 (1 p 0 ) / n

, p

X
n

Z N(0,1)
when p = p0

Critical Region: (The region for Rejecting H0)


1. Z z a
2. Z z a
3.
16

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.

H0 : p = 0.2, against H1 : p < 0.2

3. Determine the test statistic used:


Z
17

p p 0
p 0 (1 p 0 ) / n

N(0,1) , if p p 0 , where p

X
n
July 15

4. Critical Value: alfa 0.1, - z = - 1.28


5. Critical region: Reject Ho IF Z < - z = - 1.28
6. Compute the value of the test statistic:
X =15 , n = 100, = 0.1, z = z 0.1 = 1.28
Z

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

7. Conclusion, since Z = -1.25 > - z 0.1 = - 1.28 , we fail to reject H0


the estimates seem to be valid.
18

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

Therefore the Approximate (1 - a) CI for p is:


p ( za / 2 )(

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

Given Sample Data: n = 250, X = 12


1 - = 0.90, = 0.10, / 2 = 0.05, z0.05 = 1.645
Calculations:
p X / n 12 / 250 0.048
( za / 2 )(
p

(1 p
)
p
( za / 2 )(
) p p
n

(1 p
)
p
)
n

z0.05 p (1 p ) / n (1.645)( (0.048)(0.952) / 250 0.0222

0.048 0.0222 p 0.048 0.0222


0.0258 p 0.0702
Answer: The 90% CI for the proportion p of defective items
produced by the manufacturer is [0.0258; 0.0702]
21

July 15

4.TEST ABOUT variance s 2


Parameter of interest is about variance
Null Hypothesis:
Test statistic:

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

Therefore the Approximate 100(1 - a)% two sided CI for


is:

(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

Test about variance

2. Hypothesis

H0: s2 = 0.09

vs

3. Determine the appropriate test statistic

4. Critical value given a 0.05


5. Critical region

H1: s2 >0.09
( n 1) S 2

s 02

20.05 , 50 67.5

Re j ect H 0 if 2 67.5

6. Compute the test statistic

n 51, s 2 0.09, s 2 0.1369

(n 1) S 2 (50)( 0.1369)

76.056
2
0.09

7. Conclusion

Since

26

2 76.056 02.05,50 67.5

Conclusion: to reject H0 , and conclude that the engineers


claim is true at the 0.05 level of significance.

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):

1. The parameter of interest

Test about the variance of a Distribution

2. Hypothesis

H0: s2 = 1.5

vs

H1: s2 < 1.5

3. Determine the appropriate test statistic

30

(n 1) S 2
2

July 15

15

7/8/2015

4. Critical value given a 0.05

5. Critical region

20.95 , 19 10.12

Re ject H 0 if 2 10.12

6. Compute the test statistic value

n 20, s 2 1.55, s 2 1.988

(n 1) S 2 (19)(1.988)

21.8
2
1.55

7. Make a decision

2 21.8 02.95,19 10.12


Decision: since
Conclusion: failed to reject H0 , data are not sufficient to support s 2 < (1.5)
the claim
31

July 15

Solution (ii) P-value:


From a 2 - distribution table,
2 for a0.5 and 19 degree of freedom, that 2 = 18.34 and
2 for a0.1 and 19 degree of freedom, that 2 = 27.20.
Since 2 = 21.8 is falls in between these two values for a=0.5 and
a=0.1, so the P-value 0.1<P< 0.5
Since P > 0.05, thus we fail to reject H0 and conclude that the
variance is 0.15. Same result as in (a).

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

Вам также может понравиться