# Least Square Estimators of a Linear Regression Model

A linear regression model may be written either:

$Y_i$ = $\beta_0$ + $\beta_1X_i$ + $\epsilon_i$

Or

$Y_i$ = $\alpha_0$ + $\alpha_1(X_i + \bar x)$ + $\epsilon_i$

Use the method of least square to estimate $\hat \alpha_0$ and $\hat \alpha_1$

I am getting $\hat \alpha_0$ is equal to $\bar Y$ which seems wrong.

Any help appreciated thanks.

To start you differentiate $S=\sum_{i=1}^n \left(y_i-a_0-a_1x_i-a_1\overline x \right)^2$ w.r.t. $a_1$.

$\frac{\partial S}{\partial a_1}=2\cdot \sum_{i=1}^n \left(y_i-a_0-a_1x_i-a_1\overline x \right)\cdot (x_i-\overline x)=0$

Multipliying out the brackets and drop 2

$\sum_{i=1}^n x_iy_i-\overline x \sum_{i=1}^n y_i-a_0\sum_{i=1}^n x_i+a_0\overline x \sum_{i=1}^n 1-a_1\sum_{i=1}^n x_i^2 + \overline x\cdot a_1 \sum_{i=1}^n x_i-a_1 \overline x \sum_{i=1}^n +a_1 \overline x ^2 \sum_{i=1}^n 1=0$

Isolation of $a_1$ and $\sum_{i=1}^n x_i=n\cdot \overline x$ and $\sum_{i=1}^n y_i=n\cdot \overline y$

$a_1 \cdot \left[ \overline x \sum_{i=1}^n x_i+n\cdot \overline x ^2- \overline x \cdot n \cdot \overline x- \sum_{i=1}^n x_i ^2 \right]+\sum_{i=1}^n y_ix_i-\overline x \sum_{i=1}^n y_i=0$

Now solve for $a_1$. $a_0$ has disappeared.

Differentiating $S$ w.r.t $a_0$

$\frac{\partial S}{\partial a_0}=2\cdot \sum_{i=1}^n \left(y_i-a_0-a_1x_i-a_1\overline x \right)\cdot (-1)=0$

• ok thanks, I am getting something similar. What are you getting when you differentiate wrt to $\alpha_0$ Commented Nov 1, 2015 at 20:11
• Very similar expression. I have made an edit. Commented Nov 1, 2015 at 20:16
• so what do you get for $\alpha_0$ in that case? I'm getting $\bar Y$ but I'm not sure if that's correct. Commented Nov 1, 2015 at 20:23
• Note that the last equation can be simplified very much. For instance it is $n \cdot \overline x ^2-\overline x \cdot n \cdot \overline x=0$ and $\overline x \sum_{i=1}^n x_i=n\cdot \overline x ^2$ I haven´t calculated the expression for $a_0$. Wait a minute. Commented Nov 1, 2015 at 20:24
• I found my answers in terms of $\alpha_0$ and $\alpha_1$ from when I did my partial differentiation. $\hat \alpha_0$ = $\bar Y$ and $\hat \alpha_1$ = $\sum i (X_i - \bar X)(Y_i-\bar Y)/ \sum i (X_i - \bar X)^2$ Commented Nov 1, 2015 at 20:29