CHAPTER 9 HYPOTHESIS TESTS ABOUT THE MEAN Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. Why do we Conduct A Hypothesis Test? In a test of hypothesis, we test a certain given theory/ belief/ claim about a population parameter. By using sample statistic we test whether a given claim about a population parameter is true. A soft-drink company may claim that, on average, their cans contain 12 ounces of soda. A government agency wants to test whether such cans contain, on average, 12 ounces of soda. Suppose we take a sample of 100 cans of the soft drink under investigation. We then find out that the mean amount of soda in these 100 cans is 11.89 ounces. Based on this result, can we state that, on average, all such cans contain less than 12 ounces of soda and that the company is lying to the public? Why do we Conduct A Hypothesis Test? Not until we perform a test of hypothesis can we make such an accusation. The reason is that the mean of 11.89 ounces, is obtained from a sample. The difference between 12 ounces and 11.89 ounces may have occurred only because of the sampling error. Another sample of 100 cans may give us a mean of 12.04 ounces. Therefore, we perform a test of hypothesis to find out how large the difference between 12 ounces and 11.89 ounces is and to investigate whether this difference has occurred as a result of chance alone. 9.1 Hypothesis Tests: An Introduction Two Hypotheses Rejection and Non-rejection Regions Two Types of Errors Tails of a Test Two Hypotheses A null hypothesis is a claim (or statement) about a population parameter that is assumed to be true until it is declared false. Null: The person is not guilty An alternative hypothesis will be declared true if the null hypothesis is proved to be false. Alternative: The person is guilty Rejection and Non-rejection Regions Figure: Non-rejection and Rejection Regions for the Court Case Do not/Fail to Reject the Null Hypothesis Reject the Null Hypothesis/The Alternate Hypothesis is True Two Types of Errors Table: Four Possible Outcomes for a Court Case A court’s verdict might not always be correct. If a person is declared guilty at the end of a trial, there are two possibilities. Type I error & Type II error A Type I error occurs when a true null hypothesis is rejected. The value of α represents the probability of committing this type of error; that is, α = P(H0 is rejected | H0 is true) α is called the significance level of the test. In one approach to a test of hypothesis, we assign a value to α before making the test. Although any value can be assigned to α to the commonly used values are .01, .025, .05, and .10. Type I error & Type II error A Type II error occurs when a false null hypotheses is not rejected. The value of β represents the probability of committing a Type II error; that is, β = P (H0 is not rejected | H0 is false) (1 – β) is called the power of the test. It represents the probability of not making a Type II error. Table: Four Possible Outcomes for a Test of Hypothesis Tails of a Test The hypothesis-testing procedure is like the trial of a person in court but with two major differences. First is that in a test of hypothesis, the partition of the rejection and nonrejection regions is not arbitrary. Instead, it depends on the value assigned to α or significance level of the test. Second difference relates to the rejection region. In the court case, the rejection region is on the right side of the critical point. However, in statistics, the rejection region for a hypothesis-testing problem can be on both sides, with the non-rejection region in the middle, or it can be on the left side or right side of the nonrejection region. Tails of a Test A two-tailed test has rejection regions in both tails. A left-tailed test has the rejection region in the left tail. A right-tailed test has the rejection region in the right tail of the distribution curve. What tailed test will be conducted is determined by the sign in the alternative hypothesis. A Two-Tailed Test According to the U.S. Bureau of Statistics, workers in the United States earn an average of $47,230 a year. Suppose an economist wants to check whether this mean has changed or not. The population of US workers is approximately normally distributed. The key word here is changed. The test is to check if the income has either increased or decreased. It is not the same. Which means it is not equal to the previous income. This is an example of a two tailed test. A Two-Tailed Test Let μ be the mean annual earning of employed Americans. The two possible decisions are H0 : μ = $47,230 (The mean annual earning of employed Americans- this is the claim, which will determine the null hypothesis) H1 : μ ≠ $47,230 (The mean annual earning of employed Americans has changed-this is what we want to test, which will determine the alternate hypothesis) A Two-Tailed Test Whether a test is two–tailed or one–tailed is determined by the sign in the alternative hypothesis. If the alternative hypothesis has a not equal to (≠) sign, it is a two–tailed test. A two-tailed test has 2 rejection regions, one in each tail of the normal distribution curve. Figure 9.2 A Two-Tailed Test A Two-Tailed Test The curve shows the sampling distribution of has a normal distribution (bell-shaped-curve) The distribution has a mean The significance level of 𝒙, Assuming it 𝝁 of $47,230 𝜶 denotes the total area in the rejection region. Since there are 2 rejection regions and the normal distribution curve is symmetric- there is approximately 𝜶/2 areas on each side of the tail. There are 2 critical values that denote where the rejection region begins. (we find these values from the z-table) The middle area is called the non-rejection region. We will reject the Null if the value from the sample mean falls in the rejection region on the 2 ends/tails. A Two-Tailed Test By rejecting the null we are essentially saying that the difference between the value of 𝝁 stated in the 𝐻0 and the value of 𝒙 obtained from the sample is too large to have occurred just out of the sampling error. The difference in the population and sample is REAL. Consequently, by not rejecting the 𝐻0 (if the value falls in the non-rejection region) we are saying that the difference between the value of 𝝁 stated in the 𝐻0 and the value of 𝒙 obtained from the sample is small and can have occurred from the sampling error. A Left-Tailed Test A soda company claims that their cans, on average, contain 12 ounces of soda. However, if these cans contain less than the claimed amount of soda, then the company can be accused of cheating. Suppose a consumer agency wants to test whether the mean amount of soda per can is less than 12 ounces. Note that the key phrase this time is less than, which indicates that this is a left-tailed test. A Left-Tailed Test Let μ be the mean amount of soda in all cans. The two possible decisions are H0 : μ = 12 ounces (The mean is equal to 12 ounces, which the company claims) H1 : μ < 12 ounces (The mean is less than 12 ounces, which we want to test) When the alternative hypothesis has a less than (<) sign, the test is always left–tailed. Figure 9.3 A Left-Tailed Test Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. A Left-Tailed Test In a left-tailed test, the rejection region is in the left tail of the distribution curve, as shown in Figure and the area of this rejection region is equal to 𝜶 (the significance level). We can observe from this figure that there is only one critical value in a left-tailed test. A Right-Tailed Test The average price of homes in West Orange, New Jersey, was $471,257. Suppose a real estate researcher wants to check whether the current mean price of homes in this town is higher than $471,257. The key phrase in this case is higher than, which indicates a right-tailed test. Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. A Right-Tailed Test Let μ be the current mean price of homes in this town. The two possible decisions are H0 : μ = $471,257 (The current mean price of homes in this town is $ 471,257) H1 : μ > $471,257 (The current mean price of homes in this town is higher than $ 471,257) When the alternative hypothesis has a greater than (>) sign, the test is always right–tailed. Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. Figure 9.4 A Right-Tailed Test Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. A Right-Tailed Test In a right-tailed test, the rejection region is in the right tail of the distribution curve, as shown in Figure and the area of this rejection region is equal to 𝛼 (the significance level). We can observe from this figure that there is only one critical value in a right-tailed test. Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. Table 9.3 Signs in H0 and H1 and Tails of a Test Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. 9.2 Hypothesis Tests About µ : σ Known This section explains how to perform a test of hypothesis for the population mean when the population standard deviation is known/given. Three Possible Cases Case I. If the following three conditions are fulfilled: 1. The population standard deviation σ is known 2. The sample size is small (i.e., n < 30) 3. The population from which the sample is selected is normally distributed. We use the normal distribution to perform a test of hypothesis. Hypothesis Tests About µ : σ Known Case II. If the following two conditions are fulfilled: 1. The population standard deviation σ is known 2. The sample size is large (i.e., n ≥ 30) We use the normal distribution to perform a test of hypothesis through the help of the C.L Theorem. Case III. If the following three conditions are fulfilled: 1. The population standard deviation σ is known 2. The sample size is small (i.e., n < 30) 3. The population from which the sample is selected is not normally distributed (or its distribution is unknown). We use a nonparametric method to perform a test of hypothesis. Hypothesis Tests About µ : σ Known Three Possible Cases Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. Two Procedures Two procedures to make tests of hypothesis 1. The p-value approach- Under this procedure, we calculate the p-value for our sample statistic and then we compare it with a specific significance level. Then we make a decision. P- value stands for Probability over here. 2. The critical-value approach- will be explained later P value approach Assuming that the null hypothesis is true, the p-value can be defined as the probability that a sample statistic (such as the sample mean) is at least as far away from the hypothesized value in the direction of the alternative hypothesis as the one obtained from the sample data under consideration. Note that the p–value is the smallest significance level at which the null hypothesis is rejected. Prem Mann, Introductory Statistics, 9/E Copyright © 2015 John Wiley & Sons. All rights reserved. Figure 9.5 The p–Value for a Right-Tailed Test Figure 9.6 The p–Value for a Two-Tailed Test P value approach For a one-tailed test, the p-value is the area in the tail of the sampling distribution curve beyond the observed sample statistic. For a left-tailed test the p-value will be the area in the left tail, left of where the sample statistic lies. Similarly for a right- tailed test the p-value will be the area in the right tail, right of where the sample statistic lies. For a 2-tail test, the p- value is twice the area in any tail of the sampling distribution curve, beyond the observed value of the sample statistic. Calculating the z Value for 𝒙 When using the normal distribution, the value of z for a test of hypothesis about μ is computed as follows: z x x 𝒙 for where x n The value of z calculated for 𝒙 using this formula is also called the observed value of z. Steps to Perform a Test of Hypothesis Using the p–Value Approach 1. 2. 3. 4. State the null and alternative hypothesis. Select the distribution to use. Calculate the p–value. Make a decision. Example 9-1 At Canon Food Corporation, it takes an average of 90 minutes for workers to learn a food processing job. Recently the company installed a new food processing machine. The supervisor at the company wants to find if the mean time taken by workers to learn the food processing procedure on this new machine is different than 90 minutes. A sample of 20 workers showed that it took, on average, 85 minutes for them to learn the food processing procedure on the new machine. It is known that the learning times for all workers are normally distributed with a population standard deviation of 7 minutes. Find the p–value for the test that the mean learning time for the food processing procedure on the new machine is different from 90 minutes. What will your conclusion be if α = .01? Example 9-1: Solution Step 1: State the Null and Alternate Hypotheses H0: μ = 90 H1: μ ≠ 90 Step 2: Select the distribution to use The population standard deviation σ is known, the sample size is small (n < 30), but the population distribution is normal. So we will use the normal distribution to find the p–value and make the test. Example 9-1: Solution Step 3: Calculate the p-value The sign in the alternative hypothesis indicates that the test is two-tailed. The p-value is equal to twice the area in the tail of the sampling distribution curve of to the left of 𝑥=85 as shown in the Figure. To find this area, we first find the z value for as follows: 7 1.56524758 minutes n 20 x 85 90 z 3.19 x 1.56524758 x Example 9-1: Solution The area to the left of 𝑥 =85 is equal to the area under the standard normal curve to the left of z =-3.19. From the normal distribution table, the area to the left of z=-3.19 is 0.0007. The curve is symmetric. Hence this same area also lies in the right tail Consequently, the p-value is p-value = 2(.0007) = 0.0014 Figure 9-7 The p-Value for a Two-Tailed Test Example 9-1: Solution Step 4: Make a Decision When the area of the significance level is ≥, the area denoted by the p value we reject the Null. Because α = .01 is greater than the p-value of 0.0014, we reject the null hypothesis at this significance level. Therefore, we conclude that the mean time for learning the food processing procedure on the new machine is different from 90 minutes. Example 9-2 The management of Priority Health Club claims that its members lose an average of 10 pounds or more within the first month after joining the club. A consumer agency wanted to check whether this claim is false. They take a random sample of 36 members of this health club and find that the members lost an average of 9.2 pounds within the first month of membership. The population standard deviation is 2.4 pounds. Find the p–value for this test. What will your decision be if α = .01? What if α = .05? Example 9-2: Solution Step 1: State the Null and Alternate Hypotheses H0: μ ≥ 10 H1: μ < 10 Step 2: Select the distribution to use The population standard deviation σ is known, the sample size is large (n > 30). Due to the Central Limit Theorem, we will use the normal distribution to find the p–value and perform the test. Example 9-2: Solution Step 3: Calculate the p-value The < sign in the alternative hypothesis indicates that the test is left-tailed. The p-value is given by the area to the left of x=-9.2 under the sampling distribution curve of as shown in Figure. To find this area, we first find the z value for as follows: 2.4 x .40 n 36 x 9.2 10 z 2.00 x .40 Example 9-2: Solution The area to the left of 𝑥=-9.2 under the sampling distribution of 𝑥 is equal to the area under the standard normal curve to the left of z=-2.00. From the normal distribution table, the area to the left of z=-2.00 is .0228. Consequently, p-value = 0.0228 Figure 9-8 The p-Value for a Left-Tailed Test Example 9-2: Solution Step 4: Make a Decision When the area of the significance level is ≥ the area denoted by the p value we reject the Null. Since α = .01 is less than the p-value of .0228, we do not reject the null hypothesis at this significance level. Consequently, we conclude that the mean weight lost within the first month of membership by the members of this club is 10 pounds or more. Because α = .05 is greater than the p-value of .0228, we reject the null hypothesis at this significance level. Therefore, we conclude that the mean weight lost within the first month of membership by the members of this club is less than 10 pounds.