Uploaded by fuyu9741

第二讲

advertisement
The Simple Regression Model
(1)
简单二元回归
y = b0 + b1x + u
Intermediate Econometrics
SILC
1
Chapter Outline
本章大纲






Definition of the Simple Regression
Model 简单回归模型的定义
Deriving the Ordinary Least Squares
Estimates 普通最小二乘法的推导
Mechanics of OLS OLS的操作技巧
Units of Measurement and Functional Form
测量单位和函数形式
Expected Values and Variances of the OLS
estimators OLS估计量的期望值和方差
Regression through the Origin 过原点回归
Intermediate Econometrics SILC
2
Lecture Outline
讲义大纲
Some Terminology 一些术语的注解
 A Simple Assumption 一个简单假定
 Zero Conditional Mean Assumption 条件
期望零值假定
 What is Ordinary Least Squares
何为普通最小二乘法
 Deriving OLS Estimates
普通最小二乘法的推导

Intermediate Econometrics SILC
3
Some Terminology
术语注解

In the simple linear regression model, where y
= b0 + b1x + u, we typically refer to y as the
Dependent Variable, or
 Left-Hand Side Variable, or
 Explained Variable, or
 Regressand
在简单二元回归模型y = b0 + b1x + u中, y通常被称为
因变量,左边变量,被解释变量,或回归子。

Intermediate Econometrics SILC
4
Some Terminology
术语注解

In the simple linear regression of y on x, we
typically refer to x as the
Independent Variable, or
 Right-Hand Side Variable, or
 Explanatory Variable, or
 Regressor, or
 Covariate, or
 Control Variables
在y 对 x进行回归的简单二元回归模型中, x通常被称为
自变量,右边变量,解释变量,回归元,协变量,或
控制变量。

Intermediate Econometrics SILC
5
Some Terminology
术语注解
Equation
y = b0 + b1x + u
has only one nonconstant regressor x, it is
called a simple linear regression model, or twovariables regression model, or
bivariate linear regression model.
等式y = b0 + b1x + u只有一个非常数回归元。我们
称之为简单回归模型, 两变量回归模型或双变量
回归模型.

Intermediate Econometrics SILC
6
Some Terminology
术语注解
The coefficients b0 , b1 are called the regression
coefficients.
 b0 is also called the constant term or the
intercept term, or intercept parameter.
 b1 represents the marginal effects of the
regressor, x. It is also called the slope
parameter.
b0 , b1被称为回归系数。 b0也被称为常数项或截矩
项,或截矩参数。 b1代表了回归元x的边际效果,
也被成为斜率参数。

Intermediate Econometrics SILC
7
Some Terminology
术语注解

The variable u is called the error term or
disturbance in the relationship.
It represents factors other than x that can
affect y.
u 为误差项或扰动项,它代表了除了x之外可
以影响y的因素。

Intermediate Econometrics SILC
8
Some Terminology
术语注解




Meaning of linear: linear means linear in parameters,
not necessarily mean that y and x must have a linear
relationship.
There are many cases that y and x have nonlinear
relationship, but after some transformation, they are
linear in parameters.
For example, y=eb0+b1x+u .
线性的含义: y 和x 之间并不一定存在线性关系,
但是,只要通过转换可以使y的转换形式和x的转
换形式存在相对于参数的线性关系,该模型即称
为线性模型。
Intermediate Econometrics SILC
9
Examples
简单二元回归模型例子
A simple wage equation
wage= b0 + b1(years of education) + u
 b1 : if education increase by one year, how
much more wage will one gain.


上述简单工资函数描述了受教育年限和工资之间
的关系, b1 衡量了多接受一年教育工资可以增加
多少.
Intermediate Econometrics SILC
10
A Simple Assumption
关于u的假定



The average value of u, the error term, in
the population is 0. That is,
E(u) = 0
It it restrictive?
(2.5)
我们假定总体中误差项u的平均值为零. 该假定是
否具有很大的限制性呢?
Intermediate Econometrics SILC
11
A Simple Assumption
关于u的假定

If for example, E(u)=5. Then
y = (b0 +5)+ b1x + (u-5),
therefore, E(u’)=E(u-5)=0.

This is not a restrictive assumption, since we
can always use b0 to normalize E(u) to 0.

上述推导说明我们总可以通过调整常数项来实现
误差项的均值为零, 因此该假定的限制性不大.
Intermediate Econometrics SILC
12
Zero Conditional Mean Assumption
条件期望零值假定
We need to make a crucial assumption about
how u and x are related
 We want it to be the case that knowing
something about x does not give us any
information about u, so that they are completely
unrelated. That is
E(u|x) = E(u)。
我们需要对u和 x之间的关系做一个关键假定。理
想状况是对x的了解并不增加对u的任何信息。换
句话说,我们需要u和 x完全不相关。

Intermediate Econometrics SILC
13
Zero Conditional Mean Assumption
条件期望零值假定
Since we have assumed E(u) = 0,
therefore,
E(u|x) = E(u) = 0.
(2.6)
 What does it mean?
