$epsilon =sum (y_i-beta x_i)$
$beta = frac {sum x_iy_i}{sum x_i^2}$
$sum y_i – frac {sum x_iy_i}{sum x_i^2}sum x_i=0$?
Is the sum equal zero or not? I only know that $sum y_i =nbar y$ and $sum x_i =nbar x$ but what to do with the fraction term?
Best Answer
The residuals are perpendicular to the regressor vectors $x_{j,i}$. That means for each $j$ we have: $$sum_{i=1}^{i=n} x_{j,i} epsilon_i = 0$$
So if one of the regressors vectors, say $x_{1,i}$, is an intercept term (that means $x_{1,i} = 1$, or a constant instead of 1, for all $i$) then we always have: $$sum_{i=1}^{i=n} epsilon_i = 0$$ which means that then the residuals sum to zero.
If this is not the case (as is your case), then the residuals do not necessarily sum to zero.
You will get:
$$sum epsilon_i = sum y_{i} – beta_1 sum x_{1,i} – beta_2 sum x_{2,i} -… – beta_{k-1} sum x_{k-1,i} – beta_k sum x_{k,i}$$
In your case when there is only a single regressor
$$sum epsilon_i = sum y_{i} – beta_1 sum x_{1,i}$$
which is only zero iff
$$frac{sum y_{i}}{sum x_{i}}= frac{sum x_{i} y_i }{sum x_{i}^2}$$
(where we applied a division, possibly by zero, so also the case $sum x_{i} = sum y_{i} = 0$, counts)
Similar Posts:
- Solved – Covariance term in simple linear regression
- Solved – Proof of MSE is unbiased estimator in Regression
- Solved – Relationship between noise term ($epsilon$) and MLE solution for Linear Regression Models
- Solved – Covariance of OLS estimator and residual = 0. Where is the mistake
- Solved – Variance of residuals vs. MLE of the variance of the error term