Problem
I'm given a linear regression model. I need to to obtain the decomposition of intercept coefficient in the form of
$$ \hat{\beta_1} = \beta_1 + \sum c_i u_i$$
where $c_i = 1/n - a_i\bar{X}$ and $a_i = \frac{(X_i - \bar{X})}{\sum_{i=1}^n (X_i - \bar{X})^2}$
Can anyone give some ideas?
Note that I will be using $\beta_1$ for intercept and $\beta_2$ for slope since it is more appropriate to do so.
Using the common formula we can write: $\hat\beta_1 = \bar{Y} - \hat\beta_2\bar{X}$.
Now we can substitute $\bar{Y} = \beta_1 + \beta_2\bar{X} + \bar{u}\:\:$ (since we are given a linear regression)
And $\hat{\beta_2} = \beta_2 + \sum c_i u_i \:\:$ (which is given by the task):
$\hat\beta_1 = \beta_1 + \beta_2\bar{X} + \bar{u} - \bar{X}\beta_2 - \bar{X}\sum a_iu_i = \beta_1 + \bar{u} - \bar{X}\sum a_iu_i = \beta_1 + \frac{1}{n}\sum u_i - \sum \bar{X}a_iu_i = \beta_1 + \sum(\frac{u_i}{n} - \bar{X}a_iu_i) = \beta_1 + \sum(u_i(\frac{1}{n} - \bar{X}a_i)) = \beta_1 + \sum c_i u_i.$
The last step was the substitution of $c_i = 1/n - a_i\bar{X}$, which was given in the task.