Chapter4
Predictions In Linear Regression Model
Prediction of values of study variable
An important use of linear regression modeling is to predict the average and actual values of the study
variable. The term prediction of the value of study variable corresponds to knowing the value of E ( y ) (in
case of average value) and value of y (in case of actual value) for a given value of the explanatory
variable. We consider both cases. The prediction of values consists of two steps. In the first step, the
regression coefficients are estimated on the basis of given observations. In the second step, these
estimators are then used to construct the predictor which provides the prediction of actual or average
values of study variables. Based on this approach of construction of predictors, there are two situations in
which the actual and average values of the study variable can be predicted- within sample prediction and
outside sample prediction. We describe the prediction in both situations.
Within sample prediction in simple linear regression model
Consider the linear regression model y 0 1 x . Based on a sample of n sets of paired
observations ( xi , yi ) (i 1, 2,..., n) following yi 0 1 xi i , where i ’s are identically and
independently distributed following N (0, 2 ) . The parameters 0 and 1 are estimated using the
ordinary least squares estimation as b0 of 0 and b1 of 1 as
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
The fitted model is y b0 b1 x .
Case 1: Prediction of average value of y
Suppose we want to predict the value of E ( y ) for a given value of x x0 . Then the predictor is given by
pm b0 b1 x0 .
Here m stands for mean value.
Econometrics | Chapter 4 | Predictions In Linear Regression Model | Shalabh, IIT Kanpur
1
, Predictive bias
The prediction error is given as
pm E ( y ) b0 b1 x0 E ( 0 1 x0 )
b0 b1 x0 ( 0 1 x0 )
(b0 0 ) (b1 1 ) x0 .
Then the prediction bias is given as
E pm E ( y ) E (b0 0 ) E (b1 1 ) x0
0 0 0.
Thus the predictor pm is an unbiased predictor of E ( y ).
Predictive variance:
The predictive variance of pm is
PV ( pm ) 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 ( x0 x ) 2
2
.
n sxx
Estimate of predictive variance
The predictive variance can be estimated by substituting 2 by ˆ 2 MSE as
( p ) ˆ 2 1 ( x0 x )
2
PV m
n sxx
1 ( x x )2
MSE 0 .
n sxx
Prediction interval :
The 100(1- )% prediction interval for E ( y ) is obtained as follows:
The predictor pm is a linear combination of normally distributed random variables, so it is also normally
distributed as
pm ~ N 0 1 x0 , PV pm .
Econometrics | Chapter 4 | Predictions In Linear Regression Model | Shalabh, IIT Kanpur
2
Predictions In Linear Regression Model
Prediction of values of study variable
An important use of linear regression modeling is to predict the average and actual values of the study
variable. The term prediction of the value of study variable corresponds to knowing the value of E ( y ) (in
case of average value) and value of y (in case of actual value) for a given value of the explanatory
variable. We consider both cases. The prediction of values consists of two steps. In the first step, the
regression coefficients are estimated on the basis of given observations. In the second step, these
estimators are then used to construct the predictor which provides the prediction of actual or average
values of study variables. Based on this approach of construction of predictors, there are two situations in
which the actual and average values of the study variable can be predicted- within sample prediction and
outside sample prediction. We describe the prediction in both situations.
Within sample prediction in simple linear regression model
Consider the linear regression model y 0 1 x . Based on a sample of n sets of paired
observations ( xi , yi ) (i 1, 2,..., n) following yi 0 1 xi i , where i ’s are identically and
independently distributed following N (0, 2 ) . The parameters 0 and 1 are estimated using the
ordinary least squares estimation as b0 of 0 and b1 of 1 as
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
The fitted model is y b0 b1 x .
Case 1: Prediction of average value of y
Suppose we want to predict the value of E ( y ) for a given value of x x0 . Then the predictor is given by
pm b0 b1 x0 .
Here m stands for mean value.
Econometrics | Chapter 4 | Predictions In Linear Regression Model | Shalabh, IIT Kanpur
1
, Predictive bias
The prediction error is given as
pm E ( y ) b0 b1 x0 E ( 0 1 x0 )
b0 b1 x0 ( 0 1 x0 )
(b0 0 ) (b1 1 ) x0 .
Then the prediction bias is given as
E pm E ( y ) E (b0 0 ) E (b1 1 ) x0
0 0 0.
Thus the predictor pm is an unbiased predictor of E ( y ).
Predictive variance:
The predictive variance of pm is
PV ( pm ) 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 ( x0 x ) 2
2
.
n sxx
Estimate of predictive variance
The predictive variance can be estimated by substituting 2 by ˆ 2 MSE as
( p ) ˆ 2 1 ( x0 x )
2
PV m
n sxx
1 ( x x )2
MSE 0 .
n sxx
Prediction interval :
The 100(1- )% prediction interval for E ( y ) is obtained as follows:
The predictor pm is a linear combination of normally distributed random variables, so it is also normally
distributed as
pm ~ N 0 1 x0 , PV pm .
Econometrics | Chapter 4 | Predictions In Linear Regression Model | Shalabh, IIT Kanpur
2