由于我们已经假定了E(u) = 0,因此有E(u|x)
= E(u) = 0。该假定是何含义?

Intermediate Econometrics SILC
14
Zero Conditional Mean Assumption
条件期望零值假定



In the example of education, suppose u
represents innate ability, zero conditional mean
assumption means
E(ability|edu=6)=E(ability|edu=18)=0.
The average level of ability is the same
regardless of years of education.
在教育一例中,假定u 代表内在能力,条件期望
零值假定说明不管接受教育的年限如何,该能力
的平均值相同。
Intermediate Econometrics SILC
15
Zero Conditional Mean Assumption
条件期望零值假定



Question: Suppose that a score on a final exam,
score, depends on classes attended (attend) and
unobserved factors that affect exam
performance (such as student ability). Then
consider model
score =b0 + b1attend +u
When would you expect it satisfy (2.6)?
假设期末成绩分数取决于出勤次数和影响学生现
场发挥的因素,如学生个人素质。那么上述模型
中假设(2.6)何时能够成立?
Intermediate Econometrics SILC
16
Zero Conditional Mean Assumption
条件期望零值假定



(2.6) implies the population regression function,
E(y|x) , satisfies
E(y|x) = b0 + b1x.
E(y|x) as a linear function of x, where for any x
the distribution of y is centered about E(y|x).
(2.6)说明总体回归函数应满足E(y|x) = b0 + b1x。
该函数是x的线性函数,y的分布以它为中心。
Intermediate Econometrics SILC
17
y
f(y)
给定x时y的
条件分布
.
x1=5
. E(y|x) = b + b x
0
1
x2 =10
Intermediate Econometrics SILC
18
Deriving the Ordinary Least Squares
Estimates 普通最小二乘法的推导
Basic idea of regression is to estimate the
population parameters from a sample
 Let {(xi,yi): i=1, …,n} denote a random
sample of size n from the population
 For each observation in this sample, it
will be the case that
yi = b0 + b1xi + ui

回归的基本思想是从样本去估计总体参数。 我们用{(xi,yi): i=1, …,n}
来表示一个随机样本,并假定每一观测值满足yi = b0 + b1xi + ui。
。
Intermediate Econometrics SILC
19
Population regression line, sample data points
and the associated error terms
总体回归线,样本观察点和相应误差
y
E(y|x) = b0 + b1x
.{
y4
u4
y3
y2
y1
u2 {.
.} u3
} u1
.
x1
x2
x3
Intermediate Econometrics SILC
x4
x
20
Deriving OLS Estimates
普通最小二乘法的推导
To derive the OLS estimator we need to
realize that our main assumption of E(u|x)
= E(u) = 0 also implies that
 Cov(x,u) = E(xu) = 0
 Why? Remember from basic probability
that Cov(X,Y) = E(XY) – E(X)E(Y)
由E(u|x) = E(u) = 0 可得Cov(x,u) = E(xu) =
0。

Intermediate Econometrics SILC
21
Deriving OLS continued
普通最小二乘法的推导
We can write our 2 restrictions just in
terms of x, y, b0 and b1 , since u = y – b0 –
b1x
 E(y – b0 – b1x) = 0
 E[x(y – b0 – b1x)] = 0
 These are called moment restrictions
 可将u = y – b0 – b1x代入以得上述两个矩条
件。

Intermediate Econometrics SILC
22
Deriving OLS using M.O.M.
使用矩方法推导普通最小二乘法
The method of moments approach to
estimation implies imposing the
population moment restrictions on the
sample moments。
 矩方法是将总体的矩限制应用于样本中。

Intermediate Econometrics SILC
23
Derivation of OLS
普通最小二乘法的推导
We want to choose values of the parameters that will
ensure that the sample versions of our moment
restrictions are true
目标是通过选择参数值,使得在样本中矩条件也可以成立。
 The sample versions are as follows:

n
1
 y
n
i 1
n
1
n
i

 bˆ 0  bˆ1 xi  0


ˆ  bˆ x  0
x
y

b
 i i 0 1 i
i 1
Intermediate Econometrics SILC
24
Derivation of OLS
普通最小二乘法的推导

Given the definition of a sample mean, and properties of
summation, we can rewrite the first condition as follows
根据样本均值的定义以及加总的性质,可将第一个条件
写为
y  bˆ0  bˆ1 x ,
or
bˆ0  y  bˆ1 x
Intermediate Econometrics SILC
25
Derivation of OLS
普通最小二乘法的推导
n
 


ˆ x  bˆ x  0
x
y

y

b
 i i
1
1 i
i 1
n
n
i 1
i 1
ˆ


x
y

y

b
 i i
1  xi  xi  x 
n
n
i 1
i 1
2
ˆ
 xi  x  yi  y   b1  xi  x 
Intermediate Econometrics SILC
26
So the OLS estimated slope is
因此OLS估计出的斜率为
n
bˆ1 
 x  x  y
i
i 1
n
 y
i
 x  x 
i 1
2
i
n
provided that
 x  x 
