Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Econ 240A Power 6. 2 The Challenger Disaster l sjoly/RB-intro.html sjoly/RB-intro.html.

Similar presentations


Presentation on theme: "1 Econ 240A Power 6. 2 The Challenger Disaster l sjoly/RB-intro.html sjoly/RB-intro.html."— Presentation transcript:

1 1 Econ 240A Power 6

2 2 The Challenger Disaster l http://onlineethics.org/moral/boi sjoly/RB-intro.html http://onlineethics.org/moral/boi sjoly/RB-intro.html

3 3 The Challenger l The issue is whether o-ring failure on prior 24 prior launches is temperature dependent l They were considering launching Challenger at about 32 degrees l What were the temperatures of prior launches?

4 4 Challenger Launch Only 4 launches Between 50 and 64 degrees

5 5 Challenger l Divide the data into two groups 12 low temperature launches, 53- 70 degrees 12 high temperature launches, 70- 81 degrees

6 TemperatureO-Ring Failure 53Yes 57Yes 58Yes 63Yes 66No 67NO 67No 67No 68No 69No 70No 70Yes

7 TemperatureO-Ring Failure 70Yes 70No 72No 73No 75Yes 75No 76No 76No 78No 79No 80No 81No

8 8 Probability of O-Ring Failure Conditional On Temperature, P/T l P/T=#of Yeses/# of Launches at low temperature P/T=#of O-Ring Failures/# of Launches at low temperature Pˆ = k(low)/n(low) = 5/12 = 0.41 l P/T=#of Yeses/# of Launches at high temperature Pˆ = k(high)/n(high) = 2/12 = 0.17

9 9 Are these two rates significantly different? l Dispersion: p*(1-p)/n Low: [p*(1-p)/n] 1/2 = [0.41*0.59/12] 1/2 =0.14 High: [p*(1-p)/n] 1/2 = [0.17*0.83/12] 1/2 =0.11 l So.41 -.17 =.24 is 1.7 to 2.2 standard deviations apart? Is that enough to be statistically significant?

10 10 Interval Estimation and Hypothesis Testing

11 11 Outline l Interval Estimation l Hypothesis Testing l Decision Theory

12 12

13 13

14 14 The Field Poll, 10-7-’04 l In a sample of approximately 1135 likely voters, 48% indicate they will vote for Senator Boxer Vs. 32% for Jones l If the poll is an accurate reflection or subset of the population of voters Nov. 2, what is the expected proportion that will vote for Boxer? l How much uncertainty is in that expectation? Power 4

15 15

16 Field Poll l The estimated proportion, from the sample, that will vote for Boxer is: l where is 0.48 or 48% l k is the number of “successes”, the number of people sampled who are for Boxer, approximately 545 l n is the size of the sample, 1135 Power 4

17 Field Poll l What is the expected proportion of voters Nov. 2 that will vote for Boxer? l = E(k)/n = np/n = p, where from the binomial distribution, E(k) = np l So if the sample is representative of voters and their preferences, 48% should vote for Boxer in three weeks. Power 4

18 Field Poll l How much dispersion is in this estimate, i.e. as reported in newspapers, what is the margin of sampling error? l The margin of sampling error is calculated as the standard deviation or square root of the variance in l = VAR(k)/n 2 = np(1-p)/n 2 =p(1- p)/n l and using 0.48 as an estimate of p, l = 0.48*0.52/1135 =0.00022 Power 4

19 19 Interval Estimation l Based on the Poll of 48% for Boxer, what was the probability that the fraction, p, voting for Boxer would exceed 50%, i.e. lie between 0.5 and 1.0? l The standardized normal variate, z =

20 20 Interval estimation l Why can we use the normal distribution? l Where does the formula for z come from?

21 Solving for p:.015*z = 0.48 - p p = 0.48 -.015*z and substituting for p: and subtracting 0.48 from each of the 3 parts of this inequality:

22 And dividing by –0.015, which changes the signs of the inequality: And using the standardized normal distribution, this probability equals ….0.5

23 0 -34.7

24 0

25 Solving for p:.015*z = 0.48 - p p = 0.48 -.015*z and substituting for p: and subtracting 0.48 from each of the 3 parts of this inequality:

26 And dividing by –0.015, which changes the signs of the inequality: And using the standardized normal distribution, this probability equals ….0.092

27 -1.33 -34.7

28 -1.33 -34.7

29 29 So a Z value of 1.33 leads to an area of 0.408, leaving 0.092 in the Upper tail

