Democrat | Republican |
---|---|
61% | 80% |
Democrat | Republican |
---|---|
61% | 80% |
Democrat | Republican | |
---|---|---|
North | 94% | 85% |
(145/154) | (138/162) | |
South | 7% | 0% |
(7/94) | (0/10) | |
Overall | 61% | 80% |
(152/248) | (138/172) |
Democrat | Republican | |
---|---|---|
North | 94% | 85% |
(145/154) | (138/162) | |
South | 7% | 0% |
(7/94) | (0/10) | |
Overall | 61% | 80% |
(152/248) | (138/172) |
Larger proportion of Democrats (94248, 38%) than Republicans (10172, 6%) were from South
The 7% of southern Democrats voting for the Act dragged down the Democrats' overall percentage more than the 0% of southern Republicans
Suppose you suffer from kidney stones, your doctor offers you treatment A or treatment B
In clinical trials, treatment B was effective for a larger percentage of patients than treatment A
Treatment A was effective for a higher percentage of patients with large stones and a higher percentage of patients with small stones
Wait, what?
From a real medical study:
Treatment A | Treatment B | |
---|---|---|
Small Stones | 93% | 87% |
(81/87) | (234/270) | |
Large Stones | 73% | 69% |
(192/263) | (55/80) | |
Overall | 78% | 83% |
(273/350) | (289/350) |
C R Charig, D R Webb, S R Payne, and J E Wickham, 1986, "Comparison of treatment of renal calculi by open surgery, percutaneous nephrolithotomy, and extracorporeal shockwave lithotripsy," Br Med J (Clin Res Ed) 292(6524): 879–882.
From a real medical study:
Treatment A | Treatment B | |
---|---|---|
Small Stones | 93% | 87% |
(81/87) | (234/270) | |
Large Stones | 73% | 69% |
(192/263) | (55/80) | |
Overall | 78% | 83% |
(273/350) | (289/350) |
C R Charig, D R Webb, S R Payne, and J E Wickham, 1986, "Comparison of treatment of renal calculi by open surgery, percutaneous nephrolithotomy, and extracorporeal shockwave lithotripsy," Br Med J (Clin Res Ed) 292(6524): 879–882.
Simpson's Paradox: The correlation between two variables can change (even reverse!) when additional variables are considered
1964: U.S. Surgeon General issued a report claiming that cigarette smoking causes lung cancer
Evidence based primarily on correlations between cigarette smoking and lung cancer
Ronald A. Fisher
1890--1924
There could be a confounding variable ("smoking gene") that causes both lung cancer and the urge to smoke
Would imply: decision to smoke or not would have no impact on lung cancer!
Correlation between smoking and cancer is spurious!
It's always good to be skeptical of causal claims
But this is actually where econometrics shines
Econometrics is the application of statistical tools to quantify economic relationships in the real world
Uses real data to
What sets econometrics apart from mere statistics (or uses of statistics in other disciplines) is its role in causal inference
We can, with proper tools and interprations, make quantitative causal claims
A 50% increase in police presence in a metropolitan area lowers crime rates by 15%, on average1
Being an incumbent in office raises the probability of re-election by 40-45 percentage points2
European cities with at least one printing press in 1500 were at least 29% more likely to become Protestant by 16003
1 Klick, Jonathan and Alexander Tabarrok, 2005, "Using Terror Alert Levels to Estimate the Effect of Police on Crime," Journal of Law and Economics 48(1): 267-279
2 Lee, David S, 2001, "The Electoral Advantage to Incumbency and Voters' Valuation of Politicians' Experience: A Regression Discontinuity Analysis of Elections to the U.S," NBER Working Paper 8441
3 Rubin, Jared, 2014, "Printing and Protestants: An Empirical Test of the Role of Printing in the Reformation," Review of Economics and Statistics 96(2): 270-286
Does reducing class sizes improve student performance?
Does reducing class sizes improve student performance?
Is there racial discrimination in home mortgage lending?
Is there racial discrimination in home mortgage lending?
How much do state cigarette taxes reduce smoking rates?
How much do state cigarette taxes reduce smoking rates?
Econ 101: raise price ⟹ lower quantity consumed
What is the price elasticity of demand for smoking?
How much tax revenue will this generate?
Probably:
Taxes→Smokers
Taxes←Smokers
R
and R Studio
for analyzing and presenting dataˉx=1nn∑i=1xi
σx=√1nn∑i=1(xi−ˉx)2
rxy=n∑i=1(xi−ˉx)(yi−ˉy)√n∑i=1(xi−ˉx)2n∑i=1(yi−ˉy)2
Use pre-cleaned "toy" data, if any
ˉx=1nn∑i=1xi
σx=√1nn∑i=1(xi−ˉx)2
rxy=n∑i=1(xi−ˉx)(yi−ˉy)√n∑i=1(xi−ˉx)2n∑i=1(yi−ˉy)2
Use pre-cleaned "toy" data, if any
mean(x)
sd(x)
cor(x, y)
Courses:
Math Skills:
Courses:
Math Skills:
Computer Science Skills:
By the end of this semester, you will:
"When you’re fundraising, it’s AI. When you’re hiring, it’s ML. When you’re implementing, it’s logistic regression."
- everyone on Twitter ever (Source)
1 For more, see my blog post, and Pearl & MacKenzie (2018), The Book of Why
"First, the field of economics has spent decades developing a toolkit aimed at investigating empirical relationships, focusing on techniques to help understand which correlations speak to a causal relationship and which do not. This comes up all the time — does Uber Express Pool grow the full Uber user base, or simply draw in users from other Uber products? Should eBay advertise on Google, or does this simply syphon off people who would have come through organic search anyway? Are African-American Airbnb users rejected on the basis of their race? These are just a few of the countless questions that tech companies are grappling with, investing heavily in understanding the extent of a causal relationship."
library("gapminder")ggplot(data = gapminder, aes(x = gdpPercap, y = lifeExp, color = continent))+ geom_point(alpha=0.3)+ geom_smooth(method = "lm")+ scale_x_log10(breaks=c(1000,10000, 100000), label=scales::dollar)+ labs(x = "GDP/Capita", y = "Life Expectancy (Years)")+ facet_wrap(~continent)+ guides(color = F)+ theme_light()
Assignment | Percent | |
---|---|---|
1 | Research Project | 30% |
n | Homeworks (Average) | 25% |
1 | Midterm | 20% |
1 | Final | 25% |
Take notes. On paper. Really.
Work together on assignments and study together.
Ask questions, come to office hours. Don't struggle in silence, you are not alone!
You are learning how to learn1
See the reference page for more
1 A properly worded Google search will become your secret weapon. Believe me. It's still mine.
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |