Approximating the following system using ordinary least squares regression y=p_0+p_1 x_1+p_2 x_2+...p_M x_M=epsilon P. I know that a property of the least squares estimator is that the sum of the residuals, ri=y^i−yi, is equal to zero. However, what I am finding is that the sum of the residuals multiplied by one of the regressors, epsilon m in (1,x_1,x_2,...,x_M), is also equal to zero. I have found this to be true in all cases in simulation, but I am not sure how to prove it.

Ronnie Rojas

Ronnie Rojas

Answered question

2022-08-09

Approximating the following system using ordinary least squares regression
y = p 0 + p 1 x 1 + p 2 x 2 + . . . p M x M = ξ P
I know that a property of the least squares estimator is that the sum of the residuals, r i = y ^ i y i , is equal to zero. However, what I am finding is that the sum of the residuals multiplied by one of the regressors, ξ m ( 1 , x 1 , x 2 , . . . , x M ), is also equal to zero. I have found this to be true in all cases in simulation, but I am not sure how to prove it.
i = 0 N r i ξ m = 0

Answer & Explanation

Kole Weber

Kole Weber

Beginner2022-08-10Added 16 answers

Consider a regression model
y i = X i β + ϵ i
The least squares problem is to minimize
i = 1 n ( y i X i β ) 2
The first order condition for the optimal coefficient vecto r β ^ is
i = 1 n 2 ( y i X i β ^ ) X i = 0
or
i = 1 n ϵ i X i = 0
which says that the sample autocovariance between the residual and each regressor is zero.
kvasilw0

kvasilw0

Beginner2022-08-11Added 2 answers

The property is true because, in linear regression, you are projecting (orthogonally) your target vector onto the subspace generated by the features (columns of the design matrix) and solving an approximate system
X w = y ~
where y ~ is the projection of y onto the above mentioned subspace. Then the difference y y ~ is orthogonal to the subspace, so it is orthogonal to each of the feature columns and, therefore, the dot products are equal to zero.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in High school statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?