Title: Econ 240A
1Econ 240A
2The Challenger Disaster
- http//www.msnbc.msn.com/id/11031097/
3The 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?
4Only 4 launches Between 50 and 64 degrees
Challenger Launch
5Challenger
- Divide the data into two groups
- 12 low temperature launches, 53-70 degrees
- 12 high temperature launches, 70-81 degrees
6Temperature 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
7Temperature 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
8Probability of O-Ring Failure Conditional On
Temperature, P/T
- P/Tof Yesses/ of Launches at low temperature
- P/Tof O-Ring Failures/ of Launches at low
temperature - Pˆ k(low)/n(low) 5/12 0.41
- P/Tof Yesses/ of Launches at high temperature
- Pˆ k(high)/n(high) 2/12 0.17
9Are these two rates significantly different?
- Dispersion p(1-p)/n
- Low p(1-p)/n1/2 0.410.59/121/2 0.14
- High p(1-p)/n1/2 0.170.83/121/2 0.11
- So .41 - .17 .24 is 1.7 to 2.2 standard
deviations apart? Is that enough to be
statistically significant?
10Interval Estimation and Hypothesis Testing
11Outline
- Interval Estimation
- Hypothesis Testing
- Decision Theory
120
130
140.050
-1.645
15 a Z value of 1.96 leads to an area of 0.475,
leaving 0.025 in the Upper tail
16Interval Estimation
- The conventional approach is to choose a
probability for the interval such as 95 or 99
17So z values of -1.96 and 1.96 leave 2.5 in
each tail
181.96
-1.96
2.5
2.5
19Two Californias
http//www.sfgate.com/election/races/2003/10/07/ma
p.shtml
20Times to Produce a cell Phone Sample of 50
- Problem 10.35
- Data set Xr10-35
21Times
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
22Sample statistics
Times 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
23Mean Time to Assemble
- Prob?lt(x-?)/(s/?n)lt? 0.95
24Students t-Distribution
- What does it look like? EViews
- What are the critical values for 2.5 in each
tail? Text
25_at_ctdist(x,v)_at_dtdist(x,v)_at_qtdist(p,v)_at_rtdist(v) t-d
istribution for , and vgt0. Note that v1 is the
Cauchy
_at_ctdist(x,v) _at_dtdist(x,v) _at_qtdist(p,v) _at_rtdist(v)
t-distribution
Gen tran_at_rtdist(48) Gen tdens_at_dtdist(tran,48)
26(No Transcript)
27Appendix B Table 4 p. B-9
28Mean Time to Assemble
- Prob?lt(x-?)/(s/?n)lt? 0.95
- Prob-2.01lt(26.81-?)/(1.29/?50)lt2.01 0.95
- Prob-2.01lt(26.81-?)/0.182)lt2.01 0.95
- Prob-0.366lt(26.81-?)lt0.366 0.95
- Prob0.37gt(?-26.81gt- 0.37 0.95
- Prob26.810.37gt?gt26.81-0.37 0.95
- Prob27.18gt ? gt26.44 0.95
29Hypothesis Testing
30Hypothesis 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
31(No Transcript)
32Step 4 compare the probability for the
test statistic(z -1.33) to the chosen critical
level (z-1.645)
-1.645
5 lower tail
33Decision Theory
34Decision 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.
35Decision 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 gt 0.5.
36Decision 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.
37Decision 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.
38True State of Nature
p 0.4999 H2o Bonds lose
P gt 0.5 Bonds win
Type II error
No Error
Accept null
Decision
Type I error
No Error
Reject null
39Decision Theory
- The size of the type I error is the significance
level or probability of making a type I error, a. - The size of the type II error is the probability
of making a type II error, b.
40Decision Theory
- We could choose to make the size of the type I
error smaller by reducing a, for example from 5
to 1 . But, then what would that do to the type
II error?
41True State of Nature
p 0.4999
P gt 0.5
Type II error b
No Error 1 - a
Accept null
Decision
Type I error a
No Error 1 - b
Reject null
42Decision Theory
- There is a tradeoff between the size of the type
I error and the type II error.
43Decision 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.
44What 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, p0.4999
- they want to accept the alternative hypothesis,
pgt0.5
45Cost 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)
46Costs 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) a CII low(type II
error) b - Recommended Action make probability of type I
error small, i.e. run scared so chances of losing
stay small
47True State of Nature
P gt 0.5 Bonds win
p 0.499 Bonds lose
No Error 1 - a
Type II error b C(II)
Accept null
Decision
Type I error a C(I)
No Error 1 - b
Reject null
EC C(I) a C(II) b
Bonds C(I) is large so make a small
48How About Costs to the Bond Opponents Camp ?
- What do they want?
- They want to accept the null, p0.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
49Costs 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) a Chigh(type II
error) b - Recommended Action make probability of type II
error small, i.e. make the probability of
accepting the null when it is false small
50True State of Nature
p 0.499 Bonds lose
P gt0.5 Bonds win
No Error 1 - a
Type II error b C(II)
Accept null
Decision
Type I error a C(I)
No Error 1 - b
Reject null
EC C(I) a C(II) b
Opponents C(II) is large so make b small
51Decision Theory Example
- If we set the type I error, a, 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 p0.5 from null
52Decision theory example
- So for this poll size of 1000, with p0.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
532.33
1
54Decision Theory Example
- So if 53.7 of the polling sample, or
0.53681000537 say they will vote for water
bonds, then we reject the null of p0.499, i.e
the null that the bond proposition will lose
55Decision 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
p0.499, false if p0.54) if this number is less
than 537. What is the size of the type II error?
56(No Transcript)
57Decision Theory Example
- What is the value of the type II error, b, 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)/n1/2
- Z(beta) (0.536 0.54)/.54.46/10001/2
- Z(beta) -0.253
58Calculation of Beta
59Beta Versus p (true)
b
p
60Power of the Test
1 - b
p
61Power of the Test
Ideal
1 - b
p
62True State of Nature
p 0.499
P gt 0.5
Type II error b
No Error 1 - a
Accept null
Decision
Type I error a
No Error 1 - b
Reject null
63Tradeoff
- Between a and b
- Suppose the type I error is 5 instead of 1
what happens to the type II error?
64Tradeoff
- If a 5, 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.
65(No Transcript)
66Interval Estimation Example
67Interval 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
- Students t-statistic
- degrees of freedom 107
68Sample Mean 0.842
69Appendix B Table 4 p. B-9
2.5 in the upper tail
70Interval Estimation
- 95 confidence interval
- substituting for t
71Interval Estimation
- Multiplying all 3 parts of the inequality by
0.413 - subtracting .842 from all 3 parts of the
inequality,
72Interval 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