1 econ 240a power 6. 2 the challenger disaster l 1031097/ 1031097

72
1 Econ 240A Power 6

Post on 21-Dec-2015

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

1

Econ 240A

Power 6

Page 2: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

2

The Challenger Disaster

http://www.msnbc.msn.com/id/11031097/

Page 3: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

3

The Challenger

The issue is whether o-ring failure on prior 24 prior launches is temperature dependent

They were considering launching Challenger at about 32 degrees

What were the temperatures of prior launches?

Page 4: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

4

Histogram

0

1

2

3

4

5

6

7

34 39 44 49 54 59 64 69 74 79 84 89

Temperature Bin In 50 Ranges

Fre

qu

en

cy

ChallengerLaunch

Only 4 launches Between 50 and64 degrees

Page 5: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

5

Challenger

Divide the data into two groups• 12 low temperature launches, 53-70

degrees• 12 high temperature launches, 70-81

degrees

Page 6: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Temperature O-Ring Failure

53 Yes

57 Yes

58 Yes

63 Yes

66 No

67 NO

67 No

67 No

68 No

69 No

70 No

70 Yes

Page 7: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Temperature O-Ring Failure

70 Yes

70 No

72 No

73 No

75 Yes

75 No

76 No

76 No

78 No

79 No

80 No

81 No

Page 8: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

8

Probability of O-Ring Failure Conditional On

Temperature, P/T P/T=#of Yesses/# 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

P/T=#of Yesses/# of Launches at high temperature• Pˆ = k(high)/n(high) = 2/12 = 0.17

Page 9: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

9

Are these two rates significantly different?

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 So .41 - .17 = .24 is 1.7 to 2.2

standard deviations apart? Is that enough to be statistically significant?

Page 10: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

10

Interval Estimation and Hypothesis Testing

Page 11: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

11

Outline

Interval Estimation Hypothesis Testing Decision Theory

Page 12: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Density Function for the Standardized Normal Variate

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

-5 -4 -3 -2 -1 0 1 2 3 4 5

Standard Deviations

Den

sity

