# Difference between errors and residuals. What is the mean and variance of each of them?

Suppose there is a simple linear model $y=\beta_0+\beta_1x+u$.

Can we state that $\bar y=\beta_0+\beta_1 \bar x + \bar u$?

I have this question because I come up with $Var(\bar u)$ when doing some exercises. What I have attempted:

$$Var(\bar u)=Var(\frac{1}{n} \sum_{i=1}^n u_i)=\frac{\sigma^2}{n}$$

But I just think of that the $u$ here is the error term, which is the true value, can we use the sample average for this case? To be precise is $\bar u=\frac{1}{n} \sum_{i=1}^n u_i$ or just $E(u)$ which is 0?

• One thing to consider is that $\sum_ir_i=0$ as part of the least squares estimates. They are also negatively correlated as well (unlike the "true errors"). – probabilityislogic Mar 12 '16 at 8:37
• @probabilityislogic, no one was asking about an $r_i$ here, so we have no idea what that is. – StatsStudent Mar 12 '16 at 9:59
• Your question title and question contents do not match. Consider editing one or the other. – Richard Hardy Mar 12 '16 at 11:01

If we have a simple linear model given by $$Y_i = \beta_0 + \beta X_i + u_i,$$
where $\beta_0$ and $\beta$ are constant and $u_i$ is an "error" random variable with mean $0$, then $$E(Y_i) = \beta_0 + \beta E(X_i).$$
This follows because the expecation (mean) is a linear operator. In other words $$E(X+Y) = E(X) + E(Y)$$