i 1
2
i
Intermediate Econometrics SILC
0
27
Summary of OLS slope estimate
OLS斜率估计法总结





The slope estimate is the sample covariance
between x and y divided by the sample variance
of x.
If x and y are positively correlated, the slope
will be positive.
If x and y are negatively correlated, the slope
will be negative.
Only need x to vary in our sample.
斜率估计量等于样本中x 和 y 的协方差除以x的方
差。若x 和 y 正相关则斜率为正,反之为负。
Intermediate Econometrics SILC
28
More OLS
关于OLS的更多信息




Intuitively, OLS is fitting a line through the
sample points such that the sum of squared
residuals is as small as possible, hence the term
least squares。
The residual, û, is an estimate of the error term,
u, and is the difference between the fitted line
(sample regression function) and the sample
point。
OLS法是要找到一条直线,使残差平方和最小。
残差是对误差项的估计,因此,它是拟合直线
(样本回归函数)和样本点之间的距离。
Intermediate Econometrics SILC
29
Sample regression line, sample data points
and the associated estimated error terms
样本回归线,样本数据点和相关的误差估计项
y
.
y4
û4 {
yˆ  bˆ0  bˆ1 x
y3
y2
y1
û2 { .
.} û3
û1
}
.
x1
x2
x3
Intermediate Econometrics SILC
x4
x
30
Alternate approach to derivation
推导方法二



Given the intuitive idea of fitting a line, we can set up a
formal minimization problem
That is, we want to choose our parameters such that we
minimize the following:
正式解一个最小化问题,即通过选取参数而使下列值最
小:
n
n

ˆ
ˆ
ˆ
 ui    yi  b 0  b1 xi
i 1
2
i 1
Intermediate Econometrics SILC

2
31
Alternate approach, continued
推导方法二


If one uses calculus to solve the minimization problem
for the two parameters you obtain the following first
order conditions, which are the same as we obtained
before, multiplied by n
如果直接解上述方程我们得到下面两式,这两个式子等
于前面两式乘以n
ˆ

y

b

n
i 1
n
i


ˆ x 0

b
0
1 i

ˆ  bˆ x  0
x
y

b
 i i 0 1i
i 1
Intermediate Econometrics SILC
32
Lecture Summary
讲义总结




Introduce the simple linear regression model.
Introduce the method of ordinary least squares
to estimate the slope and intercept parameters
using data from a random sample.
介绍简单线性回归模型
介绍通过随机样本的数据运用普通最小二乘法估
计斜率和截距的参数值
Intermediate Econometrics SILC
33
The Simple Regression Model
(2)
简单二元回归
y = b0 + b1x + u
Intermediate Econometrics
SILC
34
Chapter Outline
本章大纲






Definition of the Simple Regression Model
简单回归模型的定义
Deriving the Ordinary Least Squares Estimates
推导普通最小二乘法的估计量
Mechanics of OLS
OLS的操作技巧
Unites of Measurement and Functional Form
测量单位和回归方程形式
Expected Values and Variances of the OLS estimators
OLS估计量的期望值和方差
Regression through the Origin 过原点的回归
Intermediate Econometrics SILC
35
Lecture Outline
讲义大纲
Algebraic Properties of OLS OLS的代数特性
 Goodness of fit 拟合优度
 Effects of Changing Units in
Measurement on OLS Statistics
改变测量单位对OLS统计量的效果

Intermediate Econometrics SILC
36
Algebraic Properties of OLS
OLS的代数性质
 The sum of the OLS residuals is zero

OLS 残差和为零 (p24)
Thus, the sample average of the OLS residuals
is zero as well
因此 OLS
的样本残差平均值也为零.
n
n
ˆ  bˆ x)  0
ˆ
ˆ
u

