Chapter 2 Econometrics Simple Linear Regression Analysis
Chapter 2 Econometrics Simple Linear Regression Analysis
Chapter 2
Simple Linear Regression Analysis
where y is termed as the dependent or study variable and X is termed as the independent or explanatory
variable. The terms 0 and 1 are the parameters of the model. The parameter 0 is termed as an intercept
term, and the parameter 1 is termed as the slope parameter. These parameters are usually called as
regression coefficients. The unobservable error component accounts for the failure of data to lie on the
straight line and represents the difference between the true and observed realization of y . There can be
several reasons for such difference, e.g., the effect of all deleted variables in the model, variables may be
qualitative, inherent randomness in the observations etc. We assume that is observed as independent and
identically distributed random variable with mean zero and constant variance 2 . Later, we will additionally
assume that is normally distributed.
The independent variables are viewed as controlled by the experimenter, so it is considered as non-stochastic
whereas y is viewed as a random variable with
E ( y ) 0 1 X
and
Var ( y ) 2 .
Sometimes X can also be a random variable. In such a case, instead of the sample mean and sample
variance of y , we consider the conditional mean of y given X x as
E ( y | x) 0 1 x
Var ( y | x) 2 .
When the values of 0 , 1 and 2 are known, the model is completely described. The parameters 0 , 1 and
2 are generally unknown in practice and is unobserved. The determination of the statistical model
y 0 1 X depends on the determination (i.e., estimation ) of 0 , 1 and 2 . In order to know the
values of these parameters, n pairs of observations ( xi , yi )(i 1,..., n) on ( X , y ) are observed/collected and
Various methods of estimation can be used to determine the estimates of the parameters. Among them, the
methods of least squares and maximum likelihood are the popular methods of estimation.
are assumed to satisfy the simple linear regression model, and so we can write
yi 0 1 xi i (i 1, 2,..., n).
The principle of least squares estimates the parameters 0 and 1 by minimizing the sum of squares of the
difference between the observations and the line in the scatter diagram. Such an idea is viewed from different
perspectives. When the vertical difference between the observations and the line in the scatter diagram is
considered, and its sum of squares is minimized to obtain the estimates of 0 and 1 , the method is known
as direct regression. yi
(xi,
Y 0 1 X
(Xi,
xi
Direct regression
Econometrics | Chapter 2 | Simple Linear Regression Analysis | Shalabh, IIT Kanpur
2
Alternatively, the sum of squares of the difference between the observations and the line in the horizontal
direction in the scatter diagram can be minimized to obtain the estimates of 0 and 1 . This is known as a
yi
Y 0 1 X
(xi, yi)
(Xi, Yi)
xi,
Instead of horizontal or vertical errors, if the sum of squares of perpendicular distances between the
observations and the line in the scatter diagram is minimized to obtain the estimates of 0 and 1 , the
yi
(xi
Y 0 1 X
(Xi
)
xi
Major axis regression method
Econometrics | Chapter 2 | Simple Linear Regression Analysis | Shalabh, IIT Kanpur
3
Instead of minimizing the distance, the area can also be minimized. The reduced major axis regression
method minimizes the sum of the areas of rectangles defined between the observed data points and the
nearest point on the line in the scatter diagram to obtain the estimates of regression coefficients. This is
shown in the following figure:
yi
(xi yi)
Y 0 1 X
(Xi, Yi)
xi
The method of least absolute deviation regression considers the sum of the absolute deviation of the
observations from the line in the vertical direction in the scatter diagram as in the case of direct regression to
obtain the estimates of 0 and 1 .
No assumption is required about the form of the probability distribution of i in deriving the least squares
estimates. For the purpose of deriving the statistical inferences only, we assume that i ' s are random
variable with E ( i ) 0, Var ( i ) 2 and Cov ( i , j ) 0 for all i j (i, j 1, 2,..., n). This assumption is
needed to find the mean, variance and other properties of the least-squares estimates. The assumption that
i ' s are normally distributed is utilized while constructing the tests of hypotheses and confidence intervals
of the parameters.
Based on these approaches, different estimates of 0 and 1 are obtained which have different statistical
properties. Among them, the direct regression approach is more popular. Generally, the direct regression
estimates are referred to as the least-squares estimates or ordinary least squares estimates.
Econometrics | Chapter 2 | Simple Linear Regression Analysis | Shalabh, IIT Kanpur
4
S ( 0 , 1 ) n
2 ( yt 0 1 xi )
0 i 1
S ( 0 , 1 ) n
2 ( yi 0 1 xi )xi .
1 i 1
S ( 0 , 1 )
0
0
S ( 0 , 1 )
0.
1
The solutions of these two equations are called the direct regression estimators, or usually called as the
ordinary least squares (OLS) estimators of 0 and 1 .
b0 y b1 x
sxy
b1
sxx
where
n n
1 n 1 n
sxy ( xi x )( yi y ), sxx ( xi x ) 2 , x i x , y yi .
i 1 i 1 n i 1 n i 1
Further, we have
2 S ( 0 , 1 ) n
02
2
i 1
(1) 2n,
2 S ( 0 , 1 ) n
1 2
2
i 1
xi2
2 S ( 0 , 1 ) n
2 xt 2nx .
0 1 i 1
The Hessian matrix which is the matrix of second-order partial derivatives, in this case, is given as
2 S ( 0 , 1 ) 2 S ( 0 , 1 )
02 0 1
H* 2
S ( , ) 2 S ( 0 , 1 )
0 1
0 1 12
n nx
2 n
nx xi2
i 1
'
2 , x
x '
where (1,1,...,1) ' is a n -vector of elements unity and x ( x1 ,..., xn ) ' is a n -vector of observations on X .
The matrix H * is positive definite if its determinant and the element in the first row and column of H * are
positive. The determinant of H * is given by
n
H * 4 n xi2 n 2 x 2
i 1
n
4n ( xi x ) 2
i 1
0.
n
The case when (x x )
i 1
i
2
0 is not interesting because all the observations, in this case, are identical, i.e.
xi c (some constant). In such a case, there is no relationship between x and y in the context of regression
n
analysis. Since (x x )
i 1
i
2
0, therefore H 0. So H is positive definite for any ( 0 , 1 ) , therefore,
The difference between the observed value yi and the fitted (or predicted) value yˆi is called a residual. The
i th residual is defined as
ei yi ~ yˆi (i 1, 2,..., n)
yi yˆi
yi (b0 b1 xi ).
Unbiased property:
sxy
Note that b1 and b0 y b1 x are the linear combinations of yi (i 1,..., n).
sxx
Therefore
n
b1 ki yi
i 1
n n
where ki ( xi x ) / sxx . Note that ki 0 and
i 1
k x
i 1
i i 1, so
n
E (b1 ) ki E ( yi )
i 1
n
ki ( 0 1 xi ) .
i 1
1.
E (b0 ) E y b1 x
E 0 1 x b1 x
0 1 x 1 x
0 .
Variances:
Using the assumption that yi ' s are independently distributed, the variance of b1 is
n
Var (b1 ) ki2Var ( yi ) ki k j Cov( yi , y j )
i 1 i j i
(x x )
i
2
2 i
(Cov( yi , y j ) 0 as y1 ,..., yn are independent)
sxx2
2 sxx
=
sxx2
2
= .
sxx
The variance of b0 is
Covariance:
The covariance between b0 and b1 is
It can further be shown that the ordinary least squares estimators b0 and b1 possess the minimum variance
in the class of linear and unbiased estimators. So they are termed as the Best Linear Unbiased Estimators
(BLUE). Such a property is known as the Gauss-Markov theorem, which is discussed later in multiple
linear regression model.
Econometrics | Chapter 2 | Simple Linear Regression Analysis | Shalabh, IIT Kanpur
8
i 1
n
( yi y ) b1 ( xi x )
2
i 1
n n n
( yi y ) 2 b12 ( xi x ) 2 2b1 ( xi x )( yi y )
i 1 i 1 i 1
2 2
s yy b s 2b s
1 xx 1 xx
s yy b12 sxx
2
s
s yy xy sxx
sxx
s2
s yy xy
sxx
s yy b1sxy .
n
1 n
where s yy ( yi y ) 2 , y yi .
i 1 n i 1
Estimation of 2
The estimator of 2 is obtained from the residual sum of squares as follows. Assuming that yi is normally
SSres
~ 2 (n 2).
2
Thus using the result about the expectation of a chi-square random variable, we have
E ( SSres ) (n 2) 2 .
Thus an unbiased estimator of 2 is
SSres
s2 .
n2
Note that SSres has only (n 2) degrees of freedom. The two degrees of freedom are lost due to estimation
(b ) s 2 1 x
2
Var 0
n sxx
and
2
(b ) s .
Var 1
sxx
n n
It is observed that since ( y yˆ ) 0,
i 1
i i so e
i 1
i 0. In the light of this property, ei can be regarded as an
estimate of unknown i (i 1,..., n) . This helps in verifying the different model assumptions on the basis of
Centered Model:
Sometimes it is useful to measure the independent variable around its mean. In such a case, the model
yi 0 1 X i i has a centred version as follows:
yi 0 1 ( xi x ) 1 x (i 1, 2,..., n)
0* 1 ( xi x ) i
where 0* 0 1 x . The sum of squares due to error is given by
n n 2
S ( 0* , 1 ) i2 yi 0* 1 ( xi x ) .
i 1 i 1
Now solving
S ( 0* , 1 )
0
0*
S ( 0* , 1 )
0,
1*
b0* y
and
sxy
b1 ,
sxx
respectively.
Thus the form of the estimate of slope parameter 1 remains the same in the usual and centered model
whereas the form of the estimate of intercept term changes in the usual and centered models.
Further, the Hessian matrix of the second order partial derivatives of S ( 0* , 1 ) with respect to 0* and 1
is positive definite at 0* b0* and 1 b1 which ensures that S ( 0* , 1 ) is minimized at 0* b0* and
1 b1 .
Under the assumption that E ( i ) 0,Var ( i ) 2 and Cov( i j ) 0 for all i j 1, 2,..., n , it follows that
E (b0* ) 0* , E (b1 ) 1 ,
2 2
Var (b0* ) , Var (b1 ) .
n sxx
y y b1 ( x x ),
For example, in analyzing the relationship between the velocity ( y ) of a car and its acceleration ( X ) , the
velocity is zero when acceleration is zero.
Using the data ( xi , yi ), i 1, 2,..., n, the direct regression least-squares estimate of 1 is obtained by
n n
minimizing S ( 1 ) i2 ( yi 1 xi ) 2 and solving
i 1 i 1
S ( 1 )
0
1
*
yx i i
b
1
i 1
n
.
xi2
i 1
The second-order partial derivative of S ( 1 ) with respect to 1 at 1 b1 is positive which insures that b1
minimizes S ( 1 ).
Using the assumption that E ( i ) 0,Var ( i ) 2 and Cov( i j ) 0 for all i j 1, 2,..., n , the properties
*
x E( y ) i i
E (b )
1
i 1
n
x
i 1
2
i
x 2
i 1
i 1
n
x
i 1
2
i
1
x Var ( y )
2
i i
Var (b1* ) i 1
2
n 2
xi
i 1
n
x 2
i
2 i 1
2
n 2
xi
i 1
2
n
x
i 1
2
i
y 2
i b1 yi xi
i 1 i 1
.
n 1
distribution N (0, 2 ). Now we use the method of maximum likelihood to estimate the parameters of the
linear regression model
yi 0 1 xi i (i 1, 2,..., n),
the observations yi (i 1, 2,..., n) are independently distributed with N ( 0 1 xi , 2 ) for all i 1, 2,..., n.
The likelihood function of the given observations ( xi , yi ) and unknown parameters 0 , 1 and 2 is
1/ 2
n
1 1
L( xi , yi ; 0 , 1 , 2 ) 2
exp 2 ( yi 0 1 xi ) 2 .
i 1 2 2
The maximum likelihood estimates of 0 , 1 and 2 can be obtained by maximizing L( xi , yi ; 0 , 1 , 2 ) or
equivalently in ln L( xi , yi ; 0 , 1 , 2 ) where
n n 1 n
ln L( xi , yi ; 0 , 1 , 2 ) ln 2 ln 2 2 ( yi 0 1 xi ) 2 .
2 2 2 i 1
The normal equations are obtained by partial differentiation of log-likelihood with respect to 0 , 1 and 2
0
2
(y
i 1
i 0 1 xi ) 0
ln L( xi , yi ; 0 , 1 , 2 ) 1 n
1
2
(y
i 1
i 0 1 xi )xi 0
and
ln L( xi , yi ; 0 , 1 , 2 ) n 1 n
2
( yi 0 1 xi )2 0.
2 2 2 4 i 1
The solution of these normal equations give the maximum likelihood estimates of 0 , 1 and 2 as
b0 y b1 x
n
( x x )( y y )
i i
sxy
b1 i 1
n
(x x ) 2 sxx
i
i 1
and
n
( y b i 0 b1 xi ) 2
s 2 i 1
n
respectively.
It can be verified that the Hessian matrix of second-order partial derivation of ln L with respect to 0 , 1 ,
and 2 is negative definite at 0 b0 , 1 b1 , and 2 s 2 which ensures that the likelihood function is
Note that the least-squares and maximum likelihood estimates of 0 and 1 are identical. The least-squares
and maximum likelihood estimates of 2 are different. In fact, the least-squares estimate of 2 is
1 n
s2 ( yi y )2
n 2 i 1
so that it is related to the maximum likelihood estimate as
n2 2
s 2 s .
n
Thus b0 and b1 are unbiased estimators of 0 and 1 whereas s 2 is a biased estimate of 2 , but it is
asymptotically unbiased. The variances of b0 and b1 are same as of b0 and b1 respectively but
Var ( s 2 ) Var ( s 2 ).
First, we develop a test for the null hypothesis related to the slope parameter
H 0 : 1 10
2
Assuming 2 to be known, we know that E (b1 ) 1 , Var (b1 ) and b1 is a linear combination of
sxx
2
b1 ~ N 1 ,
sxx
Reject H 0 if Z1 Z / 2
Similarly, the decision rule for one-sided alternative hypothesis can also be framed.
The 100 (1 )% confidence interval for 1 can be obtained using the Z1 statistic as follows:
P z /2 Z1 z /2 1
b1 1
P z /2 z /2 1
2
sxx
2 2
P b1 z /2 1 b1 z /2 1.
sxx sxx
So 100 (1 )% confidence interval for 1 is
2 2
b1 z / 2 , b1 z / 2
sxx sxx
where z / 2 is the / 2 percentage point of the N (0,1) distribution.
and
SS
E res 2 .
n2
Further, SSres / 2 and b1 are independently distributed. This result will be proved formally later in the next
module on multiple linear regression. This result also follows from the result that under normal distribution,
the maximum likelihood estimates, viz., the sample mean (estimator of population mean) and the sample
variance (estimator of population variance) are independently distributed, so b1 and s 2 are also
independently distributed.
Thus the following statistic can be constructed:
b1 1
t0
ˆ 2
sxx
b1 1
SSres
(n 2) sxx
which follows a t -distribution with (n 2) degrees of freedom, denoted as tn 2 , when H 0 is true.
reject H 0 if t0 tn 2, / 2
where tn 2, / 2 is the / 2 percent point of the t -distribution with (n 2) degrees of freedom. Similarly, the
decision rule for the one-sided alternative hypothesis can also be framed.
The 100 (1 )% confidence interval of 1 can be obtained using the t0 statistic as follows:
Consider
P t /2 t0 t /2 1
b1 1
P t /2 t /2 1
ˆ 2
sxx
ˆ 2 ˆ 2
P b1 t /2 1 b1 t / 2 1.
sxx sxx
So the 100 (1 )% confidence interval 1 is
SSres SS res
b1 tn 2, /2 , b1 tn 2, /2 .
(n 2) sxx (n 2) sxx
Reject H 0 if Z 0 Z /2
where Z /2 is the / 2 percentage points on the normal distribution. Similarly, the decision rule for one-
follows:
P z /2 Z 0 z /2 1
b0 0
P z /2 z /2 1
1 x2
2
n s xx
1 x2
21 x2
P b0 z /2 2 0 b0 z /2 1.
n sxx n sxx
So the 100 (1 )% of confidential interval of 0 is
1 x2 1 x2
b0 z / 2 2 , b0 z / 2 2 .
n sxx n sxx
where tn 2, / 2 is the / 2 percentage point of the t -distribution with (n 2) degrees of freedom. Similarly,
the decision rule for one-sided alternative hypothesis can also be framed.
Consider
P tn 2, /2 t0 tn 2, /2 1
b0 0
P tn 2, /2 tn 2, /2 1
SS res 1 x 2
n 2 n s xx
SSres 1 x 2 SS res 1 x 2
P b0 tn 2, /2 0 b0 tn 2, /2 1.
n 2 n sxx n 2 n sxx
SS res 1 x 2 SSres 1 x 2
b0 tn 2, / 2 , b0 tn 2, / 2 .
n 2 n sxx n 2 n sxx
SS r es
C0 ~ n2 2 under H 0 .
2
0
SS
P n2 2, /2 res n2 2,1 /2 1
2
SS SS
P 2 res 2 2 res 1 .
n 2,1 / 2 n 2, / 2
SSres SS
2 , 2 res .
n 2,1 / 2 n 2, / 2
confidence that both the estimates of 0 and 1 are correct. Consider the centered version of the linear
regression model
yi 0* 1 ( xi x ) i
sxy
b0* y and b1 ,
sxx
respectively.
Using the results that
E (b0* ) 0* ,
E (b1 ) 1 ,
2
Var (b0* ) ,
n
2
Var (b1 ) .
sxx
are also independently distributed because b0* and b1 are independently distributed. Consequently, the sum
of these two
n(b0* o* ) 2 sxx (b1 1 ) 2
~ 22 .
2
2
Since
SSres
~ n2 2
2
and SSres is independently distributed of b0* and b1 , so the ratio
n 2 Qf
2 SSres
where
n n
Q f n(b0 0 ) 2 2 xt (b0 1 )(b1 1 ) xi2 (b1 1 ) 2 .
i 1 i 1
Since
n 2 Q f
P F2, n 2 1
2 SS res
holds true for all values of 0 and 1 , so the 100 (1 ) % confidence region for 0 and 1 is
n 2 Qf
. F2, n 2;1 . .
2 SS res
This confidence region is an ellipse which gives the 100 (1 )% probability that 0 and 1 are contained
Analysis of variance:
The technique of analysis of variance is usually used for testing the hypothesis related to equality of more
than one parameters, like population means or slope parameters. It is more meaningful in case of multiple
regression model when there are more than one slope parameters. This technique is discussed and illustrated
here to understand the related basic concepts and fundamentals which will be used in developing the analysis
of variance in the next module in multiple linear regression model where the explanatory variables are more
than two.
A test statistic for testing H 0 : 1 0 can also be formulated using the analysis of variance technique as
follows.
( yi y )( yˆi y ) ( yi y )b1 ( xi x )
i 1 i 1
n
b12 ( xi x ) 2
i 1
n
( yˆi y ) 2 .
i 1
Thus we have
n n n
( yi y )2 ( yi yˆi )2 ( yˆi y )2 .
i 1 i 1 i 1
n
The term ( y y)
i 1
i
2
is called the sum of squares about the mean, corrected sum of squares of y (i.e.,
n
The term ( y yˆ )
i 1
i i
2
describes the deviation: observation minus predicted value, viz., the residual sum of
n
squares, i.e., SS res ( yi yˆi ) 2
i 1
n
whereas the term ( yˆ y )
i 1
i
2
describes the proportion of variability explained by the regression,
n
SS r e g ( yˆi y ) 2 .
i 1
n
If all observations yi are located on a straight line, then in this case ( y yˆ )
i 1
i i
2
0 and thus
SScorrected SS r e g .
Note that SS r e g is completely determined by b1 and so has only one degree of freedom. The total sum of
n n
squares s yy ( yi y ) 2 has (n 1) degrees of freedom due to constraint ( y y) 0
i and SS res has
i 1 i 1
All sums of squares are mutually independent and distributed as df2 with df degrees of freedom if the
MS r e g
F0 .
MSE
If H 0 : 1 0 is true, then MS r e g and MSE are independently distributed and thus
F0 ~ F1, n 2 .
F0 F1,n 2;1
at level of significance. The test procedure can be described in an Analysis of variance table.
Total s yy n 1
Moreover, we have
sxy s yy
b1 rxy .
sxx sxx
and
SSr e g s yy SS res
( sxy ) 2
sxx
2
b s 1 xx
b1sxy .
residuals, so a measure of the quality of a fitted model can be based on SSres . When the intercept term is
This is known as the coefficient of determination. This measure is based on the concept that how much
variation in y ’s stated by s yy is explainable by SSreg and how much unexplainable part is contained in
SSres . The ratio SSr e g / s yy describes the proportion of variability that is explained by regression in relation
to the total variability of y . The ratio SSres / s yy describes the proportion of variability that is not covered
by the regression.
It can be seen that
R 2 rxy2
where rxy is the simple correlation coefficient between x and y. Clearly 0 R 2 1 , so a value of R 2 closer
to one indicates the better fit and value of R 2 closer to zero indicates the poor fit.
Suppose we want to predict the value of E ( y ) for a given value of x x0 . Then the predictor is given by
E ( y | x0 ) ˆ y / x0 b0 b1 x0 .
Predictive bias
Then the prediction error is given as
ˆ y| x E ( y ) b0 b1 x0 E ( 0 1 x0 )
0
b0 b1 x0 ( 0 1 x0 )
(b0 0 ) (b1 1 ) x0 .
Then
E ˆ y| x0 E ( y ) E (b0 0 ) E (b1 1 ) x0
00 0
Thus the predictor y / x0 is an unbiased predictor of E ( y ).
Predictive variance:
The predictive variance of ˆ y| x0 is
PV ( ˆ y| x0 ) Var (b0 b1 x0 )
Var y b1 ( x0 x )
Var ( y ) ( x0 x ) 2 Var (b1 ) 2( x0 x )Cov( y , b1 )
2 2 ( x0 x ) 2
0
n sxx
1 ( x x )2
2 0 .
n sxx
2 1 ( x0 x ) 2
PV ( ˆ y| x0 ) ˆ
n sxx
1 ( x x )2
MSE 0 .
n sxx
The predictor ˆ y| x0 is a linear combination of normally distributed random variables, so it is also normally
distributed as
ˆ y| x ~ N 0 1 x0 , PV ˆ y| x
0 0
.
So if 2 is known, then the distribution of
ˆ y| x E ( y | x0 )
0
PV ( ˆ y| x0 )
ˆ y| x0 E ( y | x0 )
P z /2 z /2 1
PV ( ˆ y| x0 )
( x0 x ) 2
2 1 ( x0 x ) 2 2 1
ˆ
y| x0 z /2 ˆ
, y| x0 z /2 .
n sxx n sxx
When 2 is unknown, it is replaced by ˆ 2 MSE and in this case the sampling distribution of
ˆ y|x E ( y | x0 )
0
1 ( x x )2
MSE 0
n sxx
1 ( x x )2 1 ( x0 x ) 2
ˆ y| x0 t /2, n 2 MSE 0 , ˆ
y| x0 t /2, n 2 MSE .
n sxx n sxx
Note that the width of the prediction interval E ( y | x0 ) is a function of x0 . The interval width is minimum
for x0 x and widens as x0 x increases. This is also expected as the best estimates of y to be made at
x -values lie near the center of the data and the precision of estimation to deteriorate as we move to the
boundary of the x -space.
ŷ0 b0 b1 x0 .
The true value of y in the prediction period is given by y0 0 1 x0 0 where 0 indicates the value that
would be drawn from the distribution of random error in the prediction period. Note that the form of
predictor is the same as of average value predictor, but its predictive error and other properties are different.
This is the dual nature of predictor.
Predictive bias:
The predictive error of ŷ0 is given by
yˆ 0 y0 b0 b1 x0 ( 0 1 x0 0 )
(b0 0 ) (b1 1 ) x0 .
Thus, we find that
E ( yˆ 0 y0 ) E (b0 0 ) E (b1 1 ) x0 E ( 0 )
000 0
Predictive variance
Because the future observation y0 is independent of ŷ0 , the predictive variance of ŷ0 is
PV ( yˆ 0 ) E ( yˆ 0 y0 ) 2
E[(b0 0 ) ( x0 x )(b1 1 ) (b1 1 ) x 0 ]2
Var (b0 ) ( x0 x ) 2 Var (b1 ) x 2Var (b1 ) Var ( 0 ) 2( x0 x )Cov(b0 , b1 ) 2 xCov(b0 , b1 ) 2( x0 x )Var (b1 )
[rest of the terms are 0 assuming the independence of 0 with 1 , 2 ,..., n ]
Var (b0 ) [( x0 x ) 2 x 2 2( x0 x )]Var (b1 ) Var ( ) 2[( x0 x ) 2 x ]Cov(b0 , b1 )
Var (b0 ) x02Var (b1 ) Var ( 0 ) 2 x0Cov(b0 , b1 )
1 x2 2 x 2
2 x02 2 2 x0
n sxx sxx sxx
1 ( x x )2
2 1 0 .
n sxx
Prediction interval:
If 2 is known, then the distribution of
yˆ 0 y0
PV ( yˆ 0 )
yˆ y0
P z /2 0 z /2 1
PV ( yˆ 0 )
which gives the prediction interval for y0 as
1 ( x x )2 1 ( x0 x ) 2
2
yˆ 0 z /2 2 1 0 , ˆ
0 /2
y z 1 .
n sxx n sxx
follows a t -distribution with (n 2) degrees of freedom. The 100(1- )% prediction interval for ŷ0 in this
case is obtained as
yˆ y0
P t /2,n 2 0 t /2, n 2 1
( yˆ )
PV
0
which gives the prediction interval
1 ( x x )2 1 ( x0 x ) 2
yˆ 0 t /2,n 2 MSE 1 0 , ˆ
y
0 /2,n 2
t MSE 1 .
n sxx n sxx
The prediction interval for ŷ0 is wider than the prediction interval for ˆ y / x0 because the prediction interval
for ŷ0 depends on both the error from the fitted model as well as the error associated with the future
observations.
Y 0 1 X
(xi,
(Xi,
)
x,
Reverse regression
Econometrics | Chapter 2 | Simple Linear Regression Analysis | Shalabh, IIT Kanpur
30
The reverse regression has been advocated in the analysis of gender (or race) discrimination in salaries. For
example, if y denotes salary and x denotes qualifications, and we are interested in determining if there is
gender discrimination in salaries, we can ask:
“Whether men and women with the same qualifications (value of x) are getting the same salaries
(value of y). This question is answered by the direct regression.”
where i ’s are the associated random error components and satisfy the assumptions as in the case of the
usual simple linear regression model. The reverse regression estimates ˆOR of 0* and ˆ1R of 1* for the
model are obtained by interchanging the x and y in the direct regression estimators of 0 and 1 . The
*
sxy2
SS res sxx .
s yy
Note that
ˆ sxy2
1R b1 rxy2
sxx s yy
where b1 is the direct regression estimator of the slope parameter and rxy is the correlation coefficient
between x and y. Hence if rxy2 is close to 1, the two regression lines will be close to each other.
An important application of the reverse regression method is in solving the calibration problem.
yi
(xi, yi)
Y 0 1 X
(Xi, Yi)
xi
If we assume that the regression line to be fitted is Yi 0 1 X i , then it is expected that all the observations
( xi , yi ), i 1, 2,..., n lie on this line. But these points deviate from the line, and in such a case, the squared
di2 ( X i xi ) 2 (Yi yi )2
where ( X i , Yi ) denotes the i th pair of observation without any error which lies on the line.
n
The objective is to minimize the sum of squared perpendicular distances given by i 1
di2 to obtain the
estimates of 0 and 1 . The observations ( xi , yi ) (i 1, 2,..., n) are expected to lie on the line
Yi 0 1 X i ,
so let
Ei Yi 0 1 X i 0.
n
The regression coefficients are obtained by minimizing d
i 1
i
2
under the constraints Ei ' s using the
where 1 ,..., n are the Lagrangian multipliers. The set of equations are obtained by setting
L0 L L L
0, 0 0, 0 0 and 0 0 (i 1, 2,..., n).
X i Yi 0 1
Thus we find
L0
( X i xi ) i 1 0
X i
L0
(Yi yi ) i 0
Yi
L0 n
0
i 1
i 0
L0 n
1
X
i 1
i i 0.
Since
X i xi i 1
Yi yi i ,
Ei ( yi i ) 0 1 ( xi i 1 ) 0
0 1 xi yi
i .
1 12
n
Also using this i in the equation
i 1
i 0 , we get
( 0 1 xi yi )
i 1
0
1 12
n
and using ( X i xi ) i 1 0 and X
i 1
i i 0 , we get
( x ) 0.
i 1
i i i 1
( x x 0 i
2
1 i yi xi )
1 ( 0 1 xi yi ) 2
i 1
0. (1)
(1 i2 ) (1 12 ) 2
n
Using i in the equation and using the equation
i 1
i 0 , we solve
( 0 1 xi yi )
i 1
0.
1 12
ˆ0OR y ˆ1OR x
i 1 i 1
or
n n 2
(1 ) 1
2
x y y ( x x ) ( y y ) ( x x )
i 1
i i 1 i 1
i 1
i 1 i 0
or
n n
(1 12 ) (ui x )(vi 1ui ) 1 (vi 1ui ) 2 0
i 1 i 1
where
ui xi x ,
vi yi y .
n n
Since ui ui 0, so
i 1 i 1
n
i 1
u v 1 (ui2 vi2 ) ui vi 0
2
1 i i
or
12 sxy 1 ( sxx s yy ) sxy 0.
where sign( sxy ) denotes the sign of sxy which can be positive or negative. So
1 if sxy 0
sign( sxy ) .
1 if sxy 0.
n
Notice that this gives two solutions for ˆ1OR . We choose the solution which minimizes d i
2
. The other
i 1
n
solution maximizes d
i 1
i
2
and is in the direction perpendicular to the optimal solution. The optimal solution
(xi yi)
Y 0 1 X
(Xi, Yi)
xi
Suppose the regression line is Yi 0 1 X i on which all the observed points are expected to lie. Suppose
the points ( xi , yi ), i 1, 2,..., n are observed which lie away from the line. The area of rectangle extended
where ( X i , Yi ) denotes the i th pair of observation without any error which lies on the line.
Ai ( X i ~ xi )(Yi ~ yi ).
i 1 i 1
All observed data points ( xi , yi ), (i 1, 2,..., n) are expected to lie on the line
Yi 0 1 X i
and let
Ei* Yi 0 1 X i 0.
So now the objective is to minimize the sum of areas under the constraints Ei* to obtain the reduced major
axis estimates of regression coefficients. Using the Lagrangian multiplier method, the Lagrangian function is
n n
LR Ai i Ei*
i 1 i 1
n n
( X i xi )(Yi yi ) i Ei*
i 1 i 1
where 1 ,..., n are the Lagrangian multipliers. The set of equations are obtained by setting
LR L L L
0, R 0, R 0, R 0 (i 1, 2,..., n).
X i Yi 0 1
Thus
LR
(Yi yi ) 1i 0
X i
LR
( X i xi ) i 0
Yi
LR n
i 0
0 i 1
LR n
i X i 0.
1 i 1
Now
X i xi i
Yi yi 1i
0 1 X i yi 1i
0 1 ( xi i ) yi 1i
y 0 1 xi
i i .
2 1
n
Substituting i in
i 1
i 0, the reduced major axis regression estimate of 0 is obtained as
ˆ0 RM y ˆ1RM x
where ˆ1RM is the reduced major axis regression estimate of 1 . Using X i xi i , i and ˆ0 RM in
n
X
i 1
i i 0 , we get
n
yi y 1 x 1 xi yi y 1 x 1 xi
i 1 21
xi
21
0.
Let ui xi x and vi yi y , then this equation can be re-expressed as
n
(v u )(v u 2 x ) 0.
i 1
i 1 i i 1 i 1
n n
Using ui ui 0, we get
i 1 i 1
n n
Solving this equation, the reduced major axis regression estimate of 1 is obtained as
s yy
ˆ1RM sign( sxy )
sxx
1 if sxy 0
where sign ( sxy )
1 if sxy 0.
We choose the regression estimator which has same sign as of sxy .
In the method of least squares, the estimates of the parameters 0 and 1 in the model
n
yi 0 1 xi i . (i 1, 2,..., n) are chosen such that the sum of squares of deviations
i 1
i
2
is minimum. In
the method of least absolute deviation (LAD) regression, the parameters 0 and 1 are estimated such that
n
the sum of absolute deviations
i 1
i is minimum. It minimizes the absolute vertical sum of errors as in the
yi
(xi, yi)
Y 0 1 X
(Xi, Yi)
xi
Least absolute deviation regression
The LAD estimates ˆ0 L and ˆ1L are the estimates of 0 and 1 , respectively which minimize
n
LAD( 0 , 1 ) yi 0 1 xi
i 1
Conceptually, LAD procedure is more straightforward than OLS procedure because e (absolute residuals)
is a more straightforward measure of the size of the residual than e 2 (squared residuals). The LAD
regression estimates of 0 and 1 are not available in closed form. Instead, they can be obtained
numerically based on algorithms. Moreover, this creates the problems of non-uniqueness and degeneracy in
the estimates. The concept of non-uniqueness relates to that more than one best line pass through a data
point. The degeneracy concept describes that the best line through a data point also passes through more than
one other data points. The non-uniqueness and degeneracy concepts are used in algorithms to judge the
quality of the estimates. The algorithm for finding the estimators generally proceeds in steps. At each step,
the best line is found that passes through a given data point. The best line always passes through another
data point, and this data point is used in the next step. When there is non-uniqueness, then there is more than
one best line. When there is degeneracy, then the best line passes through more than one other data point.
When either of the problems is present, then there is more than one choice for the data point to be used in the
next step and the algorithm may go around in circles or make a wrong choice of the LAD regression line.
The exact tests of hypothesis and confidence intervals for the LAD regression estimates can not be derived
analytically. Instead, they are derived analogously to the tests of hypothesis and confidence intervals related
to ordinary least squares estimates.
Suppose both dependent and independent variables are stochastic in the simple linear regression model
y 0 1 X
where is the associated random error component. The observations ( xi , yi ), i 1, 2,..., n are assumed to be
jointly distributed. Then the statistical inferences can be drawn in such cases which are conditional on X .
are the means of X and y; x2 and y2 are the variances of X and y; and is the correlation coefficient
between X and y . Then the conditional distribution of y given X x is the univariate normal
conditional mean
E ( y | X x) y| x 0 1 x
Var ( y | X x) y2| x y2 (1 2 )
where
0 y x 1
and
y
1 .
x
Econometrics | Chapter 2 | Simple Linear Regression Analysis | Shalabh, IIT Kanpur
40
When both X and y are stochastic, then the problem of estimation of parameters can be reformulated as
follows. Consider a conditional random variable y | X x having a normal distribution with mean as
conditional mean y| x and variance as conditional variance Var ( y | X x) y2| x . Obtain n independently
distributed observation yi | xi , i 1, 2,..., n from N ( y| x , y2| x ) with nonstochastic X . Now the method of
maximum likelihood can be used to estimate the parameters which yield the estimates of 0 and 1 as
( y y )( x x )
i i
ˆ i 1
n n
( xi x )2
i 1
( y y)
i 1
i
2
sxy
sxx s yy
s
b1 xx .
s yy
Thus
sxx
ˆ 2 b12
s yy
s
b1 xy
s yy
n
s yy ˆi2
i 1
s yy
R2
which is same as the coefficient of determination. Thus R 2 has the same expression as in the case when X
is fixed. Thus R 2 again measures the goodness of the fitted model even when X is stochastic.