# Correct notation when proving that $\hat{\beta_1}$ is linear

When reviewing lecture slides for the proof that $$\hat{\beta_1}$$ is linear in OLS-regression my teacher posted the following on the lecture slides: $$\hat{\beta_1}=\frac{\sum(X_i-\bar{X})Y_i}{\sum(X_i-\bar{X})^2}= \sum a_iY_i \text{ where }a_i= \frac{(X_i-\bar{X})}{\sum(X_i-\bar{X})^2}$$

But when I look at the same proof in the textbook the teacher referenced for a further discussion of this proof (Introduction to Econometrics by Stock&Watson, appendix 5.2) the same proof have the following notation: $$\hat{a_i}= \frac{(X_i-\bar{X})}{(X_i-\bar{X})^2}$$ . Note that there is no $$\sum$$-sign in the denomination in the second case.

So my questions are:

1. Which is the correct notation?
2. If the correct notation is $$\frac{(X_i-\bar{X})}{\sum(X_i-\bar{X})^2}$$, I would be grateful for an explanation of why this is the case since $$\frac{(X_i-\bar{X})}{(X_i-\bar{X})^2}$$ intuitively feels correct.
• The correct formulas are with 1 replaced by i. @JohnMadden, I guess this is simple regression, thus the double index is redundant. Aug 2 at 15:28
• @utobi ah that mostly makes sense.... but then why does $\hat{\beta}$ have that 1 subscript? haha maybe we're reading too far into this Aug 2 at 16:00
• @JohnMadden to read even further, maybe the parameters are called beta0 and beta1… Aug 2 at 16:10
• @AoMRos just to make clear that there's one sum in the denominator, and a different one in the numerator. Or in other words, to make clear that it's different than the index $i$ which subscripts $a_i$. Aug 2 at 17:26
• @AoMRos the sum in the numerator of your very first equation. Aug 2 at 17:54

$$Y_i = \beta_0 + \beta_1 X_i + \epsilon_i,\quad i=1,\ldots,n,$$ with $$\epsilon_i\sim N(0,\,\sigma^2)$$, $$\sigma^2>0$$, independently and identically. Doing the calculations yourself will notice that the OLS estimator for $$\beta_1$$ is
\begin{align*} \hat \beta_1 &= \frac{\sum_i (Y_i-\bar Y)(X_i-\bar X)}{\sum_i(X_i-\bar X)^2} = \frac{\sum_i Y_i(X_i-\bar X)-\sum_i \bar Y(X_i-\bar X)}{\sum_i(X_i-\bar X)^2}\tag{*}\\ &= \sum_i a_iY_i.\tag{**} \end{align*}
The first equality in (*) is just OLS, the second equality is algebra and equality in (**) is due to a certain property of the average. I'm leaving the rest of the details to you since this is a self-study question.
• You assume correct. On the right hand side of = in $(*)$ , shouldn't the sum that is subtracted in the numerator be $\sum_i\bar{Y}(X_i-\bar{X})$? Aug 2 at 18:06
• I've managed to simplify the euation above as far as $\frac{\sum(X_i-\bar{X})}{\sum(X_i-\bar{X})^2} * Y_i=\hat{\beta_1}$ and $a_i$ would thus equal $\frac{\sum(X_i-\bar{X})}{\sum(X_i-\bar{X})^2}$. The problem is that this is different than both the fractions I included in my original question and despite my very best efforts i have not been able to get any further. Aug 2 at 18:17
• I've slept on this now and I think I got it! If $\frac{\sum(X_i-\bar{X})}{\sum(X_i-\bar{X})^2}*Y_i=\sum a_i Y_i=\hat{\beta_1}$ then $a_i=\frac{(X_i-\bar{X})}{(X_i-\bar{X})^2}$. Is this correct? Aug 3 at 5:06