Matakuliah Tahun : I0272 - STATISTIK PROBABILITAS : 2009 PENGUJIAN HIPOTESIS 1 Pertemuan 9 Materi • Uji hipotesis nilai tengah • Uji hipotesis beda dua nilai tengah Bina Nusantara University 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 Bina Nusantara University 4 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 Ha: The defendant is guilty Bina Nusantara University 55 • 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. Bina Nusantara University 66 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 Bina Nusantara University H0: < 0 Ha: > 0 H0: = 0 Ha: ≠ 0 77 Type I and Type II Errors Contoh Soal: Metro EMS Conclusion Bina Nusantara University Population Condition H0 True Ha True ( ) ( ) Accept H0 (Conclude Correct Conclusion Reject H0 (Conclude Type I rror Type II Error Correct Conclusion 88 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. Bina Nusantara University 99 One-Tailed Tests about a Population Mean: LargeSample Case (n > 30) Hypotheses H0: Ha: Known x 0 z / n Test Statistic or H0: Ha: Unknown x 0 z s/ n Rejection Rule Bina Nusantara University Reject H0 if z > zReject H0 if z < -z 10 Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) • Hypotheses • Test Statistic H0: Ha: Known x 0 z / n Unknown z x 0 s/ n • Rejection Rule Reject H0 if |z| > z Bina Nusantara University 11 Example: One Tail Test Q. Does an average box of cereal contain more than 368 grams of cereal? A random sample of 25 boxes showed X = 372.5. The company has specified s to be 15 grams. Test at the a = 0.05 level. 368 gm. H0: 368 H1: > 368 Bina Nusantara University 12 12 Finding Critical Value: One Tail What is Z given = 0.05? Z 1 Z .95 = .05 0 1.645 Critical Value = 1.645 Bina Nusantara University Standardized Cumulative Normal Distribution Table (Portion) Z .04 .05 .06 1.6 .9495 .9505 .9515 1.7 .9591 .9599 .9608 1.8 .9671 .9678 .9686 1.9 .9738 .9744 .9750 13 Example Solution: One Tail Test H0: 368 H1: > 368 Test Statistic: Z = 0.5 n = 25 Critical Value: 1.645 Decision: 1.645 1.50 Conclusion: Do Not Reject at = .05 .05 Bina Nusantara University 1.50 n Reject 0 X Z No evidence that true mean is more than 368 14 14 p -Value Solution p-Value is P(Z 1.50) = 0.0668 Use the alternative hypothesis to find the direction of the rejection region. Bina Nusantara University P-Value =.0668 1.0000 - .9332 .0668 0 From Z Table: Lookup 1.50 to Obtain .9332 1.50 Z Z Value of Sample Statistic 15 15 (continued) p -Value Solution (p-Value = 0.0668) ( = 0.05) Do Not Reject. p Value = 0.0668 Reject = 0.05 0 1.50 Bina Nusantara University 1.645 Test Statistic 1.50 is in the Do Not Reject Region Z 16 16 Example: Two-Tail Test Q. Does an average box of cereal contain 368 grams of cereal? A random sample of 25 boxes showed X = 372.5. The company has specified to be 15 grams. Test at the 0.05 level. 368 gm. H0: 368 H1: 368 Bina Nusantara University 17 17 Example Solution: Two-Tail Test H0: 368 H1: 368 Test Statistic: X 372.5 368 Z 1.50 15 n 25 = 0.05 n = 25 Critical Value: ±1.96 Reject .025 -1.96 Bina Nusantara University .025 0 1.96 1.50 Z Decision: Do Not Reject at = .05 Conclusion: No Evidence that True Mean is Not 368 18 18 p-Value Solution (p Value = 0.1336) ( = 0.05) Do Not Reject. p Value = 2 x 0.0668 Test Statistic 1.50 is in the Do Not Reject Region Bina Nusantara University Reject Reject = 0.05 0 1.50 1.96 Z 19 19 Tests about a Population Mean: Small-Sample Case (n < 30) x 0 x Unknown 0 t t s/ n / n • Test Statistic Known • This test statistic has a t distribution with n - 1 degrees of freedom. Rejection Rule One-Tailed Two-Tailed Ha: Ha: Ha: Reject H0 if t > t Reject H0 if t < -t Reject H0 if |t| > t Bina Nusantara University 2020 Example: One-Tail t Test Does an average box of cereal contain more than 368 grams of cereal? A random sample of 36 boxes showed X = 372.5, and s 15. Test at the 0.01 level. is not given Bina Nusantara University 368 gm. H0: 368 H1: 368 21 21 Example Solution: One-Tail H0: 368 H1: 368 Test Statistic: t = 0.01 n = 36, df = 35 Critical Value: 2.4377 X 372.5 368 1.80 S 15 n 36 Decision: Reject .01 0 2.437 Bina Nusantara University 7 1.80 Do Not Reject at = .01 Conclusion: No evidence that true mean is more than 368 t35 22 p -Value Solution (p Value is between .025 and .05) ( = 0.01). Do Not Reject. p Value = [.025, .05] Reject = 0.01 0 Bina Nusantara University 1.80 2.4377 t35 Test Statistic 1.80 is in the Do Not Reject Region 23 23 Hypothesis Tests About the Difference Between the Means of Two Populations: Independent Samples • • Hypotheses H0: 1 - 2 < 0 Ha: 1 - 2 > 0 H0: 1 - 2 > 0 Ha: 1 - 2 < 0 H0: 1 - 2 = 0 Ha: 1 - 2 0 Test Statistic Large-Sample z Small-Sample ( x1 x2 ) ( 1 2 ) 12 n1 22 n2 where, Bina Nusantara University t ( x1 x2 ) ( 1 2 ) s2 (1 n1 1 n2 ) 2 2 ( n 1) s ( n 1) s 1 2 2 s2 1 n1 n2 2 24 Critical Value untuk statistik uji z: Ha wilayah kritik (tolak H ) • 1 - 2 > d0 z > z • 1 - 2 < d0 z < -z • 1 - 2 d0 z z atau z z 0 2 Bina Nusantara University 2 2525 Critical Value untuk statistik uji t: Ha wilayah kritik • 1 - 2 > d0 t > t • 1 - 2 < d0 t < -t • 1 - 2 d0 t t atau t t 2 2 v = n1 – n2 - 2 derajat bebas Bina Nusantara University 2626 Contoh Soal: Specific Motors • Hypothesis Tests About the Difference Between the Means of Two Populations: Small-Sample Case – Rejection Rule Reject H0 if t > 1.734 ( = 0.05, d.f. = 18) – Test Statistic t where: ( x1 x2 ) ( 1 2 ) s2 (1 n1 1 n2 ) (n1 1)s12 (n2 1)s22 s n1 n2 2 2 Bina Nusantara University 2727