(
y

b
i  i 0 1
i 1
i 1
1 n
and thus,  uˆi  0
n i 1
Intermediate Econometrics SILC
37
Algebraic Properties of OLS
OLS的代数性质
The sample covariance between the
regressors and the OLS residuals is zero
 回归元(解释变量)和OLS残差之间的样
本协方差为零 (p25)

n
 x uˆ
i 1
i i
0
Intermediate Econometrics SILC
38
Algebraic Properties of OLS
OLS的代数性质
The OLS regression line always goes
through the mean of the sample.
 OLS回归线总是通过样本的均值。

y  bˆ0  bˆ1 x
Intermediate Econometrics SILC
39
Algebraic Properties of OLS
OLS的代数性质

We can think of each observation as being
made up of an explained part, and an
unexplained part, 我们可把每一次观测看
作由被解释部分和未解释部分构成.
yi  yˆi  uˆi
 Then the fitted values and residuals are
uncorrelated in the sample.
预测值和残差在样本中是不相关的
cov( yˆi , uˆi )  0
Intermediate Econometrics SILC
40
Algebraic Properties of OLS
OLS的代数性质
cov( yˆ i , uˆi )  E ( yˆ i  E ( yˆ i ))(uˆi  E (uˆi ))
 E (( yˆ i  E ( yi ))uˆi )
 E ( yˆ i uˆi )  yE (uˆi )
 E[( bˆ  bˆ x )uˆ ]
0
1 i
i
 bˆ0 E (uˆi )  bˆ1 E ( xi uˆi )
0
Intermediate Econometrics SILC
41
More Terminology
更多术语

Define the total sum of square as 定义总
平方和为
n
SST   ( yi  y ) 2
i 1
Intermediate Econometrics SILC
42
More Terminology
更多术语
SST is a measure of the total sample variation
in the y’s; that is, it measures how spread out
the y’s are in the sample.
 总平方和是对y在样本中所有变动的度量,
即它度量了y在样本中的分散程度
If we divide SST by n-1, we obtain the sample
variance of y.
 将总平方和除以n-1,我们得到y的样本方差。

Intermediate Econometrics SILC
43
More Terminology
更多术语

Explained Sum of Squares (SSE)is defined
as 解释平方和定义为
n
SSE   ( y i  y )
2
i 1
 It
measures the sample variation in the
predicted value of y’s.

它度量了y的预测值的在样本中的变动
Intermediate Econometrics SILC
44
More Terminology
更多术语

Residual Sum of Squares is defined as
残差平方和定义为
SSR=
2
ˆ
u
i
 SSR
measures the sample variation in
the residuals.
 残差平方和度量了残差的样本变异
Intermediate Econometrics SILC
45
SST, SSR and SSE
The total variation in y can always be
expressed as the sum of the explained
variation SSE and the unexplained variation
SSR, i.e.
 y 的总变动可以表示为已解释的变动SSE和
未解释的变动SSR之和,即
 SST=SSE+SSR

Intermediate Econometrics SILC
46
Proof that SST = SSE + SSR
证明 SST = SSE + SSR
  y  y     y  yˆ    yˆ  y 
  uˆ   yˆ  y 
  uˆ  2 uˆ  yˆ  y     yˆ  y 
 SSR  2 uˆ  yˆ  y   SSE
2
2
i
i
i
i
2
i
i
2
2
i
i
i
i
i
i
Intermediate Econometrics SILC
47
Proof that SST = SSE + SSR
Using

ˆ
ˆ
u

0
,
x
u

0

i
i
i
i 1
i 1
n
n
one can show yˆ  y and




n
ˆ
ˆ
u
(
y

y
)

0
.
i
i
i 1
Therefore, SST = SSE + SSR.
We have used the fact that the fitted value and residuals
are uncorrelated in the sample.
该证明中我们使用了一个事实, 即样本中因变量的拟合值
和残差不相关.
Intermediate Econometrics SILC
48
Goodness-of-Fit
拟合优度





How do we think about how well our sample
regression line fits our sample data?
我们如何衡量样本回归线是否很好地拟合了样本
数据呢?
Can compute the fraction of the total sum of
squares (SST) that is explained by the model,
call this the R-squared of regression
可以计算模型解释的总平方和的比例,并把它定
义为回归的R-平方
R2 = SSE/SST = 1 – SSR/SST
Intermediate Econometrics SILC
49
Goodness-of-Fit
拟合优度






R-squared is the ratio of the explained variation
compared to the total variation.
R-平方是已解释的变动占所有变动的比例
It is thus interpreted as the fraction of the
sample variation in y that is explained by x.
它因此可被看作是y的样本变动中被可以被x解释
的部分
The value of R-squared is always between zero
and one.
R-平方的值总是在0和1之间
Intermediate Econometrics SILC
50
Goodness-of-Fit
拟合优度




In the social sciences, low R-squareds in
regression equations are not uncommon,
especially for cross-sectional analysis.
在社会科学中,特别是在截面数据分析中, 回归
方程得到低的R-平方值并不罕见。
It is worth emphasizing that a seemingly low Rsquared does not necessarily mean that an OLS
regression equation is useless.
值得强调的是表面上低的R-平方值不一定说明
OLS回归方程是没有价值的
Intermediate Econometrics SILC
51
Goodness-of-Fit
拟合优度

Example 2.8

CEO Salary and Return on Equity
CEO薪水和净资产回报
R  0.0132
2

Example 2.9

Voting outcomes and Campaign Expenditures
竞选结果和选举活动开支
R  0.856
2
Intermediate Econometrics SILC
52
Units of Measurement
测量单位




Suppose the salary is measured in hundreds of
dollars, rather than in thousands of dollars, say
salarhun.
假定薪水的单位是美元,而不是千美元,salarys.
What will be the OLS intercept and slope
estimates in the regression of salarhun on roe?
在Salarys对roe进行回归时OLS截距和斜率的估
计值是多少?
Intermediate Econometrics SILC
53
Units of Measurement
测量单位

The estimated sample regression is changed from
(estimated salarys)=963.191 + 18.501roe
to
(estimated salarys)=963191 + 18501roe

In general, when the dependent variable is multiplied by
the constant c, but nothing has changed for the
independent variable, the OLS intercept and slope
estimates are also multiplied by c.
一般而言,当因变量乘上常数c,而自变量不改变时,
OLS的截距和斜率估计量也要乘上c。
Intermediate Econometrics SILC
54
Units of Measurement
测量单位
If redefine roedec = roe/100, then the sample regression
line will change from
如果定义 roedec = roe/100,那么样本回归线将会从
(estimated salary)=963.191 + 18.501roe
to 改变到
(estimated salary)=963.191 + 1850.1roedec
 In general, if the independent variable is divided or
multiplied by some nonzero constant, c, then the OLS
slope coefficient is multiplied or divided by c, but the
intercept will not change.
一般而言,如果自变量除以或乘上某个非零常数,c,那
么OLS斜率将乘以或除以c,而截距则不改变。

Intermediate Econometrics SILC
55
Incorporating Nonlinearrities in Simple
Regression
在简单回归中加入非线性




Linear relationships are not general enough for all
economic applications.
线性关系并不适合所有的经济学运用
However, it is rather easy to incorporate many
nonlinearities into simple regression analysis by
appropriately defining the dependent and
independent variables.
然而,通过对因变量和自变量进行恰当的定义,
我们可以在简单回归分析中非常容易地处理许多
y和x之间的非线性关系.
Intermediate Econometrics SILC
56
The Natural Logarithm
y  log( x)
自然对数

log( x)  0
for 0  x  1
log(1)  0
log( x)
for
x 1
log( x1 x2 )  log( x1 )  log( x2 )
log( x1 / x2 )  log( x1 )  log( x2 )
log( x c )  c log( x)
log(1  x)  x
for
x0
log( x1 )  log( x0 )  ( x1  x0 ) / x0  x / x0
Intermediate Econometrics SILC
57




In the wage-education example, now suppose the
percentage increase in wage is the same, given one
more year of education.
在工资-教育的例子中,假定每增加一年的教育,
工资的百分比增长都是相同的
A model that gives a constant percentage effect is
能够给出不变的百分比效果的模型是
log(wage)  b 0  b1  educ  u

If u  0, we have
%wage  (100  b1 )educ.
Intermediate Econometrics SILC
58
Example 2.10

A log Wage Equation
将对数工资方程
log(ˆ wage)  0.584  0.083educ
n  526

R  0.186
2
ˆ  0.90  0.54educ
Compared to wage
和该方程相比 R 2  0.165
Intermediate Econometrics SILC
59

Another important use of the natural log is in
obtaining a constant elasticity model

自然对数的另一个重要用途是用于获得弹性为常
数的模型
log( salary)  b 0  b1 log( sales)  u


In the example of CEO Salary and Firm Sales, a
constant elasticity model is
在CEO的薪水和企业销售额的例子中,常数弹性
模型是
log(ˆ salary )  4.822  0.257 log( sales)
n  209,
R 2  0.211
Intermediate Econometrics SILC
60
Combination of functional forms available from
using either the original variable or its natural log
变量的原始形式和其自然对数的不同组合
Model
Dependent Independent
variable
Interpretation of b1
variable
Level-level
y
x
y  b1 x
Level-log
y
log( x)
y  ( b1 /100)%x
Log-level
log( y)
x
%y  (100 b1 )x
Log-log
log( y)
log( x)
%y  b1 %x
Intermediate Econometrics SILC
61
The Simple Regression Model
简单二元回归 (3)
y = b0 + b1x + u
Intermediate Econometrics
SILC
62
Chapter Outline
本章大纲






Definition of the Simple Regression Model
二元回归模型的定义
Deriving the Ordinary Least Squares Estimates
推导普通最小二乘法的估计量
Mechanics of OLS
OLS的操作技巧
Unites of Measurement and Functional Form
测量单位和函数形式
Expected Values and Variances of the OLS
estimators
OLS估计量的期望值和方差
Regression through the Origin
过原点回归
Intermediate Econometrics SILC
63
Expected Values and Variances of the OLS
Estimators
OLS估计量的期望值和方差

We will study the properties of the distributions of
OLS estimators over different random samples from
the population.

从总体中抽取的不同的随机样本可得到不同的
OLS估计量,我们将研究这些OLS估计量的分布。
We begin by establishing the unbiasedness of OLS
under a set of assumptions.
首先,我们在一些假定下证明OLS的无偏性。


Intermediate Econometrics SILC
64
Assumption SLR.1 (Linear in Parameters):
假定SLR.1 (关于参数是线性的)

In the population model, the dependent variable y is
related to the independent variable x and the error u
as
在总体模型中,因变量 y 和自变量 x 和残差
u 的关系可写作
y = b0 + b1x + u ,
where b0 and b1 are the population intercept and
slope parameters respectively.
其中 b0 和 b1 分别是总体的截距参数和斜率参
数
Intermediate Econometrics SILC
65
Assumption SLR.2 (Random Sampling):
假定SLR.2 (随机抽样):

Assume we can use a random sample of size n,
{(xi, yi): i=1, 2, …, n}, from the population model.
Thus we can write the sample model yi = b0 +
b1xi + ui
假定我们从总体模型随机抽取容量为n的样本, {(xi,
yi): i=1, 2, …, n}, 那么可以写出样本模型为 yi =
b0 + b1xi + ui
Intermediate Econometrics SILC
66
Assumptions SLR.3 and SLR.4
假定 SLR.3 和 SLR.4

SLR.3 , Zero Conditional Mean:
SLR.3, 零条件期望:
E (u | x)  0


Assume E(u|x) = 0 and thus in a random sample E(ui|xi)
=0
假定 E(u|x) = 0 . 那么在随机样本中我们有 E(ui|xi) = 0
SLR.4 (Sample Variation in the Independent Variable): In the
sample, the independent variables x‘s are not all equal to the
same constant.
SLR.4 (自变量中的样本变动): 在样本中,自变量 x 并不等
于一个不变常数。
Intermediate Econometrics SILC
67
Theorem 2.1 (Unbiasedness of OLS)
定理2.1 ( OLS的无偏性)
Using assumptions SLR.1 through SLR.4, we have
the expected value of the OLS estimates of b0, and
b1 equals the true values of b0 and b1 , respectively,
for any values of b0 and b1 .
使用假定SLR.1到SLR.4,我们可以得到无论 b0,
和 b1 取什么值,它们的OLS估计量的期望值等
于它们各自的真值。
 Proof:
证明:

Intermediate Econometrics SILC
68
Unbiasedness of OLS (cont)
OLS的无偏性(继续)



In order to think about unbiasedness, we need to
rewrite our estimator in terms of the population
parameter
为了思考无偏性,我们需要用总体的参数重新写出
估计量
Start with a simple rewrite of the formula as
把公式简单地改写为
bˆ1
x


i
 x  yi
s
2
x
, where
s    xi  x 
2
x
2
Intermediate Econometrics SILC
69
Unbiasedness of OLS (cont)
OLS的无偏性(继续)
 x  x y  x  x b  b x
 x  x b   x  x b x
   x  x u 
b   x  x   b   x  x x
   x  x u
i
i
i
0
1 i
i
1
i
i
 ui  
i
i
0
1 i
0
i
i
i
i
Intermediate Econometrics SILC
70
Unbiasedness of OLS (cont)
OLS的无偏性(继续)
 x  x   0,
 x  x x   x  x 
i
2
i
i
i
so, the numerator can be rewritten as
因此,分子可被重写作
b s   xi  x ui , and thus
2
1 x
xi  x ui

ˆ
b1  b1 
2
sx
Intermediate Econometrics SILC
71
Unbiasedness of OLS (cont)
OLS的无偏性(继续)
let d i   xi  x , so that
 1 
ˆ
b i  b1   2  d i ui , then
 sx 
 
 1 
ˆ
E b1  b1  
2   d i E ui   b1
 sx 
Intermediate Econometrics SILC
72
Unbiasedness of OLS (cont)
OLS的无偏性(继续)
由于bˆ0  y  bˆ1 x
 b 0  b1 x  u  bˆ1 x
 b  ( b  bˆ ) x  u
0
1
1
故而
E ( bˆ0 )  b 0  E[( b1  bˆ1 ) x ]  E (u )
 b0
Intermediate Econometrics SILC
73
Unbiasedness Summary
无偏性总结



The OLS estimates of b1 and b0 are unbiased
b1 和 b0 的OLS估计量是无偏的
Proof of unbiasedness depends on our 4 assumptions
– if any assumption fails, then OLS is not necessarily
unbiased
无偏性的证明依赖于我们的四个假定--如果任何假定不
成立,OLS未必是无偏的
Remember unbiasedness is a description of the
estimator – in a given sample we may be “near” or “far”
from the true parameter
记住无偏性是对估计量的描述--对于一个给定的样本我
们可能靠近也可能远离真实的参数值
Intermediate Econometrics SILC
74
Sampling Variance of the OLS Estimators
OLS估计量的抽样方差



Now we know that the sampling distribution of our
estimate is centered around the true parameter
现在我们知道估计量的随机抽样分布以真值为中心
Want to think about how spread out this distribution
is.
想知道的是这个分布散开的程度
This allows us to choose the best estimator among all, or at
least a broad class of, the unbiased estimators.
了解这一点(分布的分散程度),将对我们如何能够在所
有的估计量中,或至少在无偏估计量这一类估计量中选
出最优的一个具有一定的指导意义。
Intermediate Econometrics SILC
75
Sampling Variance of the OLS Estimators
OLS估计量的抽样方差
Much easier to think about this variance
under an additional assumption, so
在一个附加假定下计算这个方差会容易的
多,因此有
 Assume SLR.5 (Homoskedasticity):
假定 SLR.5 (同方差性):
Var(u|x) = s2 (Homoskedasticity)

Intermediate Econometrics SILC
76
Homoskedastic Case
同方差的情形
y
f(y|x)
.
x1
. E(y|x) = b + b x
0
1
x2
Intermediate Econometrics SILC
77
Heteroskedastic Case
异方差的情形
f(y|x)
.
.
x1
x2
.
x3
Intermediate Econometrics SILC
E(y|x) = b0 + b1x
x
78
Sampling Variance of OLS (cont)
OLS的抽样方差(继续)





Var(u|x) = E(u2|x)-[E(u|x)]2
E(u|x) = 0, so s2 = E(u2|x) = E(u2) = Var(u)
Thus s2 is also the unconditional variance,
called the error variance
因此 s2 也是无条件方差,被称作误差方差
s, the square root of the error variance is called
the standard deviation of the error
s, 误差方差的平方根被称作是标准误差
Can say: E(y|x)=b0 + b1x and Var(y|x) = s2
Intermediate Econometrics SILC
79
Heteroskedasticity in a Wage Equation
工资方程中的异方差性

When Var(y|x) depends on x we say there exists
heteroskedasticity.

当Var(y|x)值和x 相关是,我们称误差项存在异方差。

If a wage rate equation assumes homoskedasticity, it means
we assume Var(u|educ)=Var(wage|educ)= s2.
举例来说,如果我们假设工资一式满足同方差,那么就
意味着不管educ值为何水平,工资的分布相对于教育水
平而言都是相同的。


This may not be realistic since there with more education may
experience larger variance in wages.

如果接受高等教育的人面临的机会更多,收入的差异可
能更大,在这一情形中,上述假定未必成立。
Intermediate Econometrics SILC
80
Variance of OLS (cont)
OLS的方差(继续)
 


 1 
ˆ
Var b1  Var  b1  

2   d i ui 

 sx 


2
 1 
 1 

2  Var  d i ui   
2
 sx 
 sx 
 1 

2
 sx 
2
2
2
d
 i Var ui 
 1 
 d s  s  sx2 
2
i
2
2
2
2
2
d
 i
 
 1  2 s2
ˆ
s 
s


Var
b

2
2
x
1
s
s
x 
x

2
Intermediate Econometrics SILC
81
Variance of OLS (cont)
OLS的方差(继续)
Var ( bˆ0 )  Var ( b 0  ( b1  bˆ1 ) x  u )
 Var (( b  bˆ ) x )  Var (u )
1
1
 Var ( bˆ1 x )  Var (u )
 x 2Var ( bˆ )  Var (u )
1
2
2


n
x

(
x

x
)
s

i
2 s
2
x 2 
s 

2
sx
n
n
(
x

x
)


 i
2
x
s2
 i

2
(
x

x
)
n
 i
2
2
Intermediate Econometrics SILC
82
Theorem 2.2 (Sampling Variances of the
OLS Estimators)
定理 2.2 ( OLS 估计量的抽样方差 )

Under Assumption SLR.1 through SLR.5, we
have (2.57): 在假定 SLR.1 到 SLR.5 下,我
们有(2.57):
s2
s2
 
Var bˆ1 
s
2
x

n
2
(
x

x
)
 i
i 1

and
Var ( b 0 ) 
s2
2
(
x

x
)
 i
2
x
i
Intermediate Econometrics SILC
n
83
Variance of OLS Summary
OLS估计量样本方差的总结



The larger the error variance, s2, the larger the variance
of the slope estimate
误差方差 s2 越大,斜率估计量的方差也越大
The larger the variability in the xi, the smaller the
variance of the slope estimate. Hence we should choose
the xi’s to be as spread out as possible.
xi 的变动越大,斜率估计量的方差越小.因此我们应该选
择 尽可能的分散开的xi
Intermediate Econometrics SILC
84
Variance of OLS Summary
OLS估计量样本方差的总结

This is sometimes possible with experimental data, but rarely
do we have this luxury in the social sciences.
在实验数据中这一点(增大xi 的变动)有时是可能的,但在
社会科学中我们很少可以人为地增加xi的变动。

a larger sample size should decrease the variance of the
slope estimate
大的样本容量能够减小样本斜率估计量的方差。
Intermediate Econometrics SILC
85
Estimating the Error Variance
估计误差方差
We don’t know what the error variance, s2, is,
because we don’t observe the errors, ui
我们不知道误差方差 s2 是多少,因为我们不能观
察到误差 ui
 What we observe are the residuals, ûi
我们观测到的是残差 ûi
 We can use the residuals to form an estimate of
the error variance
我们可以用残差构成误差方差的估计

Intermediate Econometrics SILC
86
Estimating the Error Variance
估计误差方差
First, we notice s2=E(u2), therefore, an
unbiased estimator of s2 is (1 / n)n ui 2
i 1
首先,我们注意到 s2=E(u2), 所以s2的无偏估
n
计量是 (1 / n)i 1 ui 2
 ui is not observable, but we can find an
unbiased estimator for ui.
ui 是不可观测的,但我们找到一个ui的无偏
估计量

Intermediate Econometrics SILC
87
Error Variance Estimate (cont)
误差方差估计量(继续)
uˆi  yi  bˆ0  bˆ1 xi
 b 0  b1 xi  ui   bˆ0  bˆ1 xi
 u  bˆ  b  bˆ  b
i

0
0
 
1
1

Then, an unbiased estimator of s 2 is
那么,s 2的一个无偏估计量是
1
2
ˆ
sˆ 
u

i  SSR / n  2 
n  2
2
Intermediate Econometrics SILC
88
Error Variance Estimate (cont)
误差方差估计量(继续)
sˆ  sˆ 2  Standard error of the regression
sˆ  sˆ 2  回归的标准误
recall that sd bˆ  s

sx
if we substitute sˆ for s then we have
如果我们用sˆ替换s,那么我们可得到
the standard error of bˆ ,
1
bˆ1的标准误差,
 

2
se bˆ1  sˆ /   xi  x 

1
2
Intermediate Econometrics SILC
89
Summary
总结

Unbiasedness of OLS (cont)
OLS的无偏性

Sampling Variance of OLS (cont)
OLS的抽样方差


The definitions of standard deviation and
standard error
标准方差和标准误差的定义
Estimating the Error Variance
估计误差方差
Intermediate Econometrics SILC
90
Sample Problems, 2.8
样题,2.8
(i) From equation (2.66),
 n
  n 2
b1 =   xi yi  /   xi  .
 i 1
  i 1 
Plugging in yi = b0 + b1 xi + ui gives
代入 yi = b0 + b1 xi + ui 得到
 n
  n 2
b1 =   xi ( b 0  b1 xi  ui )  /   xi  .
 i 1
  i 1 
After standard algebra, the numerator can be written as
通过标准的代数运算,分子可被写作
n
n
n
b 0  xi b1  x   xi ui .
2
i 1
i 1
i
i 1
Intermediate Econometrics SILC
91
Putting this over the denominator shows we can write b1 as
把它除以分母,我们便可以把 b1 写成
b1
=
 n
  n 2
 n   n 2
b0   xi  /   xi  + b1 +   xi ui  /   xi  .
 i 1
  i 1 
 i 1   i 1 
Conditional on the x i, we have
条件于 x i,可得
 n   n 2
E( b1 ) = b 0   xi  /   xi  + b 1
 i 1   i 1 
because E(ui) = 0 for all i.
Therefore, the bias in b1 is given by the first term
因为 E(ui) = 0 对所有 i 成立。所以 b1 的偏差由这个方程的第一项给出。
in this equation. This bias is obviously zero when b 0 = 0. It is also zero when
n
x
i 1
i
= 0,
n
当b0 = 0 时,这个偏差显然为零。当  xi = 0,即 x = 0 时,它也为 0。在后一种
i 1
which is the same as x = 0. In the latter case, regression through the origin is identical to
regression with an intercept. 情形中,过原点回归等价于带有截距项的回归。
Intermediate Econometrics SILC
92
(ii) From the last expression for b1 in part (i) we have, conditional on the x i,
由部分(i)得到的 b1 最后的表达式,条件于 x i,我们可得
2
2




 n 2

2
2
Var( b1 ) =   xi  Var   xi ui  =   xi    xi Var(ui ) 
 i 1


 i 1 
 i 1   i 1
n
n
n
2

 2 n 2
 n 2
2
2
=   xi   s  xi  = s /   xi  .
 i 1 
 i 1   i 1 
n
Intermediate Econometrics SILC
93
n


(iii) From (2.57), Var( bˆ1 ) = s /   ( xi  x ) 2  .
 i 1

2
n
From the hint,
x
2
i
i 1
n
由提示  x 
i 1
2
i

n
 (x  x )
i 1
n
 (x  x )
i
i 1
2
i
2
, and so Var( b1 )  Var( bˆ1 ).
可得 Var( b1 )  Var( bˆ1 ).
n
A more direct way to see this is to write
 (x  x )
i 1
n
2
i
=
x
i 1
n
为了看清这一点,更直接的方式是写出  ( xi  x ) =
2
i 1
2
i
n
x
i 1
2
i
 n( x ) 2 ,
 n( x ) 2 ,
n
which is less than
x
i 1
2
i
unless x = 0.
n
除非 x = 0,它都小于  xi2 。
i 1
Intermediate Econometrics SILC
94
(iv) For a given sample size, the bias in b1 increases as
对于给定的样本容量, b1 的偏差随着 x 的增加而增大
x increases (holding the sum of the xi2 fixed).
But as x
(当 xi2 的和被取定时)。但是当 x 增加时, bˆ1 的方差相对于
increases, the variance of bˆ1 increases relative to Var( b1 ).
Var( b1 )增大。当 b 0 较小时, b1 的偏差也比较小。
The bias in b1 is also small when b 0 is small.
Therefore, whether we prefer b1 or bˆ1 on a mean squared
所以,是否我们在考虑均方误时偏好 b1 或 bˆ1 ,取决于
error basis depends on the sizes of b 0 , x , and n (in addition to
b 0 , x , 和 n 的大小
n
the size of
x
i 1
2
i
n
).(以及  xi2 的大小)
i 1
Intermediate Econometrics SILC
95
Download