30 30 Interval Estimation l The conventional approach is to choose a probability for the interval such as 95% or 99%

31 31 So z values of -1.96 and 1.96 leave 2.5% in each tail

32 -1.96 2.5% 1.96

33 Substituting for z And multiplying all three parts of the inequality by 0.015

34 And subtracting 0.48 from all three parts of the inequality And multiplying by -1, which changes the signs of the inequality: So a 95% confidence interval based on the poll, predicted a vote for Boxer of between 45% and 51%, an inference about the unknown parameter p. Z values of -2.575 and 2.575 leave 1/2% in each tail. You might calculate a 99% confidence interval for the poll.

35 35 http://www.sfgate.com/election/races/2003/10/07/map.shtml Two Californias

36 36 Interval Estimation l Sample mean example: Monthly Rate of Return, UC Stock Index Fund, Sept. 1995 - Aug. 2004 number of observations: 108 sample mean: 0.842 sample standard deviation: 4.29 Student’s t-statistic degrees of freedom: 107

37 Sample Mean 0.842

38 38 Appendix B Table 4 p. B-9 2.5 % in the upper tail

39 39 Interval Estimation l 95% confidence interval l substituting for t

40 40 Interval Estimation l Multiplying all 3 parts of the inequality by 0.413 l subtracting.842 from all 3 parts of the inequality,

41 41 Interval Estimation An Inference about E(r) l And multiplying all 3 parts of the inequality by -1, which changes the sign of the inequality l So, the population annual rate of return on the UC Stock index lies between 19.9% and 0.2% with probability 0.95, assuming this rate is not time varying

42 42 Hypothesis Testing

43 43 Hypothesis Testing: 4 Steps l Formulate all the hypotheses l Identify a test statistic l If the null hypothesis were true, what is the probability of getting a test statistic this large? l Compare this probability to a chosen critical level of significance, e.g. 5%

44 44 Hypothesis Test Example l Field Poll on Boxer a l Step #1: null, i.e. the maintained, hypothesis: true proportion for Boxer is 50% H 0 : p = 0.5; the alternative hypothesis is that the true population proportion supporting Boxer is greater than 50%, H a : p>0.5

45 45 Hypothesis Test Example l Step #2: test statistic: standardized normal variate z l Step #3: Critical level for rejecting the null hypothesis: e.g. 5% in upper tail; alternative 1% in upper tail

46 46

47 6 1.645 5 % upper tail Sample statistic Step #4: compare the probability for the test statistic(z= -1.33) to the chosen critical level(z=1.645)

48 48 Hypothesis Test Example l So, since –1.33 is not above the critical value of 1.645, I.e. not extreme and not in the upper tail, do not reject the null hypothesis that p=0.5. l In terms of common sense, the sample proportion of 0.48 means p=0.5 is more likely than the alternative of p>0.5.

49 49 l Also recall the 95% confidence interval on p which was between 0.45 and 0.51, including the null that p= 0.5.

50 And subtracting 0.48 from all three parts of the inequality And multiplying by -1, which changes the signs of the inequality: So a 95% confidence interval based on the poll, predicted a vote for Boxer of between 45% and 51%, an inference about the unknown parameter p. Z values of -2.575 and 2.575 leave 1/2% in each tail. You might calculate a 99% confidence interval for the poll.

51 51 Decision Theory

52 l Inference about unknown population parameters from calculated sample statistics are informed guesses. So it is possible to make mistakes. The objective is to follow a process that minimizes the expected cost of those mistakes. l Types of errors involved in accepting or rejecting the null hypothesis depends on the true state of nature which we do not know at the time we are making guesses about it.

53 Decision Theory l For example, consider the Field poll of Oct. 7, and the null hypothesis that the proportion that would vote for Boxer in three weeks was 0.5, i.e. p = 0.5. The alternative hypothesis was that this proportion was greater than 0.5, p > 0.5. Now, no one knows which was right, but guesses could be made based on the poll.

54 Decision Theory l If we accept the null hypothesis when it is true, there is no error. If we reject the null hypothesis when it is false there is no error.

55 55 Decision theory l If we reject the null hypothesis when it is true, we commit a type I error. If we accept the null when it is false, we commit a type II error.

56 Decision Accept null Reject null True State of Nature p = 0.5P > 0.5 No Error Type I error No Error Type II error

57 Decision Theory The size of the type I error is the significance level or probability of making a type I error,  The size of the type II error is the probability of making a type II error, 

