OMS 201 Hypothesis testing Determining whether a statement about a population parameter is correct Hypothesis testing can take on three forms: Remember, we can conclude to: HO: = 0 HA: 0 Reject the null hypothesis (Reject HO) Do not reject the null hypothesis (Do Not Reject HO) HO: 0 HA: < 0 HO: 0 HA: > 0 5 steps in Hypothesis testing: 1. 2. 3. 4. 5. State the hypotheses (both the null and alternative) and set up the rejection region on the normal curve State the level of significance and the Z critical value (good time to also indicate sample: mean, size, & standard deviation) State the test statistic and the P-value State the decision rule (when do you reject HO ?) State the conclusion Some formulas to live by: x z x n x / n x z / 2 x t / 2 z s n x s/ n x z / 2 n s n Hypothesis Testing Notes p s n t x / n 0 z p(1 p) n x z p z / 2 p p0 p p(1 p ) n t x s/ n 0 1 Case 1. Sample size is large. Hypotheses: Upper tail test! Rejection region is always based on HA: HO: HA: > Level of Significance & sample data: X-bar = 16.5 n = 40 =7 = .02 (98% level of significance) Z2.05 (look up .48 in normal table) Test Statistic: z x / n Z = (16.5 – 15)/(7 / 6.32) Z = 1.35 P-Value: probability that we use to determine if we can reject the null hypothesis. It is the probability of observing a result (such as X-bar) at least as unlikely as what is actually observed. To calculate the p-value, calculate the probability of the area of the Z test statistic in rejection region. In this example, the p-value would be the probability of observing a sample mean of greater than or equal to 16.5. Rejection Region P-Value: Calculate the area for the Z test statistic score of 1.35: P(Z > 1.35) = .5 - .4115 = .0885 1.35 2.05 Once you have the p-value, compare it to . This will determine if the null hypothesis can be rejected. Decision Rule: Reject HO: if Z Test Statistic >ZOR: Reject HO: if the p-value is < Conclusion: Z= 2.05 Z test statistic = 1.35. Do NOT reject HO: p-value = .0885 = .02. Do Not Reject HO: since p-value is greater than . Hypothesis Testing Notes 2 Hypotheses: H O: HA: < Lower tail test: rejection region is always based on HA: Level of Significance & sample data: X-bar = 2.92 s = .18 n = 36 = .05 Z = -1.645 (look up .45 in normal table) (negative value because it is in lower/left tail) z Test Statistic: x s/ n Z = (2.92 – 3) / (.18 / 6) Z= -2.67 P(Z < -2.67) = .5 – .4962 = .0038 p-value: Decision Rule: Reject HO: if Z Test Statistic < Z OR: Reject HO: if the p-value is < Conclusion: Since –2.67 < -1.645, Reject Ho: Since p-value .0038 < .05, Reject Ho: Rejection region is set up in both tails Hypotheses: (Two Tail Test) HO: = HA: Level of Significance & sample data: X-bar = 278.5 = .12 n = 36 = .05 Z = 1.96 (look up .475 in table .05/2 = .025 and .5-.025 = .475) Test Statistic: p-value: Decision Rule: z x / n Z = (278.5 – 280) / (.12 / 6) Z= -.75 P(Z < -.75) = .5 – .2734 = ..2266 – only one tail so: (.2266 * 2) = .4532 Reject HO: if Z Test Statistic < -ZOR Reject HO: if Z Test Statistic is > Z OR: Reject HO: (p-value*2) < Hypothesis Testing Notes Conclusion: Since –.75 is greater than -1.96, Do Not Reject Ho: Since p-value .4532 greater than .05, Do Not Reject Ho: 3 A Two-tail test can also calculate a confidence level to determine if the null hypothesis can be rejected: Hypotheses: (Two Tail Test) HO: = HA: Level of Significance & sample data: X-bar = 278.5 = .12 n = 36 = .05 Z = 1.96 (look up .475 in table .05/2 = .025 and .5-.025 = .475) Confidence Intervals: x z / 2 x z / 2 n 278.5 1.96 (12/6)= s n 278.5 3.92 = 274.58 to 282.42 Decision Rule: Do NOT Reject Ho: if the population parameter is within the interval. Conclusion: Since = 280 falls within the interval, we can NOT reject Ho: Case 2. n < 30 Normal distribution is assumed and s is used for . Additionally, we will use the t-distribution. Level of significance t with Test Statistics: t x / n n-1 degrees of freedom 0 t x s/ n 0 Decision Rules: HO: = 0 HA: 0 HO: 0 HA: < 0 HO: 0 HA: > 0 Reject: t < -t critical value or t > t critical value or p-value < Reject: t < -t critical value or p-value < Reject: t > t critical value or p-value < p-values: in the t-distribution, we do not have exact values, so we will use a range. t-distribution gives the area in the upper tail. Hypothesis Testing Notes 4 Hypotheses: H O: HA: > Level of Significance & sample data: X-bar = 7.75 s = 1.215 n = 12 = .05 t = 1.796 (.05 with 11 degrees of freedom) Test Statistic: t x s/ n t = (7.75 – 7) / (1.215 / 3.46) 0 t = 2.14 p-value: the following areas for 11 (n-1) degrees of freedom Area t-value .1 1.363 .05 1.796 .025 2.201 .01 2.718 .005 3.106 2.14 is between .025 and .05 Conclusion: Decision Rule: Reject HO: if t Test Statistic > t OR: Reject HO: if the p-value is < Since 2.14 > 1.796, Reject Ho: Since p-value is < .05, Reject Ho: In a two tail test: make sure to multiply the p-value by 2! Case 3. Population Proportion State the Hypotheses: HO: p = P0 HA: p P0 HO: p P0 HA: p < P0 HO: p P0 HA: p > P0 State the Test Statistic and p-value: z p p0 p (p-values are calculated the same as before) Decision Rules: HO: p = P0 HA: p P0 HO: p P0 HA: p < P0 HO: p P0 HA: p > P0 Reject: z < -z critical value or z > z critical value or p-value < Reject: z < -z critical value or p-value < Reject: z > z critical value or p-value < Hypothesis Testing Notes 5 Hypothesis Testing Notes 6