Do Residuals Always Sum to Zero in Regression Analysis?

  • A
  • Thread starter FallenApple
  • Start date
  • Tags
    Zero
In summary: In fact, that's what the theorem is about.In summary, the two models are equivalent and the parameter estimates will be identical if the models are parameterized using the same design matrix.
  • #1
FallenApple
566
61
Ok so say I'm comparing two groups. I can do it this way ##Y_{i}=b_{1}*I(G1)+b_{2}*I(G2)+e_{i}## where I(G1) is 1 if in group 1 and 0 if not. I(G2) is 1 if in group 2 and 0 if not. In that case, my design matrix will not have a column of ones.

However, if I reparameterise to ##Y_{i}=b_{0}+b_{2}*I(G2)+e_{i}## since I know I(G2) and I(G1) has to sum to 1. I will get a design matrix with ones in the first column. I think there is a theorem that says that the residuals sum to 0 if this is the case.

Now, does this mean that the residuals sum to zero for the first parameterization as well? After all, the two models should be equivalent.
 
Physics news on Phys.org
  • #2
The two models are equivalent, since ##G1=1-G2##, ##b_0=b_1## and ##b'_2=b_2-b_1## where ##b'_2## is the coefficient of ##I(G_2)## in the second model.

Given the models are equivalent, I imagine that the parameter estimates will be equivalent. Conceivably that may differ by estimation method. The method for OLS is Maximum Likelihood and I'm pretty sure that would give identical estimates, but one would need to work through the equations for the estimates, substituting the equivalences in the preceding paragraph, to be sure.

If the parameter estimates are equivalent then the residuals will be identical since the linear estimators will be identical, so if the residuals sum to zero for the first model they will do that for the second as well.
 
  • Like
Likes FallenApple and FactChecker
  • #3
If you are minimizing the sum-squared-errors for your parameter estimates, I don't think that the residuals have to sum to zero.
 
  • Like
Likes FallenApple
  • #4
I agree with FactChecker. I am not aware of any theorem about residuals summing to zero. If one is using Maximum-Likelihood estimation of the coefficients (ie the usual, simplest way) then the sum of the products of residuals ##\varepsilon_i## with regressors ##I(G2_i)## will be zero, that is, ##\sum_i \varepsilon_i I(G2_i)=0##. Could that be the theorem you had in mind?
 
  • Like
Likes FallenApple
  • #5
andrewkirk said:
I agree with FactChecker. I am not aware of any theorem about residuals summing to zero. If one is using Maximum-Likelihood estimation of the coefficients (ie the usual, simplest way) then the sum of the products of residuals ##\varepsilon_i## with regressors ##I(G2_i)## will be zero, that is, ##\sum_i \varepsilon_i I(G2_i)=0##. Could that be the theorem you had in mind?

I thought that if there is an intercept or that there could be a transformation to the intercept, the residuals sum to 0.
 

1. What are residuals?

Residuals are the differences between the actual values and the predicted values of a variable in a statistical model. They represent the amount of variation in the data that is not accounted for by the model.

2. Why do residuals need to sum to zero?

In statistical models, the sum of the residuals should ideally be equal to zero. This is because the total amount of variation in the data should be captured by the model, leaving no unexplained variation. If the residuals do not sum to zero, it indicates that there is some bias or error in the model.

3. What happens if the residuals do not sum to zero?

If the residuals do not sum to zero, it suggests that the model is not accurately capturing the variation in the data. This could be due to a variety of factors, such as incorrect assumptions or missing variables in the model.

4. Can the residuals sum to zero by chance?

In some cases, the residuals may sum to zero by chance, especially in small sample sizes. However, this is unlikely and should be investigated further to ensure the accuracy of the model.

5. How can I check if the residuals sum to zero?

The simplest way to check if the residuals sum to zero is by adding them up and verifying that the total is close to zero. Additionally, statistical software packages often provide a residual sum of squares (RSS) value, which should also be close to zero if the residuals sum to zero.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
822
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
480
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
712
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
626
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
574
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Back
Top