Pertemuan 17 Pengujian Hipotesis – Metoda Statistika Matakuliah

advertisement
Matakuliah
Tahun
Versi
: I0134 – Metoda Statistika
: 2005
: Revisi
Pertemuan 17
Pengujian Hipotesis
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa dapat menghasilkansimpulan
dari uji hipotesis rataan, proporsi dan
varians.
2
Outline Materi
• Uji hipotesis nilai tengah (rataan)
• Uji hipotesis proporsi
• Uji hipotesis varians
3
Hypothesis Testing
• Developing Null and Alternative Hypotheses
• Type I and Type II Errors
• One-Tailed Tests About a Population Mean:
Large-Sample Case
• Two-Tailed Tests About a Population Mean:
Large-Sample Case
• Tests About a Population Mean:
Small-Sample Case
continued
4
Hypothesis Testing
•
•
•
•
Tests About a Population Proportion
Hypothesis Testing and Decision Making
Calculating the Probability of Type II Errors
Determining the Sample Size for a
Hypothesis Test
about a Population Mean
5
Developing Null and Alternative
Hypotheses
• Hypothesis testing can be used to determine
whether a statement about the value of a
population parameter should or should not be
rejected.
• The null hypothesis, denoted by H0 , is a
tentative assumption about a population
parameter.
• The alternative hypothesis, denoted by Ha, is the
opposite of what is stated in the null hypothesis.
• Hypothesis testing is similar to a criminal trial.
The hypotheses are:
H0: The defendant is innocent
6
Ha: The defendant is guilty
Developing Null and
Alternative Hypotheses
• Testing Research Hypotheses
– The research hypothesis should be
expressed as the alternative hypothesis.
– The conclusion that the research
hypothesis is true comes from sample data
that contradict the null hypothesis.
7
A Summary of Forms for Null and
Alternative Hypotheses about a
Population Mean
• The equality part of the hypotheses always appears in
the null hypothesis.
• In general, a hypothesis test about the value of a
population mean  must take one of the following three
forms (where 0 is the hypothesized value of the
population mean).
H0:  > 0
Ha:  < 0
H0:  < 0
Ha:  > 0
H0:  = 0
Ha:   0
8
Type I and Type II Errors
• Since hypothesis tests are based on sample data,
we must allow for the possibility of errors.
• A Type I error is rejecting H0 when it is true.
• A Type II error is accepting H0 when it is false.
• The person conducting the hypothesis test
specifies the maximum allowable probability of
making a
Type I error, denoted by  and called the level of
significance.
• Generally, we cannot control for the probability of
making a Type II error, denoted by .
• Statistician avoids the risk of making a Type II
error by using “do not reject H0” and not “accept
H0”.
9
Contoh Soal: Metro EMS
• Type I and Type II Errors
Conclusion
Accept H0
(Conclude  
Reject H0
(Conclude 
Population Condition
H0 True
Ha True
(  )
( )
Correct
Conclusion
Type II
Error
Type I
Correct
rror
Conclusion
10
The Use of p-Values



The p-value is the probability of obtaining a
sample result that is at least as unlikely as
what is observed.
The p-value can be used to make the decision
in a hypothesis test by noting that:
• if the p-value is less than the level of
significance , the value of the test statistic
is in the rejection region.
• if the p-value is greater than or equal to ,
the value of the test statistic is not in the
rejection region.
Reject H0 if the p-value < .
11
The Steps of Hypothesis Testing






Determine the appropriate hypotheses.
Select the test statistic for deciding whether or
not to reject the null hypothesis.
Specify the level of significance  for the test.
Use to develop the rule for rejecting H0.
Collect the sample data and compute the
value of the test statistic.
a) Compare the test statistic to the critical
value(s) in the rejection rule, or
b) Compute the p-value based on the test
statistic and compare it to to determine
whether or not to reject H0.
12
One-Tailed Tests about a Population
Mean: Large-Sample Case (n > 30)

Hypotheses
H0:   
Ha: 

Test Statistic
 Known
z

x  0
/ n
or
H0:   
Ha: 
 Unknown
z
x  0
s/ n
Rejection Rule
Reject H0 if z > zReject H0 if z < -z
13
Contoh Soal: Metro EMS
• One-Tailed Test about a Population Mean: Large n
Let  = P(Type I Error) = .05
Sampling distribution
of x (assuming H0 is
true and  = 12)
Reject H0
Do Not Reject H0

1.645 x
12
x
c
(Critical value)
14
Contoh Soal: Metro EMS
• One-Tailed Test about a Population Mean: Large n
Let n = 40, x = 13.25 minutes, s = 3.2 minutes
(The sample standard deviation s can be used to
estimate the population standard deviation .)
x   13. 25  12
z

 2. 47
 / n 3. 2 / 40
Since 2.47 > 1.645, we reject H0.
Conclusion: We are 95% confident that Metro EMS
is not meeting the response goal of 12 minutes;
appropriate action should be taken to improve
service.
15
Contoh Soal: Metro EMS
• Using the p-value to Test the Hypothesis
Recall that z = 2.47 for = 13.25. Then p-value = .0068.
Since p-value < , that is .0068 < .05, we reject H0.
x
Reject H0
Do Not Reject H0
0
p-value
1.645 2.47
z
16
Two-Tailed Tests about a Population
Mean:
Large-Sample Case (n > 30)
• Hypotheses
H0:   
Ha:   
• Test Statistic
 Known  Unknown
x  0
x  0
z
z
/ n
s/ n
• Rejection Rule
Reject H0 if |z| > z
17
Summary of Test Statistics to be Used in a
Hypothesis Test about a Population Mean
Yes
s known ?
Yes
n > 30 ?
No
Yes
Use s to
estimate s
s known ?
Yes
z
x 
/ n
No
x 
z
s/ n
x 
z
/ n
No
Popul.
approx.
normal
?
No
Use s to
estimate s
x 
t
s/ n
Increase n
to > 30
18
A Summary of Forms for Null and Alternative
Hypotheses about a Population Proportion
• The equality part of the hypotheses always appears in
the null hypothesis.
• In general, a hypothesis test about the value of a
population proportion p must take one of the following
three forms (where p0 is the hypothesized value of the
population proportion).
H0: p > p0
Ha: p < p0
H0: p < p0
Ha: p > p0
H0: p = p0
Ha: p  p0
19
Contoh Soal: NSC
• Two-Tailed Test about a Population
Proportion: Large n
– Hypothesis
H0: p = .5
Ha: p .5

– Test Statistic
p 
p0 (1  p0 )
.5(1  .5)

 .045644
n
120
p  p0 (67 /120)  .5
z

 1.278
p
.045644
20
Hypothesis Testing
About a Population Variance

Right-Tailed Test
• Hypotheses
H 0 :  2   20
H a :  2   20
• Test Statistic
2 
( n  1) s 2
 20
• Rejection Rule
2
2
2
Reject H0 if    (1  ) (where  (1 ) is based on
a chi-square distribution with n - 1 d.f.) or
Reject H0 if p-value < 
21
Hypothesis Testing
About a Population Variance

Two-Tailed Test
• Hypotheses
H 0 :  2   20
H a :  2   20
• Test Statistic
2 
( n  1) s 2
 20
• Rejection Rule
Reject H0 if  2   2(1  / 2 ) or  2   2 / 2 (where
(12  /2) and 2 /2 are based on a chi-square distribution with n - 1 d.f.) or Reject H0 if p-value < 
22
• Selamat Belajar Semoga Sukses.
23
Download