Homework Chp 11. Use equations on formula sheet. Page 417 # 5, 6, 8. (Use CI to make a decision). Page 441 # 47, 49, 50. (Use CI to make . . . .) Chp 15, Read 633 bottom, 634 middle. Page 636 # 50 (Do part c to answer part b.) # 51. (Do part c to answer part b.) # 53, 54 (Review) # 47, 48. (Give answer for p-value (see answer to 47 ibob) in relation to the a-level.) Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 1 Hypothesis Testing Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 2 Lesson Objectives Understand the “types of errors” in decision making. Know what the a-level means. Learn how to use “p-values” and confidence intervals for decision making. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 3 Court case Hypothesis: Defendant is innocent. Alternative: Defendant is guilty. Decisions: Reject Innocence Do not Reject Innocence Based on the sample data. Declare “Guilty” Person goes to jail! Declare “Not Guilty” Person goes free! Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 4 Types of Errors in a court case Type I: Sending an innocent person to jail. Type II: Letting a guilty person go free. a = level of risk deemed reasonable for the occurrence of a Type I error. = the point of “reasonable doubt.” Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 5 Types of Errors, in general Type I: Concluding that the hypothesized parameter value is wrong, but in reality it is correct. Type II: Not concluding that the hypothesized parameter value is wrong, but in reality it is incorrect. a = level of risk, chosen by the user, for allowing a Type I error to occur. b = risk for making Type II error. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 6 Potato Chip Inspection by FDA Net weight of potato chip bags should be 16.00 oz. An FDA inspector will take a random sample of 36 bags. If the net weight is too low, the chip company will be fined substantially. From the FDA perspective, what would the Type I and Type II errors be (in words)? Potato Chips; types of errors Type I: Penalizing the potato chip company when in reality they were NOT cheating the consumer. Type II: Not detecting that the potato chip company was cheating the consumers, when in reality they were. Which is more serious, from the FDA’s perspective? Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 8 Selecting an a-level Chose an a-level that considers the consequences of the Type I and Type II errors. a and b are inversely related; as one goes up, the other goes down, but NOT by equal amounts. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 9 Statistical Inference Methods: Reject the hypothesized value if: 1. it is outside the confidence interval. 2. the p-value is less than the user specified a-level. (p-value < a-level) 3. the calculated test statistic value is in the “critical region.” Three methods; each should give the same result. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 10 Decisions are based on the data. Wrong decisions are the result of chance, not mistakes. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 11 (1-a)100% Confidence Interval Method Hypothesized mean: 40.0 Two tailed test; “Is the mean something other than 40.0?” Desired a-level: Size of CI to use: a 1-a .10 .05 .01 .90 .95 .99 a 1 - 2a .10 .05 .01 .80 .90 .98 Result: Each tail has half of a. One tail test; “Is the mean something greater than 40.0?” or “Is the mean something less than 40.0?” Result: Each tail has the full a-level. Use only ONE tail for making a decision. p-Value Method The probability of observing a future statistic value that is as big or more extreme, in the direction(s) of interest, than the value we just observed, assuming that the hypothesized value is the correct parameter. Calculate p-value using the most appropriate distribution. Decision rule: If p-value < a-level, reject the hypothesized value. M34- Hypothesis Testing 13 Department of ISM, University of Alabama, 1992-2003 p-Value: Hypo. mean: 40.0, Two tailed test; p-value / 2 “Is the mean something 2.6 other than 40.0?” -4.0 Upper tail test; “Is the mean something greater than 40.0?” -4.0 Lower tail test; “Is the mean something less than 40.0?” -4.0 Department of ISM, University of Alabama, 1992-2003 -3.0 37.4 -2.0 -1.0 X = 42.6 p-value /2 2.6 40 0.0 42.6 1.0 2.0 3.0 X 4.0 p-value -3.0 -2.0 -1.0 40 0.0 42.6 1.0 2.0 3.0 X 4.0 p-value -3.0 -2.0 -1.0 40 42.6 X M34- Hypothesis Testing 14 0.0 1.0 2.0 3.0 4.0 Problem 1, using p-Value Hypothesized mean: 40.0. Pick a = .05 .5000 Adjust machine if it’s off .4332 .0668 in either direction. X ~ N( ?, 8.0) Also more extreme More extreme n 16 than 3.0 units X ~ N( X ?, X 2.0)than 3.0 units Sample results: 40 43.0 X X = 43.0 What distribution -1.50 0 1.50 Z s = 7.2 should be used? p-value = .0668 •2 43.0 – 40.0 Z= = 1.50 = .1336 2.0 -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 4.0 (p-value =.1336) > (a =.05); do not M34reject 40.0. Hypothesis Testing 15 Department of ISM, University of Alabama, 1992-2003 Problem 1 with Confidence Interval Hypothesized mean: 40.0. Pick a = .05 Adjust machine if it’s off X ± Za/2 in either direction. n X ~ N( ?, 8.0) 43.0 ± 1.96 2.0 n 16 X ~ N( X ?, X 2.0) 43.0 ± 4.92 Sample results: (38.08, 47.92) X = 43.0 s = 7.2 What distribution should be used? 40.0 falls inside the C.I.; do not reject 40.0. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 16 Problem 2, using p-Value Hypothesized mean: 40.0. Pick a = .05 FDA will fine company if the mean is lower. From Excel, X ~ N( ?, ?) .0320 n 16 More extreme than 3.6 units X ~ N( X ?, X ?) below. Sample results: X = 36.4 X 36.4 40 What distribution -2.00 0 t s = 7.2 Fromshould be used? the t-table . . . . 36.4 – 40.0 p-value = more than .025, t= = -2.00 less than .050.. 7.2 / 4 -4.0 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 (p-value =.0320) < (a-level = .05); reject 40.0. M34- Hypothesis Testing Department of ISM, University of Alabama, 1992-2003 4.0 17 Problem 2 with Confidence Interval Hypothesized mean: 40.0. Pick a = .05 FDA will fine company s if the mean is lower. X ± t.05, 15 n X ~ N( ?, ?) 7.2 n 16 36.4 ± 1.753 X ~ N( X ?, X ?) 16 Sample results: 36.4 ± 3.1554 X = 36.4 What distribution s = 7.2 should be used? (33.245, 39.555) 40.0 falls outside the C.I.; reject 40.0. Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 18 Does a person have ESP? Experiment: Two people in different rooms. “A” is shown one of five cards, selected randomly. “A” transmits his thoughts. “B” selects the card he thinks is being sent to him, and records it The process is repeated 20 times; the cards are shuffled each time. X = a count of the number correct. X ~ Bino(n=20, p =.20) Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 19 X = a count of the number correct. X ~ Bino(n=20, p =.20) = np = 4.0 (Cannot use Normal approx.) Hypothesized value: p = .20, a-level = .05 Data: “B” got 9 out 20 correct. Does “B” do better than guessing? Use Binomial Dist. 0.25 P(X = x) p-value = P(X >= 9) = 1 – P(X <= 8) Use = 1 – .9900 Table A.2 = .0100 0.20 Bino(20, 0.20) 0.15 0.10 0.05 0.00 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 X Reject .20; she does better! Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 20 The end Department of ISM, University of Alabama, 1992-2003 M34- Hypothesis Testing 21