Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Bootstrapping (statistics) wikipedia , lookup
History of statistics wikipedia , lookup
Taylor's law wikipedia , lookup
Psychometrics wikipedia , lookup
Foundations of statistics wikipedia , lookup
Omnibus test wikipedia , lookup
Statistical hypothesis testing wikipedia , lookup
Misuse of statistics wikipedia , lookup
Statistics Hypothesis Tests 1/71 Contents Developing Null and Alternative Hypotheses Type I and Type II Errors Population Mean: σ Known Population Mean: σ Unknown Population Proportion Hypothesis Testing and Decision Making Calculating the Probability of Type II Errors Determining the Sample Size for Hypothesis Tests About a Population Mean Contents Population Proportion Hypothesis Testing and Decision Making Calculating the Probability of Type II Errors Determining the Sample Size for Hypothesis Tests About a Population Mean STATISTICS in PRACTICE John Morrell & Company is considered the oldest continuously operating meat manufacturer in the United States. Market research at Morrell provides management with up to- date information on the company’s various products and how the products compare with competing brands of similar products. STATISTICS in PRACTICE One research question concerned whether Morrell’s Convenient Cuisine Beef Pot Roast was the preferred choice of more than 50% of the consumer population. The hypothesis test for the research question is Ho: p ≤ .50 vs. Ha: p > .50 In this chapter we will discuss how to formulate hypotheses and how to conduct tests like the one used by Morrell. 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 Ho , is a tentative assumption about a population parameter. Developing Null and Alternative Hypotheses The alternative hypothesis, denoted by Ha, is the opposite of what is stated in the null hypothesis. The alternative hypothesis is what the test is attempting to establish. Developing Null and Alternative Hypotheses Testing Research Hypotheses Testing the Validity of a Claim Testing in Decision-Making Situations 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. Developing Null and Alternative Hypotheses Testing Research Hypotheses Example: Consider a particular automobile model that currently attains an average fuel efficiency of 24 miles per gallon. A product research group developed a new fuel injection system specifically designed to increase the miles-per-gallon rating. Developing Null and Alternative Hypotheses The appropriate null and alternative hypotheses for the study are: Ho : μ ≤ 24 Ha : μ > 24 Developing Null and Alternative Hypotheses Testing Research Hypotheses • In research studies such as these, the null and alternative hypotheses should be formulated so that the rejection of H0 supports the research conclusion. The research hypothesis therefore should be expressed as the alternative hypothesis. Developing Null and Alternative Hypotheses Testing the Validity of a Claim • Manufacturers’ claims are usually given the benefit of the doubt and stated as the null hypothesis. • The conclusion that the claim is false comes from sample data that contradict the null hypothesis. Developing Null and Alternative Hypotheses Testing the Validity of a Claim Example: Consider the situation of a manufacturer of soft drinks who states that it fills two-liter containers of its products with an average of at least 67.6 fluid ounces. Developing Null and Alternative Hypotheses Testing the Validity of a Claim A sample of two-liter containers will be selected, and the contents will be measured to test the manufacturer’s claim. The null and alternative hypotheses as follows. Ho : μ ≥ 67. 6 Ha : μ < 67. 6 Developing Null and Alternative Hypotheses • Testing the Validity of a Claim In any situation that involves testing the validity of a claim, the null hypothesis is generally based on the assumption that the claim is true. The alternative hypothesis is then formulated so that rejection of H0 will provide statistical evidence that the stated assumption is incorrect. Action to correct the claim should be considered whenever H0 is rejected. Developing Null and Alternative Hypotheses Testing in Decision-Making Situations • A decision maker might have to choose between two courses of action, one associated with the null hypothesis and another associated with the alternative hypothesis. Developing Null and Alternative Hypotheses Testing in Decision-Making Situations Example: Accepting a shipment of goods from a supplier or returning the shipment of goods to the supplier. Assume that specifications for a particular part require a mean length of two inches per part. The null and alternative hypotheses would be formulated as follows. H0 : μ = 2 Ha : μ ≠ 2 Developing Null and Alternative Hypotheses • • Testing in Decision-Making Situations If the sample results indicate H0 cannot be rejected and the shipment will be accepted. If the sample results indicate H0 should be rejected the parts do not meet specifications. The quality control inspector will have sufficient evidence to return the shipment to the supplier. Developing Null and Alternative Hypotheses Testing in Decision-Making Situations • We see that for these types of situations, action is taken both when H0 cannot be rejected and when H0 can be rejected. Summary of Forms for Null and Alternative Hypotheses about a Population Mean The equality part of the hypotheses always appears in the null hypothesis.(Follows Minitab) 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). Summary of Forms for Null and Alternative Hypotheses about a Population Mean H 0 : 0 H a : 0 H 0 : 0 H a : 0 H 0 : 0 H a : 0 One-tailed One-tailed Two-tailed (lower-tail) (upper-tail) Null and Alternative Hypotheses Example: Metro EMS A major west coast city provides one of the most comprehensive emergency medical services in the world. Operating in a multiple hospital system with approximately 20 mobile medical units, the service goal is to respond to medical emergencies with a mean time of 12 minutes or less. Null and Alternative Hypotheses Example: Metro EMS The director of medical services wants to formulate a hypothesis test that could use a sample of emergency response times to determine whether or not the service goal of 12 minutes or less is being achieved. Null and Alternative Hypotheses H0: The emergency service is meeting the response goal; no follow-up action is necessary. Ha: The emergency service is not meeting the response goal; appropriate follow-up action is necessary. where: μ = mean response time for the population of medical emergency requests Type I and Type II Errors Because 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. Applications of hypothesis testing that only control the Type I error are often called significance tests. Type I and Type II Errors Type I error The probability of making a Type I error when the null hypothesis is true as an equality is called the level of significance. The Greek symbol α(alpha) is used to denote the level of significance, and common choices for α are .05 and .01. Type I and Type II Errors Type I error If the cost of making a Type I error is high, small values of α are preferred. If the cost of making a Type I error is not too high, larger values of α are typically used. Type I and Type II Errors Type II error A Type II error is accepting H0 when it is false. It is difficult to control for the probability of making a Type II error. Most applications of hypothesis testing control for the probability of making a Type I error. Statisticians avoid the risk of making a Type II error by using “do not reject H0” and not “accept H0”. Type I and Type II Errors Population Condition Conclusion H0 True ( < 12) H0 False ( > 12) Not reject H0 Correct (Conclude < 12) Decision Type II Error Reject H0 Type I Error (Conclude > 12) Correct Decision Steps of Hypothesis Testing Step 1. Develop the null and alternative hypotheses. Step 2. Specify the level of significance α . Step 3. Collect the sample data and compute the test statistic. p-Value Approach Step 4. Use the value of the test statistic to compute the p-value. Step 5. Reject H0 if p-value < α. Steps of Hypothesis Testing Critical Value Approach Step 4. Use the level of significance to determine the critical value and the rejection rule. Step 5. Use the value of the test statistic and the rejection rule to determine whether to reject H0. p-Value Approach to One-Tailed Hypothesis Testing The p-value is the probability, computed using the test statistic, that measures the support (or lack of support) provided by the sample for the null hypothesis. The p-value is also called the observed level of significance. If the p-value is less than or equal to the level of significance α , the value of the test statistic is in the rejection region. Reject H0 if the p-value < α . Critical Value Approach to One-Tailed Hypothesis Testing The test statistic z has a standard normal probability distribution. We can use the standard normal probability distribution table to find the z-value with an area of α in the lower (or upper) tail of the distribution. Critical Value Approach to One-Tailed Hypothesis Testing The value of the test statistic that established the boundary of the rejection region is called the critical value for the test. The rejection rule is: • Lower tail: Reject H0 if z < - z α • Upper tail: Reject H0 if z > z α One-Tailed Hypothesis Testing Population Mean: σ Known One-tailed tests about a population mean take one of the following two forms. Lower Tail Test Upper Tail Test H 0 : 0 H a : 0 H 0 : 0 H a : 0 Lower-Tailed Test About a Population Mean:s Known p-Value < a , so reject H0. p-Value Approach a = .10 Sampling distribution x 0 of z / n p-value 7 z z = -za = -1.46 -1.28 0 Lower-Tailed Test About a Population Mean : s Known p-Value < a , so reject H0. p-Value Approach Sampling distribution x 0 of z / n a = .04 p-Value z 0 za = 1.75 z= 2.29 Lower-Tailed Test About a Population Mean : s Known Critical Value Approach Sampling distribution x 0 of z / n Reject H0 a Do Not Reject H0 z za = 1.28 0 Upper-Tailed Test About a Population Mean : s Known Critical Value Approach Sampling distribution x 0 of z / n Reject H0 Do Not Reject H0 a z 0 za = 1.645 One-Tailed Hypothesis Testing Example: The label on a large can of Hilltop Coffee states that the can contains 3 pounds of coffee. The Federal Trade Commission (FTC) knows that Hilltop’s production process cannot place exactly 3 pounds of coffee in each can, even if the mean filling weight for the population of all cans filled is 3 pounds per can. One-Tailed Hypothesis Testing Example: However, as long as the population mean filling weight is at least 3 pounds per can, the rights of consumers will be protected. One-Tailed Hypothesis Testing Step 1. Develop the null and alternative hypotheses. denoting the population mean filling weight and the hypothesized value of the population mean is μ0 = 3. The null and alternative hypotheses are H0 : μ ≥ 3 Ha : μ < 3 Step 2. Specify the level of significance α. we set the level of significance for the hypothesis test at α= .01 One-Tailed Hypothesis Testing Step 3. Collect the sample data and compute the test statistic. Test statistic: z x o / n Sample data: σ = .18 and sample size n=36, x = 2.92 pounds. One-Tailed Hypothesis Testing Step 3. Collect the sample data and compute the test statistic. z x o x x 3 .03 We have z = -2.67 One-Tailed Hypothesis Testing p-Value Approach Step 4. Use the value of the test statistic to compute the p-value. Using the standard normal distribution table, the area between the mean and z = - 2.67 is .4962. The p-value is .5000 - .4962 = .0038, Step 5. p-value = .0038 < α = .01 Reject H0. One-Tailed Hypothesis Testing p-value for The Hilltop Coffee Study when sample mean x = 2.92 and z = -2 .67. One-Tailed Hypothesis Testing Critical Value Approach Step 4. Use the level of significance to determine the critical value and the rejection rule. The critical value is z = -2.33. One-Tailed Hypothesis Testing Step 5. Use the value of the test statistic and the rejection rule to determine whether to reject H0. We will reject H0 if z < - 2.33. Because z = - 2.67 < 2.33, we can reject H0 and conclude that Hilltop Coffee is under filling cans. One-Tailed Tests About a Population Mean : s Known Example: Metro EMS The response times for a random sample of 40 medical emergencies were tabulated. The sample mean is 13.25 minutes. The population standard deviation is believed to be 3.2 minutes. One-Tailed Tests About a Population Mean : s Known Example: Metro EMS The EMS director wants to perform a hypothesis test, with a .05 level of significance, to determine whether the service goal of 12 minutes or less is being achieved. One-Tailed Tests About a Population Mean: s Known p -Value and Critical Value Approaches 1. Develop the hypotheses. H0: Ha: 2. Specify the level of significance. a = .05 3. Compute the value of the test statistic. z x 13.25 12 2.47 / n 3.2 / 40 One-Tailed Tests About a Population Mean: s Known p –Value Approach 4. Compute the p –value. For z = 2.47, cumulative probability = .9932. p–value = 1 .9932 = .0068 5. Determine whether to reject H0. Because p–value = .0068 < α = .05, we reject H0. We are at least 95% confident that Metro EMS is not meeting the response goal of 12 minutes. One-Tailed Tests About a Population Mean: s Known p –Value Approach Sampling distribution x 0 of z / n a = .05 p-value z 0 za = 1.645 z= 2.47 One-Tailed Tests About a Population Mean: s Known Critical Value Approach 4. Determine the critical value and rejection rule. For α = .05, z.05 = 1.645 Reject H0 if z > 1.645 5. Determine whether to reject H0. Because 2.47 > 1.645, we reject H0. We are at least 95% confident that Metro EMS is not meeting the response goal of 12 minutes. Two-Tailed Hypothesis Testing In hypothesis testing, the general form for a two-tailed test about a population mean is as follows: H 0: 0 H a: 0 p-Value Approach to Two-Tailed Hypothesis Testing Compute the p-value using the following three steps: 1. Compute the value of the test statistic z. 2. If z is in the upper tail (z > 0), find the area under the standard normal curve to the right of z. If z is in the lower tail (z < 0), find the area under the standard normal curve to the left of z. p-Value Approach to Two-Tailed Hypothesis Testing 3. Double the tail area obtained in step 2 to obtain the p –value. The rejection rule: Reject H0 if the p-value < a . Critical Value Approach to Two-Tailed Hypothesis Testing The critical values will occur in both the lower and upper tails of the standard normal curve. Use the standard normal probability distribution table to find za/2 (the z-value with an area of a/2 in the upper tail of the distribution). The rejection rule is: Reject H0 if z < -za/2 or z > za/2 Two-Tailed Hypothesis Testing Example: The U.S. Golf Association (USGA) establishes rules that manufacturers of golf equipment must meet if their products are to be acceptable for use in USGA events. MaxFlight produce golf balls with an average distance of 295 yards. Two-Tailed Hypothesis Testing When the average distance falls below 295 yards, the company worries about losing sales because the golf balls do not provide as much distance as advertised. Two-Tailed Hypothesis Testing When the average distance passes 295 yards, MaxFlight’s golf balls may be rejected by the USGA for exceeding the overall distance standard concerning carry and roll. A hypothesized value of μ0= 295 and the null and alternative hypotheses test are as follows: H0 : μ = 295 VS Ha : μ≠ 295 Two-Tailed Hypothesis Testing If the sample mean x is significantly less than 295 yards or significantly greater than 295 yards, we will reject H0. Two-Tailed Hypothesis Testing Step 1. Develop the null and alternative hypotheses. A hypothesized value of μ0 = 295 and H0 : μ = 295 Ha : μ≠ 295 Step 2. Specify the level of significance α. we set the level of significance for the hypothesis test at α = .05 Two-Tailed Hypothesis Testing Step 3. Collect the sample data and compute the test statistic. Test statistic: x z o / n Sample data: σ = 12 and sample size n=50, x = 297.6 yards. We have x o 297.6 295 z 1.53 / n 12 / 50 Two-Tailed Hypothesis Testing p-Value Approach Step 4. Use the value of the test statistic to compute the p-value. The two-tailed p-value in this case is given by P(z < -1.53) + P(z > 1.53)= 2(.0630) = .1260. Step 5. We do not reject H0 because the p-value = .1260 > .05. No action will be taken to adjust manufacturing process. Two-Tailed Hypothesis Testing p-Value for The Maxflight Hypothesis Test Two-Tailed Hypothesis Testing Critical Value Approach Step 4. Use the level of significance to determine the critical value and the rejection rule. The critical values are - z.025 = -1.96 and z.025 = 1.96. Two-Tailed Hypothesis Testing Step 5. Use the value of the test statistic and the rejection rule to determine whether to reject H0. We will reject H0 if z < - 1.96 or if z > 1.96 Because the value of the test statistic is z=1.53, the statistical evidence will not permit us to reject the null hypothesis at the .05 level of significance. Example: Glow Toothpaste Two-Tailed Test About a Population Mean: s Known The production line for Glow toothpaste is designed to fill tubes with a mean weight of 6 oz. Periodically, a sample of 30 tubes will be selected in order to check the filling process. Example: Glow Toothpaste Two-Tailed Test About a Population Mean: s Known Quality assurance procedures call for the continuation of the filling process if the sample results are consistent with the assumption that the mean filling weight for the population of toothpaste tubes is 6 oz.; otherwise the process will be adjusted. Example: Glow Toothpaste Two-Tailed Test About a Population Mean: s Known Assume that a sample of 30 toothpaste tubes provides a sample mean of 6.1 oz. The population standard deviation is believed to be 0.2 oz. Perform a hypothesis test, at the .03 level of significance, to help determine whether the filling process should continue operating or be stopped and corrected. Two-Tailed Tests About a Population Mean:s Known p –Value and Critical Value Approaches H0 : 6 1. Determine the hypotheses. H : 6 a 2. Specify the level of significance. α = .03 3. Compute the value of the test statistic. x 0 6.1 6 z 2.74 / n .2 / 30 Two-Tailed Tests About a Population Mean : s Known p –Value Approach 4. Compute the p –value. For z = 2.74, cumulative probability = .9969 p–value = 2(1 - .9969) = .0062 5. Determine whether to reject H0. Because p–value = .0062 < α = .03, we reject H0. We are at least 97% confident that the mean filling weight of the toothpaste tubes is not 6 oz. Two-Tailed Tests About a Population Mean : s Known p-Value Approach 1/2 p -value = .0031 1/2 p -value = .0031 a/2 = a/2 = .015 .015 z z = -2.74 -za/2 = -2.17 0 za/2 = 2.17 z = 2.74 Two-Tailed Tests About a Population Mean : s Known Critical Value Approach 4. Determine the critical value and rejection rule. For a/2 = .03/2 = .015, z.015 = 2.17 Reject H0 if z < -2.17 or z > 2.17 5. Determine whether to reject H0. Because 2.47 > 2.17, we reject H0. We are at least 97% confident that the mean filling weight of the toothpaste tubes is not 6 oz. Two-Tailed Tests About a Population Mean : σ Known Critical Value Approach Sampling distribution x 0 of z / n Reject H0 Reject H0 Do Not Reject H0 a/2 = .015 -2.17 a/2 = .015 0 2.17 z Summary of Hypothesis Tests about a Population Mean: σ Known Case Confidence Interval Approach to Two-Tailed Tests About a Population Meant Select a simple random sample from the population and use the value of the sample mean x to develop the confidence interval for the population mean x . (Confidence intervals are covered in Chapter 8.) If the confidence interval contains the hypothesized value 0 do not reject H0. Otherwise, reject H0. Confidence Interval Approach to Two-Tailed Tests About a Population Mean The 97% confidence interval for is x za / 2 6.1 2.17(.2 30) 6.1 .07924 n or 6.02076 to 6.17924 Because the hypothesized value for the population mean, 0 = 6, is not in this interval, the hypothesis-testing conclusion is that the null hypothesis, H0: = 6, can be rejected. 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. Tests About a Population Mean: Unknown Rejection Rule: p -Value Approach Reject H0 if p –value < a Rejection Rule: Critical Value Approach H0: Reject H0 if t ta H0: Reject H0 if t ta H0: Reject H if t < - t or t > t 0 a a p -Values and the t Distribution The format of the t distribution table provided in most statistics textbooks does not have sufficient detail to determine the exact p-value p-value for a hypothesis test. However, we can still use the t distribution table to identify a range for the p-value. An advantage of computer software packages is that the computer output will provide the p-value for the t distribution. Tests About a Population Mean: Unknown Example: A business travel magazine wants to classify transatlantic gateway airports according to the mean rating for the population of business travelers. A rating scale with a low score of 0 and a high score of 10 will be used, and airports with a population mean rating greater than 7 will be designated as superior service airports. Tests About a Population Mean: Unknown The null and alternative hypotheses for this upper tail test are as follows: H0 : μ ≤ 7 Ha : μ > 7 Tests About a Population Mean: Unknown Test Statistic x 0 t s/ n The sampling distribution of t has n – 1 df. We have =7.25, s = 1.052, and n = 60, and the value of the test statistic is p-Value Approach Using Table 2 in Appendix B, the t distribution with 59 degrees of freedom. We see that t 1.84 is between 1.671 and 2.001. Although the table does not provide the exact p-value, the values in the “Area in Upper Tail” row show that the p-value must be less than .05 and greater than .025. MINITAB OUTPUT The test statistic t = 1.84, and the exact p-value is .035 for the Heathrow rating hypothesis test. A p-value = .035 < .05 leads to the rejection of the null hypothesis. Critical Value Approach The rejection rule is thus Reject H0 if t > 1.671 With the test statistic t = 1.84 > 1.671, H0 is rejected. Example: Highway Patrol One-Tailed Test About a Population Mean: Unknown A State Highway Patrol periodically samples vehicle speeds at various locations on a particular roadway. The sample of vehicle speeds is used H0: m < 65 to test the hypothesis The locations where H0 is rejected are deemed the best locations for radar traps. Example: Highway Patrol One-Tailed Test About a Population Mean: s Unknown At Location F, a sample of 64 vehicles shows a mean speed of 66.2 mph with a standard deviation of 4.2 mph. Use a = .05 to test the hypothesis. One-Tailed Test About a Population Mean : Unknown p –Value and Critical Value Approaches 1. Determine the hypotheses. H0: < 65 Ha: > 65 2. Specify the level of significance. a = .05 3. Compute the value of the test statistic. x 0 66.2 65 t 2.286 s / n 4.2 / 64 One-Tailed Test About a Population Mean : Unknown p –Value Approach 4. Compute the p –value. For t = 2.286, the p–value must be less than .025 (for t = 1.998) and greater than .01 (for t = 2.387). .01 < p–value < .025 One-Tailed Test About a Population Mean: Unknown p –Value Approach 5. Determine whether to reject H0. Because p–value < a = .05, we reject H0. We are at least 95% confident that the mean speed of vehicles at Location F is greater than 65 mph. One-Tailed Test About a Population Mean: Unknown Critical Value Approach 4. Determine the critical value and rejection rule. For a = .05 and d.f. = 64 – 1 = 63, t.05 = 1.669 Reject H0 if t > 1.669 One-Tailed Test About a Population Mean: Unknown Critical Value Approach 5. Determine whether to reject H0. Because 2.286 > 1.669, we reject H0. We are at least 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. One-Tailed Test About a Population Mean: Unknown Reject H0 Do Not Reject H0 0 a ta = 1.669 t Tests About a Population Mean: Unknown Summary of Hypothesis Tests about a Population Mean: Unknown Case 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). A Summary of Forms for Null and Alternative Hypotheses About a Population Proportion H 0 : p p0 H a : p p0 H 0 : p p0 H a : p p0 H 0 : p p0 H a : p p0 One-tailed One-tailed Two-tailed (lower tail) (upper tail) Tests About a Population Proportion Test Statistic z p p0 p where: p p0 (1 p0 ) n assuming np > 5 and n(1 – p) > 5 Tests About a Population Proportion Rejection Rule: p –Value Approach Reject H0 if p –value < α Rejection Rule: Critical Value Approach H:p p Reject H0 if z > z H:p p Reject H0 if z < -z H0:pp Reject H0 if z za orz z Upper Tail Test About a Population Proportion Example: Pine Creek golf course Over the past year, 20% of the players at Pine Creek were women. A special promotion designed to attract women golfers. One month after the promotion was implemented. The null and alternative hypotheses are as follows: H0: p ≤ .20 H : p > .20 Upper Tail Test About a Population Proportion level of significance of α = .05 be used. Test statistics Upper Tail Test About a Population Proportion level of significance of α = .05 be used. Suppose a random sample of 400 players was selected, and that 100 of the players were women. The proportion of women golfers in the sample is and the value of the test statistic is Upper Tail Test About a Population Proportion p-Value Approach the p-value is the probability that z is greater than or equal to z = 2.50. Thus, the p-value for the test is .5000 – .4938 = .0062. Upper Tail Test About a Population Proportion A p-value = .0062 < .05 gives sufficient statistical evidence to reject H0 at the .05 level of significance. Critical Value Approach The critical value corresponding to an area of .05 in the upper tail of a standard normal distribution is z.05 = 1.645. To reject H0 if z ≥ 1.645. Because z = 2.50 > 1.645, H0 is rejected. Two-Tailed Test About a Population Proportion Example: National Safety Council For a Christmas and 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. Two-Tailed Test About a Population Proportion Example: National Safety Council A sample of 120 accidents showed that 67 were caused by drunk driving. Use these data to test the NSC’s claim with α = .05. Two-Tailed Test About a Population Proportion p –Value and Critical Value Approaches 1. Determine the hypotheses. 2. Specify the level of significance. a = .05 Two-Tailed Test About a Population Proportion p –Value and Critical Value Approaches 3. Compute the value of the test statistic. p0 (1 p0 ) .5(1 .5) p .045644 n 120 z a common error is p using in this formula p p0 p (67 /120) .5 1.28 .045644 Two-Tailed Test About a Population Proportion p -Value Approach 4. Compute the p -value. For z = 1.28, cumulative probability = .8997 p–value = 2(1 - .8997) = .2006 5. Determine whether to reject H0. Because p–value = .2006 > a = .05, we cannot reject H0. Two-Tailed Test About a Population Proportion Critical Value Approach 4. Determine the critical value and rejection rule. For a/2 = .05/2 = .025, z = 1.96 .025 Reject H0 if z < -1.96 or z > 1.96 5. Determine whether to reject H0. Because 1.278 > -1.96 and < 1.96, we cannot reject H0. Tests About a Population Proportion Summary of Hypothesis Tests about a Population Proportion Hypothesis Testing and Decision Making In many decision-making situations the decision maker may want, and in some cases may be forced, to take action with both the conclusion do not reject H0 and the conclusion reject H0. In such situations, it is recommended that the hypothesis-testing procedure be extended to include consideration of making a Type II error. Hypothesis Testing and Decision Making Example: A quality control manager must decide to accept a shipment of batteries from a supplier or to return the shipment because of poor quality. Suppose the null and alternative hypotheses about the population mean follow. H0 : μ ≥ 120 Ha : μ < 120 Hypothesis Testing and Decision Making If H0 is rejected, the appropriate action is to return the shipment to the supplier. If H0 is not rejected, the decision maker must still determine what action should be taken. In such decision-making situations, it is recommended to control the probability of making a Type II error. Because knowledge of the probability of making a Type II error will be helpful. Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean 1. Formulate the null and alternative hypotheses. 2. Using the critical value approach, use the level of significance to determine the critical value and the rejection rule for the test. 3. Using the rejection rule, solve for the value of the sample mean corresponding to the critical value of the test statistic. Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean 4. Use the results from step 3 to state the values of the sample mean that lead to the acceptance of H0; this defines the acceptance region. 5. Using the sampling distribution of x for a value of μ satisfying the alternative hypothesis, and the acceptance region from step 4, compute the probability that the sample mean will be in the acceptance region. (This is the probability of making a Type II error at the chosen level of μ.) Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean Example: Batteries’ Quality Suppose the null and alternative hypotheses are H0 : μ ≥ 120 Ha : μ < 120 level of significance of α = .05. Sample size n=36 and σ = 12 hours. Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean The critical value approach and z.05 = 1.645, the rejection rule is Reject H0 if z ≤ -1.645 Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean The rejection rule indicates that we will reject H0 x 120 if z 1.645 12 / 36 That indicates that we will reject H0 if 12 x 120 1.645 116.71 36 and accept the shipment whenever x > 116.71. Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean Compute probabilities associated with making a Type II error (whenever the true mean is less than 120 hours and we make the decision to accept H0: μ ≥ 120.) Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean If μ =112 is true, the probability of making a Type II error is the probability that the sample mean x is greater than 116.71 when μ = 112, that is, P( x ≥ 116.71 | μ = 112) =? The probability of making a Type II error (β ) when μ = 112 is .0091 . Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean We can repeat these calculations for other values of μ less than 120. Calculating the Probability of a Type II Error in Hypothesis Tests About a Population Mean The power of the test = the probability of correctly rejecting H0 when it is false. For any particular value of μ, the power is 1-β. Power Curve for The Lot-Acceptance Hypothesis Test Calculating the Probability of a Type II Error Example: Metro EMS (revisited) Recall that the response times for a random sample of 40 medical emergencies were tabulated. The sample mean is 13.25 minutes. The population standard deviation is believed to be 3.2 minutes. Calculating the Probability of a Type II Error Example: Metro EMS (revisited) The EMS director wants to perform a hypothesis test, with a .05 level of significance, to determine whether or not the service goal of 12 minutes or less is being achieved. Calculating the Probability of a Type II Error 1. Hypotheses are: H0: μ and Ha:μ 2. Rejection rule is: Reject H0 if z > 1.645 3. Value of the sample mean that identifies the rejection region: 4. We will accept H0 when x < 12.8323 Calculating the Probability of a Type II Error 5. Probabilities that the sample mean will be in the acceptance region: Values of b1-b 14.0 13.6 13.2 12.8323 12.8 12.4 12.0001 -2.31 -1.52 -0.73 0.00 0.06 0.85 1.645 .0104 .0643 .2327 .5000 .5239 .8023 .9500 .9896 .9357 .7673 .5000 .4761 .1977 .0500 Calculating the Probability of a Type II Error Calculating the Probability of a Type II Error Observations about the preceding table: When the true population mean m is close to the null hypothesis value of 12, there is a high probability that we will make a Type II error. Example: = 12.0001,b = .9500 Calculating the Probability of a Type II Error Calculating the Probability of a Type II Error When the true population mean m is far above the null hypothesis value of 12, there is a low probability that we will make a Type II error. Example: = 14.0, b = .0104 Power of the Test The probability of correctly rejecting H0 when it is false is called the power of the test. For any particular value of μ, the power is 1 – β. We can show graphically the power associated with each value of μ; such a graph is called a power curve. (See next slide.) Power Curve Probability of Correctly Rejecting Null Hypothesis 1.00 0.90 0.80 H0 False 0.70 0.60 0.50 0.40 0.30 0.20 0.10 0.00 11.5 12.0 12.5 13.0 13.5 14.0 14.5 Determining the Sample Size for a Hypothesis Test About a Population Mean The specified level of significance determines the probability of making a Type I error. By controlling the sample size, the probability of making a Type II error is controlled. Determining the Sample Size for a Hypothesis Test About a Population Mean Example: how a sample size can be determined for the lower tail test about a population mean. H0 : μ ≥ μ 0 Ha : μ < μ0 Let α be the probability of a Type I error and zα and zβ are the z value corresponding to an area of α and β, respectively in the upper tail of the standard normal distribution. Determining the Sample Size for a Hypothesis Test About a Population Mean Determining the Sample Size for a Hypothesis Test About a Population Mean we compute c using the following formulas Determining the Sample Size for a Hypothesis Test About a Population Mean To determine the required sample size, we solve for the n as follows. Determining the Sample Size for a Hypothesis Test About a Population Mean x n Reject H0 c H0: Ha: a x Sampling Distribution of x when H0 is true and m = m0 Sampling distribution of x when H0 is false and a > 0 b c a x Determining the Sample Size for a Hypothesis Test About a Population Mean n ( za zb ) 2 2 ( 0 a )2 where za = z value providing an area of a in the tail zb = z value providing an area of b in the tail = population standard deviation 0 = value of the population mean in H0 a = value of the population mean used for the Type II error Note: In a two-tailed hypothesis test, use za /2 not za 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 Determining the Sample Size for a Hypothesis Test About a Population Mean Let’s assume that the director of medical services makes the following statements about the allowable probabilities for the Type I and Type II errors: • If the mean response time is = 12 minutes, I am willing to risk an a = .05 probability of rejecting H0. • If the mean response time is 0.75 minutes over the specification ( = 12.75), I am willing to risk ab = .10 probability of not rejecting H0. Determining the Sample Size for a Hypothesis Test About a Population Mean Given a = .05, b = .10 za = 1.645, zb = 1.28 0 = 12, a = 12.75 = 3.2 ( za zb )2 2 (1.645 1.28)2 (3.2)2 n 155.75 156 2 2 ( 0 a ) (12 12.75)