 Скачать презентацию Chapter 9 Hypothesis Testing Population Mean and Proportion

8d7e5f6c53a6893275304e9188c72bfa.ppt

• Количество слайдов: 52 Chapter 9 Hypothesis Testing: Population Mean and Proportion 1 Chapter 9 - Learning Objectives • Conduct a HYPOTHESIS TEST for a SINGLE population MEAN or PROPORTION. 1. Describe the logic of developing the null and alternative hypotheses. 2. Describe what is meant by Type I and Type II errors. 3. Test a hypothesis about population mean, when variance of the population is known 4. Test a hypothesis about population mean, when variance of the population is unknown 5. Test a hypothesis about population proportion 6. Explain the relationship between confidence intervals and hypothesis tests. Introduction o Hypothesis: n A belief/presumption/claim/assertion about something which can be rejected or accepted. n A statement that could be accepted or refuted subject to the presence or lack of enough statistical evidence (data). 3 Introduction Hypothesis Testing n Is a general procedure of making inference about population parameter. n The main purpose of hypothesis testing is to determine whethere is enough statistical evidence in favor of a certain belief about a parameter. n Enables us to determine whether the belief about the population parameter is supported by the data (evidence). 4 Introduction Examples n Developing a drug requires some minimum level of efficacy. n In a random sample of patients (half of whom are treated with a particular drug and the other half are given a placebo), is there enough evidence that support the belief that the drug is effective in curing a certain disease? 5 Introduction Examples n Entrepreneurs who develop new products want to know what proportion of potential customers could buy their products. Consider that a purchase of the product by 10% of the consumers is the minimum threshold. n In a random sample of potential customers, is there enough statistical evidence that support the view that more than 10% of the potential customers will purchase a new products? 6 Introduction n Answering these kind of day to day real world problems involve testing the available wisdom/belief (hypothesis). n If sufficient statistical evidence is not available, implementation of a new idea, product and policy is difficult. 7 Introduction o Two Types of Hypothesis: 1. The Null hypothesis (H 0) o The belief or statement about something o It is what is typical of the population. It is a term that represents the “business as usual” idea, where nothing out of the ordinary occurs. 2. The Alternative Hypothesis (H 1) o The alternative to the belief/statement o It is what is being considered as the challenge to the existing idea. The view of about the population characteristic, that if it true, would trigger some new action, some change in procedures that had previously defined “business as usual. ” 8 The Null Hypothesis: Note • Non Directional, two-tail test: n The alternative is formulated in such a way that the response is non-directional (could be greater or lower). o Directional (One tailed test) n The alternative to the null hypothesis is specified in such a way that it is greater than what is stated in the null ( right-tailed test) n The alternative to the null is specified in such a way that it is lower than what is sated in the null ( lefttailed test) Introduction Example A person is accused of committing a crime. n n Plaintiffs/Prosecutors bring the case to a court. Jury is selected and evidence is presented. n Based on the evidence, not the accusation, jurors either convict or acquit the person. o When the trial begins: n What would the jurors are expected to presume about the defendant? n What would the plaintiff/prosecutors want the jurors to believe? n What would the plaintiff/prosecutors need to provide to the jury? 10 Example-1 o Two Types of Hypothesis: 1. H 0: The defendant is innocent (Business as usual) 2. H 1: The defendant is guilty as charged 11 Example-2 o Two Types of Hypothesis: 1. H 0: The new drug is not effective (Business as usual) 2. H 1: The new drug is effective (challenge to the business as usual view) 12 Introduction o Jury decision 1. Convict the Defendant: n Find the defendant GUILTY. I. e. , there is enough evidence to support the claim. n 2. Rejecting the null hypothesis H 0 Acquit the defendant: n Find the defendant NOT GUILTY as charged. I. e. , No sufficient evidence is presented. n Fail to reject the null hypothesis H 0 13 Two Potential Errors While Testing Hypothesis State of Reality H 0 True Test Result Says H 0 False H 0 is True No error Type II error: b H 0 is False Type I error: a No error Introduction Two Types of Errors while hypothesis testing: 1. Type-I error (a. ): Rejecting a true null hypothesis. The probability of rejecting a true null hypothesis is also called significance level. n 2. Type-II error (β): Failing to reject a False null hypothesis. β represents, the probability of failing to reject a false null hypothesis n o Wrongly convicting an innocent person Acquitting a guilty defendant. Note that the two are inversely related. Minimizing one will lead to the maximization of the other error. 15 9. 2 Hypothesis Testing in practice o Example: n Three highway patrol officers were assigned to check whether the average speed of cars traveling on certain stretch of a highway matches the posted limit of 55 mph. n One officer claims that on the average the speed at which cars travel on the stretch is greater than the posted limit of 55 mph. 16 9. 2 Hypothesis Testing in practice o Example: n Three highway patrol officers were assigned to check whether the average speed of cars traveling on certain stretch of a highway matches the posted limit of 55 mph. n The other officer claims the contrary: The speed at which cars travel on the stretch is less than the posted limit of 55 mph. 17 9. 2 Hypothesis Testing in practice o Example: n Three highway patrol officers were assigned to check whether the average speed of cars traveling on certain stretch of a highway matches the posted limit of 55 mph. n The third officer claims that on the average the speed at which cars travel on the stretch is different from the posted limit of 55 mph. 18 9. 2 Hypothesis Testing in practice o Example: n To test these claims a random sample of 200 cars traveling over the same stretch of highway was taken. Results from the sample indicate the average speed of cars travelling on the stretch of the highway is 56 mph. It is known that the standard deviation for the entire population of cars traveling over the stretch is just 5 mph. n At 5% level of significance, test if each of the officers’ claims can be supported by enough statistical evidence. 19 9. 2 Hypothesis Testing in practice Developing a Hypothesis: n We want to know whether the mean speed of cars traveling on the highway is greater than 55 as stated by the second officer. n As he trusts his officers, the sheriff wants to maintain each of the officers claim. However, he needs to know if there is sufficient information (evidence) to support either of the claims. 20 9. 2 Hypothesis Testing in practice o Step-1: Determine the null and the alternative hypothesizes. o In the null hypothesis, always we should specify a single value of the population parameter (in this case, the average speed of all cars traveling on the stretch, m). H 0 : m = 55 21 9. 2 Hypothesis Testing in practice o Step-1: Determine the null and the alternative hypothesizes. o In the alternative hypothesis, we state the belief we want to maintain (in this case, officer’s claim) provided that there is sufficient information that enables us to reject the null. H 0 : m = 55 H 1 : m > 55 22 9. 2 Hypothesis Testing in practice n H 0: µ=55 n H 1: µ>55 n N=200; Sample mean=56; Std. Deviation=5; a=0. 05 23 Approaches to Testing o There are two methods (approaches) to determine (test) whether or not there is enough information in the sample to support the hypothesis we want to maintain [i. e. , alternative hypothesis (H 1)]. 1. The (Critical Value or Rejection region method). 2. The p-value method. 24 The Rejection Region Method This is a method in which we establish range of values (critical value) such that if the test statistic falls into the region, we reject the null hypothesis in favor of the alternative hypothesis. 25 The Rejection Region Method – for a Right - Tail Test Reject H 0 here Critical value of the sample mean • If the sample mean lies in the rejection region, then t sufficient (enough) evidence to support the altern claim(H 1). That is, to reject the null(H 0) 26 Step-2: Compute the Test Statistic n If information about population SD is available, and the distribution of the population is considered normal, then the test statistic is estimated as follows 27 The standardized test statistic n Using the information from the sample, we calculate the standardized test statistic as follows 28 Step-3: Establish the Critical Value n Establish the critical value (rejection region), the value based on which we want to say “ yes, there is sufficient information to support the hypothesis that we want to keep: H 0 : m = 55 H 1 : m > 55 29 Step-3: Establish the Critical Value n To establish the critical value, we must first determine the acceptable margin of error (the error that we are will to take in making the decision). n In our case, it was 5% 30 Step-3: Establish the Critical Value n For the 5%(one sided) margin of error, the critical value is 1. 645 31 Step-4: Compare the Test statistic with Established Critical value n Compare the test statistic with established critical value, and make the appropriate decision 32 Step-4: The Rejection Region Method. Compare the Test statistic with Established Critical value n Reject H 0 if Decision Rule: Reject the null hypothesis in favor of the alternative if the calculated value of Z is greater than the critical value (Z at the chosen level of significance) 33 n Using the information from the sample, we computed the test statistic to be 34 Conclusion o The calculated value of Z (2. 83) is greater than the critical value(1. 645). Thus we reject the null hypothesis. 35 Step-5: Make a Conclusion n If the computed sample mean falls in the rejection region, then we reject the null hypothesis. If we do so, it means that… there is sufficient evidence that supports the idea we want to maintain (the one stated in the alternative hypothesis). n Thus we can say that the officer’s claim that on average people are driving above the speed limit is valid. 36 Repeat the procedure for each of the other officer’s claim as well o In each case formulate the null and the alternative; decide on the level of significance (margin of error) at which you want to test the hypothesis o Compute the test statistic and the critical values o Make business decision (reject or fail to reject the null hypothesis and indicate the implication 37 The P value method n As an alternative to testing a hypothesis using the rejection region method, we can also use the pvalue method. n The p-value provides information about the amount of statistical evidence that supports the alternative hypothesis. 38 The p-value Method What is P-Value? It is the probability that we reject the null hypothesis when it is true. In other words, it is a method in which we test the probability of observing a test statistic at least as extreme as the one computed, given that the null hypothesis is true. 39 The p-value Method Decision Rule when using the p-value method: Reject the null hypothesis (H 0) only if the P-Value is LESS THAN the level of significance (a). 40 10. 2 Hypothesis Testing in practice o Example: n In a a random sample of 200 cars traveling over the same stretch of high way, the average speed of cars is found to be 56 mph. It is known that the standard deviation for the entire population of cars traveling over the stretch is just 5 mph, and the posted speed limit is 55 mph. n At 5% level of significance, using the p-value method test if cars are traveling faster than the speed limit. 41 The p-value Method To use the p-value method: 1. 2. 3. Formulate the null and alternative hypothesis Compute the test statistic (Z calculated) Depending up on H 1, find the P(Z>Zcal) P-Value= P(Z>2. 83)= 0. 500 -p(0 The p-value Method Decision P-value(0. 0023) < 0. 05 (significance level). So we reject the null hypothesis. What does 0. 0023 mean? 43 Hands-On-Problem o In the past, patrons of a cinema complex have spent an average of \$2. 50 for popcorn and other snacks, with a standard deviation of \$0. 90. o It is known that the amount of expenditure is normally distributed. After an intensive public campaign about the health effects of popcorn, the mean expenditure of a sample of 18 patrons is found to be \$2. 10. o At 5% significance level, test if this recent experience suggest a decline in spending? 44 Hands-On-Problem o Formulate the null and the alternative hypothesizes for the problem. o Establish and the critical values in terms of the standardized (Z) values and test the hypothesis using the rejection region method. o Compute the P-Value and test hypothesis using the pvalue method. o Interpret your results. 45 Hands-On-Problem o Using the rejection Region Method o Formulate the Null and Alternative Hypothesis: o o H 0: µ=2. 50 H 1: µ <2. 50 o Z cal (test statistic)= o Z table =Z 0. 05=-1. 645 Decision: |Z cal| > |Z table|: Thus reject H 0. Conclusion: There is enough evidence that supports the view that the public campaign has worked effectively (The campaign has resulted in reduced consumption of Pop Corn) 46 Hands-On-Problem o Using the p-Value method: o o H 0: µ=2. 50 H 1: µ <2. 50 o Z cal (test statistic)= o o P(Z<-1. 89)= P(Z>1. 89): 0. 5000 -0. 4706= 0. 0294 Level of significance is 0. 05 Decision: P value=0. 0294 < =0. 05. Thus reject H 0. Conclusion: There is enough evidence that supports the view that the public campaign has worked effectively (Has resulted in reduced consumption of Pop Corn) 47 Testing Proportions o We apply the same procedure we used the previous examples. o However, it is important to note the following when testing the proportions. 1. We apply only the Z distribution when testing sample proportion 2. To apply the Z test np>5 and n(1 -p)>5 3. Both rejection region and p-value method can be used to test hypothesis about proportions 49 Interpreting the p-value n If the p-value is less than 1%, there is evidence that supports the alternative hypothesis. (at the significance level of 1% or more): Overwhelming n If the p-value is between 1% and 5%, there is a evidence that supports the alternative hypothesis (at 5% or more significance level): Strong n If the p-value is between 5% and 10% there is a evidence that supports the alternative hypothesis. (at 10% ore more): Weak n If the p-value exceeds 10%, there is no evidence that supports the alternative hypothesis, unless we choose a margin of error that exceeds 10% 50 Testing Proportions o Example: n An auto repair shop owner claims that no less than 70% of his customers are satisfied with his work. However, a survey of 150 customers reveals that only 66% are satisfied with the work performed. At 5% level of significance, can we conclude that less than 70% of the customers are satisfied? 51 Testing a Hypothesis about the mean of the population-- Variance of the population is unknown o We follow similar procedure that we have used in testing a hypothesis about the mean when variance of the population is known, except that we use a t-distribution instead of a Zdistribution Steps to solve such a Problem 1. Formulate the null and the alternative hypothesizes. 2. Establish the test statistic (calculated t) using the information from the sample and the critical value (table value of t) at the n-1 degrees of freedom and selected level of significance 3. If using the rejection region method, compare the calculated t with the critical value of t, and reject the null hypothesis if the calculated value is greater than the table value. 4. If using the P-Value method, compute the p-value using the test statistic and reject the null hypothesis if the p-value is less than the significance level selected. 5. Make the appropriate inference depending up on the results from the test. 54 