Lect 1 18
Lect 1 18
Lect 1 18
Introduction to Econometrics
Fall 2018
1-2
Administrative ctd: Grading (see syllabus)
• Problem sets:
o distribution method: posted on course Web site (Canvas)
o Late PS policy: full (by deadline)/half (after deadline)/zero (after
solutions are posted)
o Electronic/hard copy submission - TBD
o Answers posted after the class after the PS is due (if due on
Tuesday, posted after class Thursday)
o OK to work in groups on PS’s (good idea): 3 max, write up
individually
o Total PS grade: Drop lowest of 1-7, 9, 10; 8 counts double and
can’t be dropped.
• Course grade:
o Problem Sets: 30%; Midterm: 25%; Final: 45%.
o Ec 1123 fall & spring use same curve
1-3
Admin ctd:
• Sections
o online sectioning (Canvas) – Jim R
o Stats & STATA review session: 1pm Fri. Sept. 2
o Regular sections start next week (next Wed-Sunday).
o TODAY Fall athletes please email Jim R scheduling input
• STATA and R
o Problem sets require STATA
o STATA is a means to an end, not an end in itself
o Intro to STATA handout is on the course Web site
o Use .do files, get started now before PS’s get harder
o STATA .do files will be included with lecture notes
o What about R?
1-4
Two Regression Studies
Data:
• MLB players and at-bat data, 1965-2008
• 6,723,291 at bats (data on outcome, park, conditions, home/away,
player, etc.)
1-5
HR per AB by Year
.035
.03
HR per AB
.025
.02
.015
1965 1970 1975 1980 1985 1990 1995 2000 2005 2010
Year
1-6
K per AB by Year
.2
.18
K per AB
.16
.14
1965 1970 1975 1980 1985 1990 1995 2000 2005 2010
Year
1-7
Data update:
0.14
0.18
0.22
0.26
0.12
0.16
0.20
0.24
0.01500
0.02000
0.02500
0.03000
0.03500
0.04000
1965
1967 1965
1969 1967
1971 1969
1973 1971
1975 1973
1977 1975
1979 1977
1981 1979
1983 1981
1985 1983
1985
1987
1987
1989
1989
1991
1991
K per AB
1993
HR per AB
1993
1995
1995
1997
1997
1999
1999
2001 2001
2003 2003
2005 2005
2007 2007
2009 2009
2011 2011
2013 2013
2015 2015
2017 2017
1-8
B. What has happened to coal mining since 2008?
“We have ended the war on American energy — and we have ended the
war on beautiful, clean coal. We are now very proudly an exporter of
energy to the world.” (President Trump, State of the Union, 2018)
1-9
Other explanations?
Monthly coal use for electricity and
Employment in coal mining, 1986 – 2018 relative price of natural gas to coal,
seasonally adjusted
Candidate factors
• Regulations (war on coal)?
• Prices of competing fuels (natural gas)?
• Energy efficiency improvements (electricity demand reduction)?
• Other (exports, metallurgical coal, productivity gains, etc.)
1-10
Use multiple regression to decompose sources of change in coal for
electricity, 2009-2016
State-level aggregated up from power plant and mine level data
(“panel data”)
1-11
What about the 2017 turnaround in employment?
11
10
1-12
Material for today and part of Monday: Review of…
• Random variables, distributions, and conditional distributions
• Expectations and conditional expectations
• Random sampling as the source of sampling uncertainty
• Central Limit Theorem
• Learning about population distributions from data:
1. Estimation
2. Confidence intervals
3. Hypothesis testing
• Application to comparison of two means
1-13
Example of the Central Limit Theorem: The sampling distribution of Y
when Y is Bernoulli (binary) with Pr(Y = 1) = .78 is, in large samples,
approximately normal with mean E(Y) and variance
var(Y ) = Y2 / n , i.e. N(E(Y), Y2 / n ):
1-14
Statistics Review: Empirical Example using STATA
.4
.2
0
2 3 4 5
Average course rating
1-15
Empirical question
Are course evaluation scores the same on average for male and female
instructors?
1-16
STATA output –courseevaluation by sex of instructor
Blue means you type this in
1-17
Question 2: Can we reject the hypothesis that male and female
instructors have the same scores on average?
Yw Ym
t (testing =0) =
SE (Yw Ym )
sm2 sw2
SE(Ym – Yw ) =
nm nw
1-18
. summarize courseevaluation if(female==0)
1-20
Question 3: What is the 95% confidence interval for this difference?
1-21
These calculations, done using ttest in STATA:
1-22