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
Stat 216 – Hypothesis Testing Robin R. Rumple October 30, 2006 The underlying goal throughout statistics is to make a correct inference about some population of interest. Another way to do this, besides point and interval estimation, is hypothesis testing. Here is a summary describing the various parts of this method of statistical inference. Enjoy. 1 Background The goal of hypothesis testing is to “assess evidence provided by [some] data in favor of some claim about the population [of interest]” (McCabe 400). With the synonymous term “tests of significance”, hypothesis testing has the synonymous goal to make an attempt, with sample data, to “distinguish between results that can easily occur and results that are highly unlikely” (Triola 366). 2 Hypotheses First, some claim must be made about the population. Once it has been identified, then the null hypothesis and alternative hypothesis can be stated. • Null Hypothesis H0 : This statement must contain equality between a parameter of interest, and a particular value. Here, since the problems of interest surround the population mean µ, notation for the particular value is µ0 . Once performing the hypothesis test, we perform under the assumption that H0 is true, then decide to either reject, or fail to reject H0 . When forming the null hypothesis, it is usually a statement of “’no effect’ or ’no difference’” (McCabe 403). The “mathlige” of the null hypothesis is (for population mean) µ = µ0 . • Alternative Hypothesis Ha : This statement must be true if the null hypothesis is false. Typically, “the alternative hypothesis should express the hopes or suspicions we bring to the data” (McCabe 403). The “mathlige” of the alternative hypothesis is (for population mean) µ < µ0 or µ > µ0 or µ 6= µ0 . The alternative hypothesis can either be one-sided or two-sided. It is important to know whether a one-sided or two-sided alternative hypothesis is being utilized, because that will affect the calculations. 3 Significance Level Before the hypothesis test begins, a significance level α must be stated. The significance level “is a fixed value that we regard as decisive” (McCabe 406). Namely, α “is an amount [as to] how much evidence against H0 we require to reject H0 ” (McCabe 406). For instance, “if we choose α = 0.05, we are requiring that the data give evidence against H0 so strong that it would happen no more than 5% of the time when H0 is true” (McCabe 406). Common choices for α are α = 0.10, α = 0.05 and α = 0.01. When no α is stated, choose α = 0.05. 1 4 Test Statistic The test statistic z is a “value computed from the sample data that is used in making the decision about the rejection of the null hypothesis” (Triola 371). This is computed assuming H0 is true. Thus, we can “gauge whether the discrepancy between the sample and the claim is significant” (Triola 371). The general formula for z (in relation to population mean) is z= x̄ − µ0 x̄ − µ0 = . √σ σx̄ n The test statistic is used to compute the P -value. 5 P-Value & Decision A P -value can be computed to aid in the decision about a hypothesis test. Comparison of the P -value and stated α lends the decision of the hypothesis test – “reject”, or “do not reject” the null hypothesis. The P-value is “the probability, assuming H0 is true, that the test statistic z will weigh against H0 at least as strongly as it does for the current sample data” (McCabe 407). With comparison to the stated α value: if P − value ≤ α, reject H0 ; if P − value > α, do not reject H0 . 6 Conclusion of the Hypothesis Test The first thing to recognize with all of this is that nothing is proven. We only make a conclusion via sample data. With that said, it is most respected to word the conclusion of your hypothesis test as: • If our testing procedure lends that we essentially accept H0 , then the conclusion is Do not reject the null hypothesis. There is not sufficient evidence for the alternative hypothesis (written in the context of the problem, of course). • Otherwise, if the testing procedure lends acceptance of Ha , then the conclusion is Reject the null hypothesis. There is sufficient evidence for the alternative hypothesis (again, written in the context of the problem). Again, refrain from making any absolute statement. We are still trying to make a statistical inference via sample data. As shown below, there is always a chance that our conclusion is incorrect. 7 Error Here is a taste of a major part of statistics – minimizing error. All calculations may be done correctly, but there is a chance that the conclusion is just plain wrong. Here are the two types of errors in hypothesis testing: • Type I Error, P(Type I Error)=α: This is the one type of error we can control, because type I error is stated before calculations begin. Type I error is the probability that we reject H0 , when in fact H0 is true. • Type II Error, P(Type II Error)=β: On the flip side, type II error is the probability that we do not reject H0 , when in fact H0 is false. This type of error we cannot control. With its relation to Power, maximizing Power will minimize type II error. The relationship between type II error and Power is P ower = 1 − β. 8 Power In the world of hypothesis testing, Power is good. Power is the probability of rejecting H0 when Ha is true. It is the probability of rejecting the null hypothesis when the alternative hypothesis is true. Maximizing power will lend confidence with conclusions drawn from a hypothesis test. 2 9 Example Here is an arbitrary hypothesis testing problem: When 70 convicted embezzlers were randomly selected, the mean length of prison sentence was found to be 22.1 months and the standard deviation was found to be 8.6 months (based on data from the U.S. Department of Justice). Kim Patterson is running for political office on a platform of tougher treatment of convicted criminals. Test her claim that prison terms for convicted embezzlers have a mean of less than 2 years. Use a 0.01 significance level. First let’s state our null and alternative hypotheses: H0 : µ = 24 Ha : µ < 24. We use µ0 = 24 to keep the units consistent. Now we can compute the test statistic x̄ − µ0 σX̄ 22.1 − 24 z= z= 8.6 √ 70 z = −1.84. Let’s compute the P value and compare it to our α. With the direction of Ha , P − value = P (Z < −1.84) P − value = 0.0328 With our P -value larger than our claimed α, 0.0328 > 0.01, our decision is do not reject H0 . Hence, our conclusion is: There is not sufficient evidence to warrant the claim that prison terms for convicted embezzlers has a mean of less than 2 years. 10 Conclusion There are many pieces surrounding Hypothesis Testing. The goal of this document is to help solidify the concepts. Hope this helps! References [1] McCabe, George W. and David S. Moore. Introduction to the Practice of Statistics. W.H. Freeman, New York: 2006. [2] Parker, Becky. Discussion. 28 October 2006. [3] Triola, Mario F. Elementary Statistics. Addison-Wesley, Boston: 2001. 3