Hypothesis Testing Week 04 Presented by : W. Rofianto
Tests about a Population Mean: σ unknown Test Statistic t x 0 s / n This test statistic has a t distribution with n - 1 degrees of freedom.
Example: Highway Patrol One-Tailed Test about a Population Mean: Small n A State Highway Patrol periodically samples vehicle speeds at various locations on a particular roadway. The sample of vehicle speeds is used to test the hypothesis H 0 : < 65. The locations where H 0 locations for radar traps. is rejected are deemed the best At Location F, a sample of 16 vehicles shows a mean speed of 68.2 mph with a standard deviation of 3.8 mph. Use an a =.05 to test the hypothesis.
Example: Highway Patrol One-Tailed Test about a Population Mean: Small n x Let n = 16, = 68.2 mph, s = 3.8 mph a =.05, d.f. = 16-1 = 15, t a = 1.753 t x s / n 68.2 65 0 3.8/ 16 3.37 Since 3.37 > 1.753, we reject H 0. Conclusion: We are 95% confident that the mean speed of vehicles at Location F is greater than 65 mph. Location F is a good candidate for a radar trap.
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 p 0 is the hypothesized value of the population proportion). H 0 : p > p 0 H 0 : p < p 0 H 0 : p = p 0 H a : p < p 0 H a : p > p 0 H a : p p 0
Population Proportion Tests Test Statistic z p p 0 p where: p0 ( 1 p0 ) p n
Example: NSC Two-Tailed Test about a Population Proportion: Large n For a New Year s week, the National Safety Council estimated that 500 people would be killed and 25,000 injured on the nation s roads. The NSC claimed that 50% of the accidents would be caused by drunk driving. A sample of 120 accidents showed that 67 were caused by drunk driving. Use these data to test the NSC s claim with a = 0.05.
Example: NSC Two-Tailed Test about a Population Proportion: Large n Hypothesis H 0 : p = 0.5 Test Statistic H a : p 0.5 p p (1 p ).5(1.5) 0 0 n 120.045644 z p p0 (67 /120).5.045644 p 1.278
Example: NSC Two-Tailed Test about a Population Proportion: Large n Rejection Rule Reject H 0 if z < -1.96 or z > 1.96 Conclusion Do not reject H 0.
Calculating the Probability of a Type II Error 1. Formulate the null and alternative hypotheses. 2. Use the level of significance a to establish a rejection rule based on the test statistic. 3. Using the rejection rule, solve for the value of the sample mean that identifies the rejection region. 4. Use the results from step 3 to state the values of the sample mean that lead to the acceptance of H 0 ; this defines the acceptance region. 5. Using the sampling distribution of for any value of from the alternative hypothesis, and the acceptance region from step 4, compute the probability that the sample mean will be in the acceptance region. x
Example: Metro EMS (revisited) Calculating the Probability of a Type II Error 1. Hypotheses are: H 0 : and H a : 2. Rejection rule is: Reject H 0 if z > 1.645 3. Value of the sample mean that identifies the rejection region: z x 12 3.2/ 40 1.645 x 3.2 12 1.645 12.8323 40 4. We will accept H 0 when x < 12.8323
Example: Metro EMS (revisited) Calculating the Probability of a Type II Error 5. Probabilities that the sample mean will be in the acceptance region: z 12.8323 Values of b 1-b 3.2/ 40 14.0-2.31.0104.9896 13.6-1.52.0643.9357 13.2-0.73.2327.7673 12.83 0.00.5000.5000 12.8 0.06.5239.4761 12.4 0.85.8023.1977 12.0001 1.645.9500.0500
Example: Metro EMS (revisited) Calculating the Probability of a Type II Error Observations about the preceding table: When the true population mean is close to the null hypothesis value of 12, there is a high probability that we will make a Type II error. When the true population mean is far above the null hypothesis value of 12, there is a low probability that we will make a Type II error.
Determining the Sample Size where n 2 2 a b ( z z ) ( ) 0 z a = z value providing an area of a in the tail z b = z value providing an area of b in the tail = population standard deviation 0 = value of the population mean in H 0 a = value of the population mean used for the Type II error a 2 Note: In a two-tailed hypothesis test, use z a /2 not z a
Relationship among a, b, and n Once two of the three values are known, the other can be computed. For a given level of significance a, increasing the sample size n will reduce b. For a given sample size n, decreasing a will increase b, whereas increasing a will decrease b.
Example: Par, Inc. Interval Estimate of 1-2 Sample Statistics Sample #1 Sample #2 Par, Inc. Rap, Ltd. Sample Size n 1 = 120 balls n 2 = 80 balls Mean x 1 = 235 yards x = 218 yards 2 Standard Dev. s 1 = 15 yards s 2 = 20 yards