Hypothesis Testing for Large and Small Sample Mean 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. The alternative hypothesis is what the test is attempting to establish. 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). H 0 : 0 H a : 0 One-tailed (Right) H 0 : 0 H a : 0 H 0 : 0 H a : 0 One-tailed Two-tailed (Left) Using the Test Statistic 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 a in the lower (or upper) tail of the distribution. 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. Using the p-Value The p-value is the probability of obtaining a sample result that is at least as unlikely as what is observed. Reject H0 if the p-value < . Steps of Hypothesis Testing 1. Determine the null and alternative hypotheses. 2. Specify the level of significance . 3. Select the test statistic that will be used to test the hypothesis. Using the Test Statistic 4. Use to determine the critical value for the test statistic and state the rejection rule for H0. 5. Collect the sample data and compute the value of the test statistic. 6. Use the value of the test statistic and the rejection rule to determine whether to reject H0. Steps of Hypothesis Testing Using the p-Value 4. Collect the sample data and compute the value of the test statistic. 5. Use the value of the test statistic to compute the p-value. 6. Reject H0 if p-value < . One-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Hypotheses H0: or Ha: Test Statistic Known z x 0 / n H0: Ha: Unknown z x 0 s/ n Rejection Rule Left tail: Reject H0 if z < z. Right tail: Reject H0 if z > z. One-Tailed Test about a Population Mean: Large-Sample Case (n > 30) Let = .05 Sampling distribution of z x 0 / n Reject H0 Do Not Reject H0 z 0 z = 1.645 One-Tailed Test about a Population Mean: Large-Sample Case (n > 30) Let = .10 Sampling distribution of z x 0 / n Reject H0 1 Do Not Reject H0 z z = 1.28 0 Confidence Level Critical Value (Z-score) 0.90 1.645 0.91 1.70 0.92 1.75 0.93 1.81 0.94 1.88 0.95 1.96 0.96 2.05 0.97 2.17 0.98 2.33 0.99 2.575 Example 1: The response times for a random sample of 40 medical emergencies were tabulated. The sample mean is 13.25 minutes and the sample standard deviation is 3.2 minutes. The director of medical services 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. One-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the Test Statistic 1. Determine the hypotheses. H0: 1 Ha: 1 2. Specify the level of significance. 3. Select the test statistic. z = .05 x 0 s/ n ( is not known) 4. State the rejection rule. Reject H0 if z > 1.96 One-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the Test Statistic 5. Compute the value of the test statistic. x 13.25 12 z 2.47 s / n 3.2 / 40 6. Determine whether to reject H0. Because 2.47 > 1.96, we reject H0. We are 95% confident that Metro EMS is not meeting the response goal of 12 minutes. One-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the p-Value 4. Compute the value of the test statistic. x 13.25 12 z 2.47 s / n 3.2 / 40 5. Compute the p–value. For z = 2.47, cumulative probability = .9932. p–value = 1 .9932 = .0068 6. Determine whether to reject H0. Because p–value = .0068 < = .05, we reject H0. One-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) • Using the p-value = .05 p-value z 0 z = 1.645 z= 2.47 Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Hypotheses H 0 : 0 H a : 0 Test Statistic Known x 0 z / n Unknown z x 0 s/ n Rejection Rule Lower tail: Reject H0 if z < z. Upper tail: Reject H0 if z > z. Example 2: • Two-Tailed Tests about a Population Mean: Large n 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. 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. Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the Test Statistic 1. Determine the hypotheses. H0: Ha: 6 (two-tailed test) 2. Specify the level of significance. 3. Select the test statistic. 4. State the rejection rule. = .05 x 0 s/ n ( is not known) z Reject H0 if |z| > 1.96 Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the Test Statistic Sampling distribution x 0 of z / n Reject H0 Reject H0 Do Not Reject H0 -1.96 0 1.96 z Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the Test Statistic 5. Compute the value of the test statistic. x 0 6.1 6 z 2.74 s / n .2 / 30 6. Determine whether to reject H0. Because 2.74 > 1.96, we reject H0. We are 95% confident that the mean filling weight of the toothpaste tubes is not 6 oz. Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) • Using the p-Value Suppose we define the p-value for a two-tailed test as double the area found in the tail of the distribution. With z = 2.74, the cumulative standard normal probability table shows there is a 1.0 - .9969 = .0031 probability of a z–score greater than 2.74 in the upper tail of the distribution. Considering the same probability of a z-score less than –2.74 in the lower tail of the distribution, we have p-value = 2(.0031) = .0062. The p-value .0062 is less than = .05, so H0 is rejected. Two-Tailed Tests about a Population Mean: Large-Sample Case (n > 30) Using the p-Value 1/2 p-value = .0031 1/2 p-value = .0031 z z = -2.74 -z/2 = -1.96 0 z/2 = 1.96 z = 2.74 Tests about a Population Mean: Small-Sample Case (n < 30) • Test Statistic Known x 0 z / n Unknown t x 0 s/ n This test statistic has a t distribution with n - 1 degrees of freedom (df). Tests about a Population Mean: Small-Sample Case (n < 30) Rejection Rule H0: Reject H0 if t > t H0: Reject H0 if t < -t H0: Reject H0 if |t| > t 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 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. 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 H0: < 65 The locations where H0 is rejected are deemed the best locations for radar traps. Example 3: Highway Patrol One-Tailed Test about a Population Mean: Small n 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 a = .10 to test the hypothesis. One-Tailed Test about a Population Mean: Small-Sample Case (n < 30) Using the Test Statistic 1. Determine the hypotheses. H0: < 65 Ha: > 65 2. Specify the level of significance. 3. Select the test statistic. t = .10 x 0 s/ n ( is not known) 4. State the rejection rule. Reject H0 if t > 1.753 (d.f. = 16-1 = 15) One-Tailed Test about a Population Mean: Small-Sample Case (n < 30) Reject H0 Do Not Reject H0 0 1 1.753 (Critical value) t One-Tailed Test about a Population Mean: Small-Sample Case (n < 30) Using the Test Statistic 5. Compute the value of the test statistic. t x 0 68.2 65 3.37 s / n 3.8 / 16 6. Determine whether to reject H0. Because 3.37 > 1.753, we reject H0. We are at least 90% 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. Activity 1: 1. An environmentalist collects a liter of water from 45 different locations along the banks of a stream. He measures the amount of dissolved oxygen in each specimen. The mean oxygen level is 4.62 mg, with the overall standard deviation of 0.92. A water purifying company claims that the mean level of oxygen in the water is 5 mg. Conduct a hypothesis test with a =0.01 to determine whether the mean oxygen level is less than 5 mg. 2. A bus company advertised a mean time of 160 minutes for a trip between two cities. A consumer group had reason to believe that the mean time was more than 163 minutes. A sample of 40 trips showed a mean x̄= 153 minutes and a standard deviation s=7.5 minutes. At the .05 level of significance, test the consumer group’s belief. 3. Last year the government made a claim that the average income of the American people was $34,050. However, a sample of 50 people taken recently showed an average income of $34,076 with a population standard deviation of $324. Is the government’s estimate too low? Conduct a significance test to see if the true mean is more than the reported average. Use an a =0.01. 4. Your company sells exercise clothing and equipment on the Internet. To design the clothing, you collect data on the physical characteristics of your different types of customers. The company believed that the mean weight was more than 60. We take a sample of 24 male runners and find their mean weight to be 61.79 kilograms. Assume that the population standard deviation is σ = 4.5. Calculate a 95% level of confidence Tests about a Population Mean: Small-Sample Case (n < 30) Rejection Rule H0: Reject H0 if t > t H0: Reject H0 if t < -t H0: Reject H0 if |t| > t Tests about a Population Mean: Large-Sample Case (n < 30) The rejection rule is: • Lower tail: Reject H0 if z < z. • Upper tail: Reject H0 if z > z.