


























Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!



























1
Roberto Golinelli
[email protected] https://www.unibo.it/sitoweb/roberto.golinelli/en
Economics suggests important relationships, often with policy implications, but virtually never suggests quantitative magnitudes of causal effects. What is the quantitative effect of reducing class size on student achievement? How does another year of education change earnings? What is the price elasticity of cigarettes? What is the effect on output growth of a 1 percentage point increase in interest rates by the Fed? What is the effect on housing prices of environmental improvements?
3
This course is about using data to measure causal effects. Ideally, we would like an experiment o what would be an experiment to estimate the effect of class size on standardized test scores? But almost always we only have observational (nonexperimental) data. o returns to education o cigarette prices o monetary policy Most of the course deals with difficulties arising from using observational to estimate causal effects o confounding effects (omitted factors) o simultaneous causality o “correlation does not imply causation”
Tipi di dati
7
Dati panel – Panel data
In this course you will:
Learn methods for estimating causal effects using observational data Learn some tools that can be used for other purposes, for example forecasting using time series data; Focus on applications – theory is used only as needed to understand the “why”s of the methods; Learn to evaluate the regression analysis of others – this means you will be able to read/understand empirical economics papers in other econ courses; Get some hands-on experience with regression analysis in your problem sets.
9
(SW Chapters 2, 3)
Empirical problem: Class size and educational output
Policy question: What is the effect on test scores (or some other outcome measure) of reducing class size by one student per class? by 8 students/class?
We must use data to find out (is there any way to answer this without data?)
The California Test Score Data Set
All K-6 and K-8 California school districts ( n = 420)
Variables: 5 th^ grade test scores (Stanford-9 achievement test, combined math and reading), district average, TestScore Student-teacher ratio = number of students in the district divided by no. full-time equivalent teachers, STR
13
We need to get some numerical evidence on whether districts with low STRs have higher test scores – but how?
Initial data analysis: Compare districts with “small” (STR < 20) and
“large” (STR ≥ 20) class sizes: ( nota: STR^ ^19.^6 ) Class Size
Average score ( Y )
Standard deviation ( s (^) Y )
n
Small 657.4 19.4 238 Large 650.0 17.9 182 Total 654.2 420
Nota: media generale = 238 182 654.^193333
15
1. Estimation
Y small (^) Y large =
small small^1
1 n i i
n ^
large large^1
1 n i i
n = 657.4 – 650. = 7.
Is this a large difference in a real-world sense? Standard deviation across districts = 19. Difference between 60th^ and 75th^ percentiles of test score distribution is 667.6 – 659.4 = 8. This is a big enough difference to be important for school reform discussions, for parents, or for a school committee?
2. Hypothesis testing
Difference-in-means test: compute the t -statistic,
s^2^ l^2 ( ) s l
s l s l s s (^) s l n n
t Y^ Y^ Y^ Y SE Y Y
(remember this?)
where SE ( Y (^) s – Yl ) is the “standard error” of Ys – Yl , the subscripts s and l
refer to “small” and “large” STR districts, and 2 2 1
n s s i s s i
s Y Y n (^)
(etc.)
19
What comes next…
The mechanics of estimation, hypothesis testing, and confidence intervals should be familiar These concepts extend directly to regression and its variants Before turning to regression, however, we will review some of the underlying theory of estimation, hypothesis testing, and confidence intervals: why do these procedures work, and why use these rather than others? So we will review the intellectual foundations of statistics and econometrics
Review of Statistical Theory
The probability framework for statistical inference (a) Population, random variable, and distribution (b) Moments of a distribution (mean, variance, standard deviation, covariance, correlation) (c) Conditional distributions and conditional means (d) Distribution of a sample of data drawn randomly from a population: Y 1 ,…, Yn
21
(a) Population, random variable, and distribution
Population The group or collection of all possible entities of interest (school districts) We will think of populations as infinitely large ( is an approximation to “very big”)
Random variable Y Numerical summary of a random outcome (e.g. TestScore =district average test score, or district students-teacher ratio = STR ) In altri termini: variabile che assume certi valori con una certa probabilità
Population distribution of Y
The probabilities of different values of Y that occur in the population, for ex. Pr[ Y = 650] (when Y is discrete) or: The probabilities of sets of these values, for ex. Pr[640 Y 660] (when Y is continuous).
25
Random variables: joint distributions and covariance MULTIVARIATE: Random variables X and Y have a joint distribution The covariance between X and Y is cov( X , Y ) = E [( X – X )( Y – Y )] = XY
The covariance is a measure of the linear association between X and Y ; its units are units of X × units of Y cov( X , Y ) > 0 means a positive relation between X and Y If X and Y are independently distributed, then cov( X , Y ) = 0 (but not vice versa!!) The covariance of a r.v. with itself is its variance:
27
The covariance between Test Score and STR is negative:
so is the correlation …
The correlation coefficient is defined in terms of the covariance:
corr( X , Z ) = cov(^ ,^ ) var( ) var( )
XZ X Z
(^) = r (^) XZ
1 corr( X , Z ) 1 corr( X , Z ) = 1 mean perfect positive linear association corr( X , Z ) = –1 means perfect negative linear association corr( X , Z ) = 0 means no linear association
(nota: nel nostro campione di 420 distretti r ˆ^^ ^0.^23 ) non vi fate fuorviare dai simboli: prima X e Y ora X e Z
The correlation coefficient measures linear association In the plots below there is one case in which correlation exists, but corr = 0 (what is? why?)
31
(c) Conditional distributions and conditional means
Conditional distributions The distribution of Y given value(s) of some other random variable X Example: the distribution of test scores, given that STR < 20 Conditional expectations and conditional moments conditional mean = mean of conditional distribution = E ( Y | X = x ) ( important concept and notation ) conditional variance = variance of conditional distribution Example : E ( Test scores | STR < 20) = the mean of test scores among districts with small class sizes The difference in means is the difference between the means of two conditional distributions:
Conditional mean, ctd.
= E ( Test scores | STR < 20) – E ( Test scores | STR ≥ 20)
Other examples of conditional means: Wages of all female workers ( Y = wages, X = gender) Mortality rate of those given an experimental treatment ( Y = live/die; X = treated/not treated) If E ( X | Z ) = const, then corr( X , Z ) = 0 (not necessarily vice versa however) The conditional mean is a (possibly new) term for the familiar idea of the group mean nota: se E(Y | X < 20) = E(Y | X 20) Cov(Y, X)=0; e rYX?
33
(d) Distribution of a sample of data drawn randomly from a population: Y 1 ,…, Y (^) n
We will assume simple random sampling Choose and individual (district, entity) at random from the population Randomness and data Prior to sample selection, the value of Y is random because the individual selected is random Once the individual is selected and the value of Y is observed, then Y is just a number – not random The data set is ( Y 1 , Y 2 ,…, Y (^) n ), where Yi = value of Y for the i th individual (district, entity) sampled
Distribution of Y 1 ,…, Y (^) n under simple random sampling Because individuals #1 and #2 are selected at random, the value of Y 1 has no information content for Y 2. Thus: o Y 1 and Y 2 are independently distributed o Y 1 and Y 2 come from the same distribution, that is, Y 1 , Y 2 are identically distributed o That is, under simple random sampling, Y 1 and Y 2 are independently and identically distributed ( i.i.d. ). o More generally, under simple random sampling, { Yi }, i = 1,…, n , are i.i.d.
This framework allows rigorous statistical inferences about moments of population distributions using a sample of data from that population
37
Estimation Y is the natural estimator of the mean. But: (a) What are the properties of Y? (b) Why should we use Y rather than some other estimator? Y 1 (the first observation) maybe unequal weights – not simple average median( Y 1 ,…, Y (^) n ) The starting point is the sampling distribution of Y (^) , defined as
i 1 i
n i 1 i
(a) The sampling distribution of Y Y (^) is a random variable, and its properties are determined by the sampling distribution of Y
The individuals in the sample are drawn at random. Thus the values of ( Y 1 ,…, Y (^) n ) are random Thus functions of ( Y 1 ,…, Y (^) n ), such as Y , are random: had a different sample been drawn, they would have taken on a different value The distribution of Y over different possible samples of size n is called the sampling distribution of Y. The mean and variance of Y are the mean and variance of its sampling distribution, E ( Y ) and var( Y ); i.e. its first two moments. The concept of the sampling distribution underpins all of econometrics.
39
Things we want to know about the sampling distribution:
What is the mean of Y?
What is the variance of Y? o How does var( Y ) depend on n (famous 1/ n formula)
(Central Limit Theorem)
The mean and variance of the sampling distribution of Y
General case – that is, for Yi i.i.d. from any distribution:
mean: E ( Y ) = E ( 1
1 n i i
n ^
1
1^ n ( ) i i
n^ ^
1
1 n Y n i
=^ Y
Variance: var( Y ) = E [ Y – E ( Y )]^2
2
1
1 n
2
1
1^ n ( ) i Y i
n