9. Hypothesis and Test Procedures A statistical test of hypothesis

advertisement
9. Hypothesis and Test Procedures
A statistical test of hypothesis consist of :
1. The Null hypothesis, H 0 : A null hypothesis is a claim (or statement) about a population
parameter that is assumed to be true.
2. The Alternative hypothesis, H 1 : An alternative hypothesis is a claim about a population
parameter that will be true if the null hypothesis is false.
3. The test statistic: function of the sample data on which the decision (reject H 0 or do not
reject H 0 is to be based.
4. The rejection region and the conclusion.
******************************************************************************
9.1 Testing Hypothesis on the Population Mean,
Null Hypothesis :
Alternative hypothesis:

H 0 :   0
H 1 :   0
Rejection Region
Z < - z 2 or Z > z 2
H1 :   0
H1 :   0
Test Statistic
Z > z
Z < - z
:
Z
x

 any population,  is known and n is
either large or small
n
x
s
n
x
t
s
n
Z
 any population,
large
 is unknown and n is
 normal population,
n is small
 is unknown and
******************************************************************************
Note :p-value
-we do not reject the null hypothesis, H 0 if
The p-value is the smallest significance level
at which the null hypothesis is rejected.
p-value   for one-tailed test
Using the p-value approach,
-we reject the null hypothesis, H 0 if
p-value <  for one-tailed test
p-value <
p-value 

for two-tailed test
2

for two-tailed test
2
******************************************************************************
Example 9.1
The average monthly earnings for women in managerial and professional positions is RM 2400.
Do men in the same positions have average monthly earnings that are higher than those for
women? A random sample of n = 40 men in managerial and professional positions showed
x  RM 3600 and s = RM 400. Test the appropriate hypothesis using  = 0.01
Solution
1.The hypothesis to be tested are,
H 0 :  = 2400
Z
H 1 :  > 2400
2 We use normal distribution n>30
3. Rejection Region : Z > z
z  z 0.01  2.33
x   3600  2400
=
= 18.97
s
400
40
n
Since 18.97 > 2.33, falls in the rejection
region, we reject H 0 and conclude that
average monthly earnings for men in
managerial and professional positions are
significantly higher than those for women.
4. Test Statistic
******************************************************************************
Example 9.2
The daily yield for a local chemical plant has averaged 880 ton for the last several years. The
quality control manager would like to know whether this average has changed in recent months.
She randomly selects 50 days from the computer database and computes the average and
standard deviation of the n = 50 yields as x = 871 tons and s = 21 tons, respectively. Test the
appropriate hypothesis using   0.05 .
Solution
The hypothesis to be tested are,
H 0 :  = 880
H 1 :   880
The point estimate for
test statistic is
Z

is x . Therefore,
x   871  880
=
= -3.03
s
21
50
n
Rejection Region : Z < - z 2 or Z > z 2
z  z0.025  1.96
2
Since – 3.03 < - 1.96, falls in the rejection
region, the manager can reject H 0 and
conclude that it has changed
9.2 Testing Hypothesis on the Population Proportion, p
Null Hypothesis :
Alternative hypothesis:
H 0 : p  p0
H 1 : p  p0
Rejection Region
Z < - z 2 or Z > z 2
H 1 : p  p0
H 1 : p  p0
Test Statistic
:
Z
Z > z
Z < - z
pˆ  p0
p0 q0
n
Example 9.3
When working properly, a machine that is used to make chips for calculators does not produce
more than 4% defective chips. Whenever the machine produces more than 4% defective chips it
needs an adjustment. To check if the machine is working properly, the quality control department
at the company often takes sample of chips and inspects them to determine if the are good or
defective. One such random sample of 200 chips taken recently from the production line
contained 14 defective chips. Test at the 5% significance level whether or not the machine needs
an adjustment.
Solution
The hypothesis to be tested are ,
H 0 : p  0.04
H 1 : p > 0.04
The point estimate for p is p̂ . Therefore, test statistic is
Z
pˆ  p0
0.07  0.04
=
= 2.17
p0 q0
0.04(0.96)
200
n
Rejection Region : Z > z ; z  z 0.05  1.65
Since 2.17 > 1.65, falls in the rejection region, we can reject H 0 and conclude that the machine
needs an adjustment.
9.3 Hypothesis Test For the Difference between Two Populations Means, 1   2
H 0 : 1   2 = 0
H 1 : 1   2  0
Null Hypothesis :
Alternative hypothesis:
H 1 : 1   2  0
H 1 : 1   2  0
Test Statistic
x
Z
1

 x 2  1   2 
1
x
Z
t
:
2
n1
1

2

 x 2  1   2 
2
s1
s
 2
n1 n2
1
Z < - z 2 or Z > z 2
Z > z
Z < - z
For two large and independent samples and
 1 and  2 are known.
n2
2
x
2
Rejection Region

 x 2  1   2 
2
2
s1
s
 2
n1 n2
For two large and independent samples and
 1 and  2 are not known.
For two small and independent samples
taken from two normally distributed
populations.
Example 9.4:
A university conducted an investigation to determine whether car ownership affects academic
achievement was based on two random samples of 100 male students, each drawn from the
student body. The grade point average for the n1 = 100 non owners of cars had an average and
2
2
variance equal to x1  2.70 and s1  0.36 as opposed to x 2  2.54 and s2  0.40 for the n2
= 100 car owners. Do the data present sufficient evidence to indicate a difference in the mean
achievements between car owners and non owners of cars? Test using   0.05
=>The hypothesis to be tested are ,
H 0 : 1   2 = 0
H1 :
Rejection Region : Z < - z 2 or Z > z 2
; z 0.05 2 = z 0.025 =  1.96
1   2  0
Therefore, test statistic is
Z
x
1

 x 2  1   2 
2
2
=
s1
s
 2
n1 n2
2.70  2.54
= 1.84
Z
0.36 0.40

100 100
Since 1.84 does not exceed 1.96 and not less
than - 1.96, we fail to reject H 0 and that is,
there is not sufficient evidence to declare
that there is a difference in the average
academic achievement for the two groups.
9.4 Hypothesis Test For the Difference between Two Population Proportion, p1  p2
H 0 : p1  p2 = 0
H 1 : p1  p 2  0
Null Hypothesis :
Alternative hypothesis:
Rejection Region
Z < - z 2 or Z > z 2
H 1 : p1  p 2  0
H 1 : p1  p 2  0
Test Statistic
:
Z
 pˆ1  pˆ 2    p1  p2 
 pq
ˆ ˆ pq
ˆˆ



 n1 n2 
where
Z > z
Z < - z
pˆ 
x1  x2
n1  n2
Example 9.5:
Reconsider Example 4.8, At the significance level 1%, can we conclude that the proportion of
users of Toothpaste A who will never switch to another toothpaste is higher than the proportion
of users of Toothpaste B who will never switch to another toothpaste?
Solution
The hypothesis to be tested are ,
H 0 : p1  p2 = 0
H 1 : p1  p 2  0
( p1 is not greater than p2)
( p1 is greater than p2)
Therefore, test statistic is
Z
 pˆ
1
 pˆ 2    p1  p 2 
1 1
pˆ qˆ   
 n1 n2 
= Z
0.20  0.17  0
1 
 1
(0.187 )(0.813)


 500 400 
= 1.15
Rejection Region : Z > z ; z 0.01 = 2.33
Since 1.15 < 2.33, we fail to reject H 0 and therefore, we conclude that the proportions of users
of Toothpaste A who will never switch to another toothpaste is not greater than the proportion of
users of Toothpaste B who will never switch to another toothpaste.
Example 9.6:
The mean income per month for 30 workers chosen at random from the private sector is RM 650
with a standard deviation of RM 100 per month. The mean income per month for 40 workers
from the government sector is RM 500 with a standard deviation of RM 80 per month
a)
b)
Test the hypothesis that the mean income for all workers from government sector is less
than RM 520 per month at 5% significance level. Sketch the rejection/critical region.
At   0.05 , can we conclude that the mean income per month for private workers is
higher than the government workers? Sketch the rejection/critical region.
(a)   0.05
(b)   0.05
H o :  g  520
H o :  p  g  0
H1 :  g  520
H1 :  p   g  0
Z test 
X g   g 500  520

