



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!




Organization
This chapter introduces the linear regression model relating one variable X to
another Y. this model postulated a linear relationship between X and Y
The regression model is:
where the subscript i runs over observations
is the dependent variable, the regressand
is the independent variable, the regressor
is the population regression line or the population regression
function, this is the relationship that holds between X and Y, on average, over
the population. Given the value of X, according to this population regression line
you would predict the value of the dependent variable Y to be its conditional
mean X. →
is the intercept of the population regression line, the value of the population
regression line when X=0, the point at which the population regression line
intersects the Y axis.
is the slope of the population regression line, the difference in Y associated
with an unit difference in X.
is the error term, the difference beteween and its predicted value using
regression line.
i
β +
0
β X +
1 i
u
i
i = 1, ..., n
i
i
β +
o
β X
1
E(Y ∣Z) = β +
0
β X
1
β
0
β
1
u
i
i
The lower student-teacher-ratio (smaller classes) tend to have higher test score.
Estimating the coefficient of the linear regression model
The OLS estimator chooses the regression coef cients so that the estimated
regression line is as close as possible to the observed data, where closeness is
measured by the sum the squared mistakes made in predicting Y given X.
The sample average is the least squares estimator of the population mean, ;
that is minimizes the total squared estimation mistakes among
all possible estimator.
The OLS extends this idea to the linear regression model.
Let some estimators of. the regression line based on these
estimators is , so the value of predicted using this line is:.
Thus the mistake made in predicting the observation is
The sum of squared prediction mistakes over all observation is
There are just an unique par of estimators and that minimize this expression.
This unique estimator are called ordinary least squared (OLS) estimators of
and and its notation are:
and.
i=
n
i
m)
2
m
b and b
0 1
β and β
0 1
b +
0
b X
1
i
b +
0
b X
1 i
i
th
i
(b +
0
b X ) =
1 i
i
b −
0
b X
1 i
n
i=
n
i
b −
0
b X )
1 i
2
β
0
β
1
β
0
β
1
β
0
β
1
In this notation is the ratio of the sample variance of to the sample variance Y.
Mathematically can be written as the ratio of the explained sum of squares to the
total sum of sqares:
Explained sum of squares; the sum of squared deviations of the predicted value
from its average
Total sum of of squares is the sum of squared deviations of from its average:
Alternatively can be written in terms of the fraction of the variance of not
explained by ,
The sum of squared residuals, is the sum of squared OLS residuals:
Finally of the regression of Y on the single regressor X is the square of the
correlation coef cient between X and Y
→ then explains none of the variation of ,
explain all of the variations of
Standard error of the regression SER is an estimator of the standard deviation of the
regression error. SER measure the spread of the obs around the regression line,
measured in the units of the dependent variable.
where
degrees of freedom correction because when two coef cients were estimated
because we have 2 coef cients.
Prediction using OLS
The predicted value for the OBS is the value of Y predicted by OLS regression
line whrn X takes on its value for that observation.
This is called an in-sample prediction because the obs for which the prediction is
made was also udes to estimate the regression coef cients.
Such OBS not in data set is called out of ample prediction.
2
2
i=
n
i
2
i
i=
n
i
2
2
(Y − Y)
ˉ 2
( Y− )
^
Y
ˉ
2
TSS
ESS
2
i
i
i=
n
u^
i
2
2
TSS
SSR
2
2
2
i
i
2
i
i
u
i
SER = s = u^
s
u^
2
s =
u^
2
n−
1
i=
n
u^
i
2
n−
SSR
n − 2
β , β 0 1
i
i
th
i
The goal of prediction is to provide accurate out of sample prediction, but no
prediction is perfect, a prediction should be accompanied by an estimate of its
accuracy, that is, by an estimate of how accurate the prediction mighr reasonably be
expected to be.
A natural measure of accuracy is the standard deviation of the out-of sample
prediction error
A common way to report a prediction and its accuracy is as the prediction ± SER →
ASSUMPTION 1 → Conditional distribution of has a
mean zero
The conditional distribution of given has a mean of zero. so the other
factors contained in and asserts that these other factors are unrelated to X_i in
the sense that, given a value of , the mean of the distribution of these other
factor is zero.
in a randomized controlled experiment with a binary treatment:
This implies that and are uncorrelated so
ASSUMPTION 2→ Independently and identically distributed
This assumption is a statement about how the sample is drawn. if the obs are
drawn by simple random sampling from a single large population then
are i.i.d. not all sampling scheme produce i.i.d. obs, for example ig
X is xed in repeated experiments that is repeated draws of the sample. Thus
is nonrandom and also no i.i.d.. The same if we refer to the same unit in different
time,
s
u^
i i
u
i
i
u
i
i
E(u ∣X ) =
i i
i
u
i
xorr(X u ) =
i i
i i
i
If the least squares assumprion hold, then in large samples have a jointly
normal sampling distribution of is where the variance of this
distribution is:
The large sample normal distribution of is , where:
where
In general the larger is the variance of the smaller is the variance of. This
because the variance is inversely proportional to the square of the variance of.
Than larger X larger denominator smaller variance. Similarly smaller variance error
smaller variance.
β ,
0
β
1
β
1
N (β , σ )
1
β 1
2
σ
β
^
1
2
σ =
β
^
1
2
n
1
[var(X )]
i
2
var[(X −μ )u ]
i X i
β
0
N (β , σ )
0
β
^
0
2
σ =
β
^
0
2
n
1
[E(H )]
i
2 2
var(H u ) i i
i
E(X )
i
2
μ X
i
i
σ
β
2
β
1
β
1
i
β
1