2]1/)0[(2/1*]2/1[)( zezf

0

Page 13: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Cumulative Distribution Function for a Standardized Normal Variate

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

-5 -4 -3 -2 -1 0 1 2 3 4 5

Standard Deviations

Pro

ba

bilt

y

0

Page 14: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Density Function for the Standardized Normal Variate

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

-5 -4 -3 -2 -1 0 1 2 3 4 5

Standard Deviations

Den

sity

2]1/)0[(2/1*]2/1[)( zezf

-1.645

0.050

Page 15: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

15

a Z valueof 1.96 leadsto an area of0.475, leaving0.025 in the Upper tail

Page 16: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

16

Interval Estimation

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

Page 17: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

17

So z values of -1.96 and1.96 leave2.5% in eachtail

Page 18: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Density Function for the Standardized Normal Variate

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

-5 -4 -3 -2 -1 0 1 2 3 4 5

Standard Deviations

Den

sity

2]1/)0[(2/1*]2/1[)( zezf

-1.96

2.5% 2.5%

1.96

Page 19: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

19

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

Two Californias

Page 20: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

20

Times to Produce a cell Phone: Sample of 50

Problem 10.35 Data set Xr10-35

Page 21: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Times

25.9

29.4

26.3

28.2

26

27.8

25.2

27.7

30.2

26.5

27.2

27.2

26.9

28.8

26.3

27.3

27.2

29.1

27.2

26.3

28.4

26.8

24.7

25.6

26.3

25.7

28.3

28.2

28.1

26.6

27.7

24.8

25.1

26.5

27.4

24.4

26.3

25.3

26.5

25.8

26.8

25.6

26.2

29.2

27.1

26.4

25.9

25.9

26.9

25.3

Page 22: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

22

Sample statistics

Times

Mean 26.81

Standard Error 0.183085795

Median 26.55

Mode 26.3

Standard Deviation 1.294612069

Sample Variance 1.676020408

Kurtosis -0.053059002

Skewness 0.493039805

Range 5.8

Minimum 24.4

Maximum 30.2

Sum 1340.5

Count 50

Page 23: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

23

Mean Time to Assemble

Prob[?<=(x^-)/(s/n)<=?] = 0.95

Page 24: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

24

Student’s t-Distribution

What does it look like? EViews What are the critical values for

2.5% in each tail? Text

Page 25: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

25

@ctdist(x,v)@dtdist(x,v)@qtdist(p,v)@rtdist(v) t-distribution for , and v>0. Note that v=1 is the Cauchy

@ctdist(x,v)@dtdist(x,v)@qtdist(p,v)@rtdist(v) t-distribution

Gen tran=@rtdist(48)Gen tdens=@dtdist(tran,48)

Page 26: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

0.0

0.1

0.2

0.3

0.4

-3 -2 -1 0 1 2 3

TRAN

TD

EN

S

Student's t-distribution, simulated, 48 dof

Page 27: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

27

Appendix BTable 4p. B-9

Page 28: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

28

Mean Time to Assemble

Prob[?<=(x^-)/(s/n)<=?] = 0.95 Prob[-2.01<=(26.81-)/(1.29/50)<=2.01] =

0.95 Prob[-2.01<=(26.81-)/0.182)<=2.01] = 0.95 Prob[-0.366<=(26.81-)<=0.366] =0.95 Prob[0.37>=(-26.81>=- 0.37] =0.95 Prob[26.81+0.37>=>=26.81-0.37] = 0.95 Prob[27.18>= >=26.44] =0.95

Page 29: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

29

Hypothesis Testing

Page 30: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

30

Hypothesis Testing: 4 Steps

Formulate all the hypotheses Identify a test statistic If the null hypothesis were true, what is

the probability of getting a test statistic this large?

Compare this probability to a chosen critical level of significance, e.g. 5%

Page 31: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

31

Page 32: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Density Function for the Standardized Normal Variate

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

-5 -4 -3 -2 -1 0 1 2 3 4 5

Standard Deviations

Den

sity

2]1/)0[(2/1*]2/1[)( zezf

-1.645

5 % lower tail

Step #4: compare the probability for the teststatistic(z= -1.33) to the chosen critical level(z=-1.645)

Page 33: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

33

Decision Theory

Page 34: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision Theory 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.

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.

Page 35: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision Theory For example, consider a possible

proposition for bonds to finance dams, and the null hypothesis that the proportion that would vote yes would be 0.4999 (or less), i.e. p ~ 0.5. The alternative hypothesis was that this proposition would win i.e., p >= 0.5.

Page 36: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision Theory 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.

Page 37: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

37

Decision theory

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.

Page 38: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision

Accept null

Reject null

True State of Nature

p = 0.4999H2o Bonds lose

P >= 0.5 Bonds win

No Error

Type I error No Error

Type II error

Page 39: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

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,

Page 40: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

40

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?

Page 41: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision

Accept null

Reject null

True State of Nature

p = 0.4999 P >= 0.5

No Error 1 -

Type I error

No Error 1 -

Type II error

Page 42: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision Theory There is a tradeoff between the

size of the type I error and the type II error.

Page 43: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

43

Decision Theory

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.

Page 44: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

44

What is at stake?

Suppose you are for Water Bonds. What does the water bonds camp

want to believe about the true population proportion p?• they want to reject the null

hypothesis, p=0.4999• they want to accept the alternative

hypothesis, p>=0.5

Page 45: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Cost of Type I and Type II Errors

The best thing for the water bonds camp is to lean the other way from what they want

The cost to them of a type I error, rejecting the null when it is true (i.e believing the bonds will pass) is high: over-confidence at the wrong time.

Expected Cost E(C) = CIhigh (type I

error)*P(type I error) + CIIlow (type II

error)*P(type II error)

Page 46: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

46

Costs in Water Bond Camp

Expected Cost E(C) = CIhigh (type I

error)*P(type I error) + CIIlow (type II

error)*P(type II error) E(C) = CI high(type I error)* CII

low(type II error)* Recommended Action: make

probability of type I error small, i.e. run scared so chances of losing stay small

Page 47: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision

Accept null

Reject null

True State of Nature

p = 0.499Bonds lose

P >= 0.5Bonds win

No Error 1 -

Type I error C(I)

No Error 1 -

Type II error C(II)

E[C] = C(I)* + C(II)* Bonds: C(I) is large so make small

Page 48: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

48

How About Costs to the Bond Opponents Camp ?

What do they want? They want to accept the null,

p=0.499 i.e. Bonds lose The opponents camp should lean

against what they want The cost of accepting the null

when it is false is high to them, so C(II) is high

Page 49: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

49

Costs in the opponents Camp

Expected Cost E(C) = Clow(type I error)*P(type I error) + Chigh(type II error)*P(type II error)

E(C) = Clow(type I error)* Chigh(type II error)*

Recommended Action: make probability of type II error small, i.e. make the probability of accepting the null when it is false small

Page 50: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision

Accept null

Reject null

True State of Nature

p = 0.499Bonds lose

P >=0.5Bonds win

No Error 1 -

Type I error C(I)

No Error 1 -

Type II error C(II)

E[C] = C(I)* + C(II)* Opponents: C(II) is large so make small

Page 51: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

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. For a sample size of 1000, where p~0.5 from null

0158.0/)5.0ˆ(1000/5.0*5.0/)5.0ˆ(33.2

/)1(*/)ˆ()ˆ(/)]ˆ(ˆ[

ppz

nppppppEpz

Page 52: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

52

Decision theory example

So for this poll size of 1000, 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 a5368.0ˆ p

Page 53: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Density Function for the Standardized Normal Variate

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

-5 -4 -3 -2 -1 0 1 2 3 4 5

Standard Deviations

Den

sity

2]1/)0[(2/1*]2/1[)( zezf

2.33

1 %

Page 54: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision Theory Example So if 53.7% of the polling sample, or

0.5368*1000=537 say they will vote for water bonds, then we reject the null of p=0.499, i.e the null that the bond proposition will lose

Page 55: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

55

Decision Theory Example

But suppose the true value of p is 0.54, and we use this decision rule to reject the null if 537 voters are for the bonds, but accept the null (of p=0.499, false if p=0.54) if this number is less than 537. What is the size of the type II error?

Page 56: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

0.0

0.1

0.2

0.3

0.4

0.5

440 460 480 500 520 540 560

Voters Supporting Bonds

DENSITY, p=0.50 DENSITY, p=0.54

p = 0.50 p = 0.54

alpha = 1 %

Figure: The Pobability of a Type II Error = 40%

Decision Rule: Reject Null if Voters>536

beta = 40%

Page 57: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision Theory Example What is the value of the type II error, if

the true population proportion is p = 0.54?

Recall our decision rule is based on a poll proportion of 0.536 or 536 for Bonds

z(beta) = (0.536 – p)/[p*(1-p)/n]1/2

Z(beta) = (0.536 – 0.54)/[.54*.46/1000]1/2

Z(beta) = -0.253

nppppbetaz /)1(*/)ˆ()(

Page 58: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Table 2: Probability of Type II Error Versus Population Proportion

True Population z value* F(z) = beta 1 - beta Proportion, p

0.51 1.64 0.950 0.050 0.52 1.01 0.844 0.156 0.53 0.38 0.648 0.352 0.54 -0.25 0.400 0.600 0.55 -0.89 0.187 0.813 0.56 -1.53 0.063 0.937 0.57 -2.17 0.015 0.985 0.58 -2.82 0.002 0.998 0.59 -3.47 0.000 1.000 0.6 -4.13 0.000 1.000

* z = (0.536 - p)/sqrt[p*(1-p)/1000]

Calculation of Beta

Page 59: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Figure 3: Operating Characteristic Curve

0.000

0.100

0.200

0.300

0.400

0.500

0.600

0.700

0.800

0.900

1.000

0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61

Presumed Population Proportion, p

Bet

aBeta Versus p (true)

p

Page 60: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Figure 4: Power Function of the Test

0.000

0.100

0.200

0.300

0.400

0.500

0.600

0.700

0.800

0.900

1.000

0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61

Supposed Population Proportion, p

1 -

be

ta

Power of the Test

p

1 -

Page 61: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Figure 4: Power Function of the Test

0.000

0.100

0.200

0.300

0.400

0.500

0.600

0.700

0.800

0.900

1.000

0.5 0.51 0.52 0.53 0.54 0.55 0.56 0.57 0.58 0.59 0.6 0.61

Supposed Population Proportion, p

1 -

be

ta

Power of the Test

p

1 - Ideal

Page 62: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Decision

Accept null

Reject null

True State of Nature

p = 0.499 P >= 0.5

No Error 1 -

Type I error

No Error 1 -

Type II error

Page 63: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

63

Tradeoff

Between and Suppose the type I error is 5%

instead of 1%; what happens to the type II error?

Page 64: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

64

Tradeoff

If then the Z value in our example is 1.645 instead of 2.33 and the decision rule is reject the null if 526 voters are for water bonds.

Page 65: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

0.0

0.1

0.2

0.3

0.4

0.5

440 460 480 500 520 540 560

Voters Supporting Bonds

DENSITY, p=0.50 DENSITY, p=0.54

p = 0.50 p = 0.54

alpha = 1 %

Figure: The Pobability of a Type II Error = 40%

Decision Rule: Reject Null if Voters>502

beta = 40%

Page 66: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

66

Interval Estimation Example

Page 67: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

67

Interval Estimation

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

)//()( nsxt

Page 68: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

Monthly Rates of Return On the UC Stock Index Fund

-15

-10

-5

0

5

10

Sep-9

5

Jan-

96

May

-96

Sep-9

6

Jan-

97

May

-97

Sep-9

7

Jan-

98

May

-98

Sep-9

8

Jan-

99

May

-99

Sep-9

9

Jan-

00

May

-00

Sep-0

0

Jan-

01

May

-01

Sep-0

1

Jan-

02

May

-02

Sep-0

2

Jan-

03

May

-03

Sep-0

3

Jan-

04

May

-04

Date

Rat

e

SampleMean0.842

Page 69: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

69

Appendix BTable 4p. B-9

2.5 % in the upper tail

Page 70: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

70

Interval Estimation

95% confidence interval

substituting for t

)108/29.4/()842(.)//()(

95.0)983.1983.1(

nsxt

tp

95.)983.1413./)842(.983.1( p

Page 71: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

71

Interval Estimation

Multiplying all 3 parts of the inequality by 0.413

subtracting .842 from all 3 parts of the inequality,

95.)819.842.819.( p

95.)023.661.1( p

Page 72: 1 Econ 240A Power 6. 2 The Challenger Disaster l  1031097/  1031097

72

Interval EstimationAn Inference about E(r)

And multiplying all 3 parts of the inequality by -1, which changes the sign of the inequality

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

95.0)02.66.1( p