sg
80
40
ng
20

12.6491
 1.5811
From the table, Z  Z 0.05  1.6449
we reject H o if Z test   Z .
Since Z test  1.5811   Z 0.05  1.6449 so
we fail to reject H o . Hence, we accept H o
and conclude that there is no sufficient
evidence to prove that the mean income
for all workers from government sector
is less than RM 520 per month.
Z test 
X
p

 X g    p  g 
s
2
p
np


sg2
ng
 650  500   0
1002 802

30
40
50

 6.7534
22.2111
From the table, Z  Z 0.05  1.6449
we reject H o if Z test  Z .
Since Z test  6.7534  Z 0.05  1.6449
so we reject H o . Hence, we accept H1
and we conclude that the mean income
per month for private workers is
higher than the government workers.
1.6449
-1.6449
Z
Tutorial 7 (Hypothesis Testing)
1) A lecturer claim that the medical students put in more hours studying compared to other students. The
mean number of hours spent studying per week for other students is 23 hours with a standard deviation of 3
hours per week. A sample of 25 medical students was selected at random and the mean number of hours
spent studying per weeks was found to be 25 hours. Can the lecturer’s claim be accepted at 5% significance
level?
( H 0 :   23, H1 :   23; Z  3.333  Reject H 0 )
2) A sample consists of 36 glasses of orange juice was dispensed from a drink dispenser with mean volume
per glass of 21.9 ml and a standard deviation of 1.42 ml. The standard mean volume per glass of orange
juice dispensed by the drink dispenser is 22.2 ml. Test the hypothesis that the mean volume per glass is less
than the standard mean volume at   0.05 .
( H 0 :   22.2, H1 :   22.2; Z  1.27  Accept H 0 )
3) A manufacturer of a traditional medicine claimed that his medicine is 90% effective relieving backache for
a period of 8 hours. In a sample of 200 people who had backache, the medicine provided relief for 160
people. Determine whether the manufacturer’s claim is legitimate at 1% significance level.
( H 0 : p  0.9, H1 : p  0.9; Z  4.7140  Accept H 0 )
4) A pharmacy company claimed that not more than 1% that used its drug experience side effect. To prove its
claim, 2500 patients were subscripted with the drugs and only 74 experienced side effects. Can the claim by
the pharmacy company be accepted at the 5% level of significance?
( H 0 : p  0.01, H1 : p  0.01; Z  9.95  Accept H 0 )
5) The mean lifetime of 30 bulbs produced by Company A is 500 hours and the mean lifetime of 35 bulbs
produced by Company B is 492 hours. If the standard deviation of all bulbs produced by Company A is 10
hours and the standard deviation of all bulbs produced by Company B is 15 hours, test at 1% significance
level that the mean lifetime of bulbs produced by Company A is better than that of Company B.
( H 0 :  A  B  0, H1 :  A  B  0; Z  2.56  Reject H 0 )
6) Suppose that we want to investigate whether men’s average earning exceed women’s average earning more
than RM 20 per week in a certain workplace. A sample of 60 men earns an average of RM 294 per week
with a standard deviation of RM 16, while a sample of 60 women earn an average of RM 265 per week
with a standard deviation of RM 18. Test at 1% significance level.
( H 0 :  A  B  20, H1 :  A  B  20; Z  2.895  Reject H 0 )
7) A random sample of 200 screws manufactured by machine A and 100 screws manufactured by machine B
showed 19 and 5 defective screws respectively. Test the hypothesis that
a) Machine B is performing better than machine A at 5% significance level.
b) The two machines are showing different qualities of performance at 5% significance level.
( H 0 : pB  pA  0, H1 : pB  pA  0; Z  1.3543  Accept H 0 )
( H 0 : pB  pA  0, H1 : pB  pA  0; Z  1.3543  Accept H 0 )
8) Two groups, from urban and from rural area each consists of 100 people who have a disease were taken as
samples. A serum is given to the group from urban area but not to the group from rural area (which is
called the control group); otherwise, the two groups are treated identically. It was found that in the group
from urban area and the group from rural area, 75 and 65 people respectively recover from the disease. Test
the hypothesis that the serum helps to cure the disease using 5% significance level.
( H 0 : pu  pr  0, H1 : pu  pr  0; Z  1.552  Accept H 0 )
Download