1、Chapter 9INTRODUCTION TOHYPOTHESIS TESTINGStatistics for Business(ENV)1Hypothesis Testing9.1Null and Alternative Hypotheses and Errors in Testing9.2z Tests about a Population with known s9.3t Tests about a Population with unknown s2Hypothesis testing-1Researchers usually collect data from a sample a
2、nd then use the sample data to help answer questions about the population. Hypothesis testing is an inferential statistical process that uses limited information from the sample data as to reach a general conclusion about the population.3 A hypothesis test is a formalized procedure that follows a st
3、andard series of operations. In this way, researchers have a standardized method for evaluating the results of their research studies. 4Hypothesis testing-25The basic experimental situation for using hypothesis testing is presented here. It is assumed that the parameter is known for the population b
4、efore treatment. The purpose of the experimentis to determine whether or not the treatment has an effect. Is the population mean after treatment the same as or different from the mean before treatment? A sample is selected from the treated population to help answer this question.Procedures of hypoth
5、esis-testing61. First, we state a hypothesis about a population. Usually the hypothesis concerns the value of a population parameter. For example, we might hypothesize that the mean IQ for UIC students is = 110.2. Next, we obtain a random sample from the population. For example, we might select a ra
6、ndom sample of n = 100 UIC students.3. Finally, we compare the sample data with the hypothesis. If the data are consistent with the hypothesis, we will conclude that the hypothesis is reasonable. But if there is a big discrepancy between the data and the hypothesis, we will decide that the hypothesi
7、s is wrong.Null and Alternative Hypotheses The null hypothesis, denoted H0, is a statement of the basic proposition being tested. It generally represents the status quo (a statement of “no effect” or “no difference”, or a statement of equality) and is not rejected unless there is convincing sample e
8、vidence that it is false. The (scientific or) alternative hypothesis, denoted Ha (or H1) , is an alternative (to the null hypothesis) statement that will be accepted only if there is convincing sample evidence that it is true. These two hypotheses are mutually exclusive and exhaustive.78Determined b
9、y the level of significance or the alpha level9Alpha level of .05 - the probability of rejecting the null hypothesis when it is true is no more than 5%.Z10The locations of the critical region boundaries for three different levels of significance11Example:Alcohol appears to be involved in a variety o
10、f birth defects, including low birth weight and retarded growth. A researcher would like to investigate the effect of prenatal alcohol on birth weight. A random sample of n = 16 pregnant rats is obtained. The mother rats are given daily doses of alcohol. At birth, one pup is selected from each litte
11、r to produce a sample of n = 16 newborn rats. The average weight for the sample is 15 grams. The researcher would like to compare the sample with the general population of rats. It is known that regular newborn rats (not exposed to alcohol) have an average weight of m = 18 grams. The distribution of
12、 weights is normal with sd = 4.12H0 : =18 131. State the hypothesesThe null hypothesis states that exposure to alcohol has no effect on birth weight.The alternative hypothesis states that alcohol exposure does affect birth weight.2. Select the Level of Significance (alpha) levelWe will use an alpha
13、level of .05. That is, we are taking a 5% risk of committing a Type I error, or, the probability of rejecting the null hypothesis when it is true is no more than 5%.3. Set the decision criteria by locating the critical region14Alpha level of .05 - the probability of rejecting the null hypothesis whe
14、n it is true is no more than 5%.Z154. COLLECT DATA and COMPUTE SAMPLE STATISTICSThe sample mean is then converted to a z-score, which is our test statistic.316/41815n/0sXz5. Arrive at a decisionReject the null hypothesis Hypothesis TestingDo not reject nullReject null and accept alternateStep 5: Tak
15、e a sample, arrive at a decisionStep 4: Formulate a decision ruleStep 3: Identify the test statisticStep 2: Select a level of significanceStep 1: State null and alternate hypothesesAlternative Hypothesis H1: A statement that is accepted if H0 is falseWithout “=” signSay, “ 2” or “ 2”Null Hypothesis
16、H0: A statement about the value of a population parameter ( and s s).With “=” signSay, “ = 2” or “ 2”17Three possibilities regarding meansH0: = 0H1: = 0H0: 0H0: 0H1: 0The null hypothesis always contains equality.3 hypotheses about means18a constantMeasures the max probability of rejecting a true nul
17、l hypothesisH0 is actually true but you reject it (false positive).H0 is false but you accept it (false negative).19too highLevel of Significance: the maximum allowable probability of making a type I error Researcher Null Accepts RejectsHypothesis Ho HoHo is trueHo is falseCorrectdecisionType I erro
18、r( a)( Critical zComputed z Critical zOr Computed z Critical z.01.65Do notrejectProbability =.95Region of rejectionProbability=.05Critical valueIf H0: 0 is true, it is very unlikely that the computed z value is so large.2526H0: 0Computed z 1.9631Step 4: ConcludeWe can see that z=1.897 1.96, thus our
19、 test statistic is not in the rejection region. Therefore we fail to reject the null hypothesis. We cannot conclude anything statistically significant from this test, and cannot tell the insurance company whether or not they should be concerned about their current policies.Example One Tailed (Upper
20、Tailed)32Trying to encourage people to stop driving to campus, the university claims that on average it takes people 30 minutes to find a parking space on campus. John does not think it takes so long to find a spot. He calculated the mean time to find a parking space on campus for the last five time
21、s and found it to be 20 minutes. Assuming that the time it takes to find a parking spot is normally distributed, and that the population standard deviation = 6 minutes, perform a hypothesis test with level of significance alpha = 0.10 to see if his claim is correct.Example: One Tailed (Lower Tailed)
22、33Step 1: Set the null and alternative hypothesesExample: One Tailed (Lower Tailed)Step 2: Calculate the test statisticStep 3: Set Rejection RegionLooking at the picture below, we need to put all of alpha in the left tail. Thus,R : Z -1.28 34Example: One Tailed (Lower Tailed)Step 4: ConcludeWe can s
23、ee that z=-3.727 -1.28, thus our test statistic is in the rejection region. Therefore we reject the null hypothesis in favor of the alternative.We conclude that the mean is significantly less than 30, thus John has proven that the mean time to find a parking space is less than 30.35Example: Two Tail
24、edA sample of 40 sales receipts from a grocery store has mean = $137 and population standard deviation = $30.2. Use these values to test whether or not the mean in sales at the grocery store are different from $150 with level of significance alpha = 0.01.Step 1: Set the null and alternative hypothes
25、esStep 2: Calculate the test statistic36Example: Two TailedStep 3: Set Rejection RegionLooking at the picture below, we need to put half of alpha in the left tail, and the other half of alpha in the right tail. Thus, R : Z 2.58 Step 4: ConcludeWe see that Z= -2.722 -2.58, thus our test statistic is
26、in the rejection region. Therefore we reject the null hypothesis in favor of the alternative. We can conclude that the mean is significantly different from $150, thus I have proven that the mean sales at the grocery store is not $150.Example: credit managerLisa, the credit manager, wants to check if
27、 the mean monthly unpaid balance is more than $400. The level of significance she set is .05. A random check of 172 unpaid balances revealed the sample mean to be $407. The population standard deviation is known to be $38. Should Lisa conclude that the population mean is greater than $400, or is it
28、reasonable to assume that the difference of $7 ($407-$400) is due to chance? (at confidence level 0.05)37Step 1H0: $400Step 2The significance level is .05.Step 3 Since s s is known, we can find the test statistic z.Step 4H0 is rejected if z 1.65 (since a a = 0.05)Step 5Make a decision and interpret
29、the results. (Next page)Example: Lisa, the credit manager3842. 217238$400$407$nXzsThe p-value is .0078 for a one-tailed test. (ref to informal ans.)oComputed z of 2.42 Critical z of 1.65, op of .0078 2.353 and t 1.96 or z -1.96 (since a a = 0.05)Step 5Make a decision and interpret the results.(Next
30、page)4944.1365.000.1612.16nsXtoComputed z of 1.44 a a of .05, Do not reject the null hypothesis. The p-value is .1499 for a two-tailed test.Step 5: Make a decision and interpret the results.We cannot conclude the mean is different from 16 ounces.50nsXt/The test statistic is the t distribution.The cr
31、itical value of t is determined by its degrees of freedom which is equal to n-1.51The current rate for producing 5 amp fuses at a Electric Co. is 250 per hour. A new machine has been purchased and installed. According to the supplier, the production rate are normally distributed. A sample of 10 rand
32、omly selected hours from last month revealed that the mean hourly production was 256 units, with a sample s.d. of 6 per hour. At the 0.05 significance level, test if the new machine is faster than the old one?52Step 1 State the null and alternate hypotheses.H0: 250Step 2 Select the level of signific
33、ance. It is .05.Step 3 Since the underlying distribution is normal, s s is unknown, use the t distribution.Step 4 State the decision rule.degrees of freedom = 10 1 = 9 . Reject H0 if t 1.83353162. 3106250256nsXtoComputed t of 3.162 Critical t of 1.833 op of .0058 alpha of .05Reject HoThe p-value is
34、0.0058. (obtained from t, need a software to find it.)Step 5 Make a decision and interpret the results.The mean number of fuses produced is more than 250 per hour.54If the p-value is less than alpha , then reject the null hypothesis. Amount of time UIC students spend in library from survey Mean 41.7
35、2 minutes Standard deviation 40.179 minutes Number of cases 294 National survey finds university library users spend mean of 38 minutes Is population mean for UIC Library users different from national mean?Example: One-sample hypothesis test for mean Null hypothesisH0: = 0 = 38 Alternative or resear
36、ch hypothesisHa: 0 38 Step 1. HypothesesStep 2. Level of significance01.96Do notrejectProbability =.95Region of rejectionProbability=.025Critical value-1.96Region of rejectionProbability=.025Critical value Probability of error in making decision to reject null hypothesis For this test choose = 0.05S
37、tep 3. Test statistic588. 1294/179.403872.41/0nsyt01.96Do notrejectProbability =.95Region of rejectionProbability=.025Critical value-1.96Region of rejectionProbability=.025Critical valuen = 294 so use critical t values from table for infinity. Cannot reject the null hypothesis Cannot conclude that p
38、opulation mean is different from 38 minutes4. Decision 95% confidence Interval in this example:E=1.96*=4.5941.72-4.59, 41.72+4.59 or 37.13, 46.31 Confidence interval for time spent in library is 37.13 46.31 Hypothesized value of 38 minutes falls within confidence interval Therefore we cannot say tha
39、t population mean is not equal to 38 minutes, cannot reject the null hypothesisConfidence interval and hypothesis test for library example For parameters for a single sample One-sample hypothesis test involves comparison with pre-specified value Which is often artificial So confidence interval most
40、appropriate for reporting results For parameters for two samples Difference in parameters is of interest Hypothesis test examines directly Confidence interval less intuitiveUsing confidence intervals or hypothesis testsConfidence interval or Hypothesis test? Hypothesis tests are better when the chie
41、f issue is to make a yes/no decision about whether a pattern exists in a population. Confidence intervals are better when the chief issue is to make a best guess of a population parameter.63When reading a scientific journal, you typically will not be told explicitly that the researcher evaluated the
42、 data using a z-score as a test statistic with an alpha level of .05. Nor will you be told that “the null hypothesis is rejected.” Instead, you will see a statement such as:The treatment with medication had a significant effect on peoples depression scores, z = 3.85, p .05.Let us examine this statem
43、ent piece by piece.First, what is meant by the term significant?In statistical tests, this word indicates that the result is different from whatwould be expected due to chance. A significant result means that the null hypothesis has been rejected. That is, the data are significant because the sample
44、 mean falls in the critical region and is not what we would have expected to obtain if H0 were true.Next, what is the meaning of z = 3.85? The z indicates that a z-score was used as the test statistic to evaluate the sample data and that its value is 3.85.64Finally, what is meant by p .05.In this ca
45、se, we are saying that the obtained result, z= 1.30, is not unusual (not in the critical region) and is relatively likely to occur by chance (the probability is greater than .05). Thus, H0 was not rejected.If the p-Value a, H0 cannot be rejected.If the p-Value 10 The sample is a random sample of som
46、e sort The variable is a discrete interval-scale variable, which is automatically true for population proportions.Survey data on attitudes toward income inequality 1: Hypothesis: let denote the population proportion who favor government intervention to alleviate income inequality. Our null hypothesi
47、s is that the population, on average, neither supports nor opposes government intervention. Ho: = 0.5 The alternate hypothesis is then HA: 0.5Survey data on attitudes toward income inequality 2: Test Statistic: For an n of 1227 respondents, we calculate the following statistics: P = n(yes)/n(total)
48、= 591/1227 = .4817 0= SQRT(o(1- o) = .5 SE= 0 / SQRT(n) = .01427 z= (P - o ) / s.e. . = (.4817 - .500) / .01427 .= -1.282 The z-statistic is the test statistic of interest in a large-sample test of a population proportion.Survey data on attitudes toward income inequality01.96Do notrejectProbability =.95Region of rejectionProbability=.025Critical value-1.96Region of rejectionProbability=.025Critical value3. Pick = 0.05 & determine critical z-1.282Survey data on attitudes toward income inequality 4: Conclusion: Therefore, we do not reject the hypothesis that the population proportion is .5
侵权处理QQ:3464097650--上传资料QQ:3464097650
【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。