58 58 Decision Theory We could choose to make the size of the type I error smaller by reducing  for example from 5 % to 1 %. But, then what would that do to the type II error?

59 Decision Accept null Reject null True State of Nature p = 0.5P > 0.5 No Error 1 -  Type I error  No Error 1 -  Type II error 

60 Decision Theory l There is a tradeoff between the size of the type I error and the type II error.

61 61 Decision Theory l This tradeoff depends on the true state of nature, the value of the population parameter we are guessing about. To demonstrate this tradeoff, we need to play what if games about this unknown population parameter.

62 62 What is at stake? l Suppose you are in Boxer’s camp. l What does the Boxer camp want to believe about the true population proportion p? they want to reject the null hypothesis, p=0.5 they want to accept the alternative hypothesis, p>0.5

63 Cost of Type I and Type II Errors l The best thing for the Boxer camp is to lean the other way from what they want l The cost to them of a type I error, rejecting the null when it is true is high. They might relax at the wrong time. l Expected Cost E(C) = C high (type I error)*P(type I error) + C low (type II error)*P(type II error)

64 64 Costs in Boxer’s Camp l Expected Cost E(C) = C high (type I error)*P(type I error) + C low (type II error)*P(type II error) E(C) = C high (type I error)*  C low (type II error)*  l Recommended Action: make probability of type I error small, i.e. don’t be eager to reject the null

65 Decision Accept null Reject null True State of Nature p = 0.5P > 0.5 No Error 1 -  Type I error  C(I) No Error 1 -  Type II error  C(II) E[C] = C(I)*  + C(II)*  Boxer: C(I) is large so make  small

66 66 How About Costs to the Jones Camp ? l What do they want? l They do not want to reject the null, p=0.5 l The Jones camp should lean against what they want l The cost of accepting the null when it is false is high to them, so C(II) is high

67 67 Costs in the Jones Camp l Expected Cost E(C) = C low (type I error)*P(type I error) + C high (type II error)*P(type II error) E(C) = C low (type I error)*  C high (type II error)*  l Recommended Action: make probability of type II error small, i.e. make the probability of accepting the null when it is false small

68 Decision Accept null Reject null True State of Nature p = 0.5P > 0.5 No Error 1 -  Type I error  C(I) No Error 1 -  Type II error  C(II) E[C] = C(I)*  + C(II)*  Jones: C(II) is large so make  small

69 Decision Theory Example If we set the type I error,  to 1%, then from the normal distribution (Table 3), the standardized normal variate z will equal 2.33 for 1% in the upper tail.

70 70 Decision theory example So for this poll size of 1135, with p=0.5 under the null hypothesis, given our choice of the type I error of size 1%, which determines the value of z of 2.33, we can solve for a

71 2.33 1 %

72 Decision Theory Example l So if 53.5% of the polling sample, or 0.535*1135=607 say they will vote for Boxer, then we reject the null of p=0.5.

73 Mean = 567.5 607 alpha = 1 % Reject Null Accept Null

74 74 Decision Theory Example l But suppose the true value of p is 0.55, and we use this decision rule to reject the null if 607 voters are for Boxer, but accept the null (of p=0.50, false if p=0.55) if this number is less than 607. What is the size of the type II error?

75 Left Mean =1135* 0.5 = 567.5 607 alpha = 1 % Reject NullAccept Null Mean = 1135*0.55 = 624.25 ?

76 Decision Theory Example What is the value of the type II error,  if the true population proportion is p = 0.55? l Recall our decision rule is based on a poll proportion of 0.535 or 607 for recall l z(beta) = (0.535 – p)/[p*(1-p)/n] 1/2 l Z(beta) = (0.535 – 0.55)/[.55*.45/1135] 1/2 l Z(beta) = -1

77 Decision Theory Example

78

79 Ideal power function

80 Decision Accept null Reject null True State of Nature p = 0.5P > 0.5 No Error 1 -  Type I error  No Error 1 -  Type II error 

81 81 Tradeoff Between  and  l Suppose the type I error is 5% instead of 1%; what happens to the type II error?

82 82 Tradeoff If  then the Z value in our example is1.645 instead of 2.33 and the decision rule is reject the null if 596 voters are for Boxer.

83 Left Mean =1135* 0.5 = 567.5 607 alpha = 1 % Reject NullAccept Null Mean = 1135*0.55 = 624.25 ?


Download ppt "1 Econ 240A Power 6. 2 The Challenger Disaster l sjoly/RB-intro.html sjoly/RB-intro.html."

Similar presentations


Ads by Google