Calculating variance of $\beta_1$

80 Views Asked by At

$$\hat\beta_1 = \frac{\sum_{i=1}^{n} X_i Y_i - \frac{1}{n} \sum_{i=1}^{n} X_i \sum_{i=1}^{n} Y_i}{\sum_{i=1}^{n} X_i^2 - \frac{1}{n} (\sum_{i=1}^{n} X_i)^2}$$

First I need to isolate $Y_i$

$$= \frac{\sum_{i=1}^{n} X_i Y_i- \bar{X} \sum_{i=1}^{n} Y_i}{\sum_{i=1}^{n} X_i^2 - \frac{1}{n} (\sum_{i=1}^{n} X_i)^2}$$

$$= \frac{\sum_{i=1}^{n} Y_i(X_i - \bar{X})}{\sum_{i=1}^{n} X_i^2 - \frac{1}{n} (\sum_{i=1}^{n} X_i)^2}$$

now to factor the denominator into one

$$= \frac{\sum_{i=1}^{n} Y_i(X_i - \bar{X})}{\sum_{i=1}^{n} X_i^2 - \frac{1}{n} (\sum_{i=1}^{n} X_i)(\sum_{i=1}^{n} X_i)}$$

$$= \frac{\sum_{i=1}^{n} Y_i(X_i - \bar{X})}{\sum_{i=1}^{n} X_i^2 - \bar{X}(\sum_{i=1}^{n} X_i)}$$

Factored $\sum_{i=1}^{n} X_i$

$$= \frac{\sum_{i=1}^{n} Y_i(X_i - \bar{X})}{\sum_{i=1}^{n} X_i (\sum_{i=1}^{n} X_i - \bar{X})}$$

yeah I don't know where to go from here the answer they got was

$$= \frac{\sum_{i=1}^{n} (X_i - \bar{X})Y_i}{\sum_{j=1}^{n} (X_j - \bar{X})^2}$$

now sure how $j$ comes in

2

There are 2 best solutions below

0
On BEST ANSWER

The numerator is correct. For the denominator, your second last step $\left(\text{factoring }\displaystyle\sum_{i=1}^n X_i \right)$ is wrong. That is because $\displaystyle\sum_{i=1}^nX_i^2\neq \left(\sum_{i=1}^nX_i\right)^2.$

The correct steps should be

$$ \begin{aligned}\displaystyle\sum_{i=1}^nX_i^2-\bar{X}\left(\sum_{i=1}^nX_i\right)&=\sum_{i=1}^n(X_i-\bar{X}+\bar{X})^2-n\bar{X}^2 \\&=\sum_{i=1}^n(X_i-\bar{X})^2+2\bar{X}\left(\sum_{i=1}^n(X_i-\bar{X})\right)+n\bar{X}^2-n\bar{X}^2 \\&=\sum_{i=1}^n(X_i-\bar{X})^2=\sum_{j=1}^n(X_j-\bar{X})^2 \end{aligned}$$

The second equality is simply by expanding the squares. The third equality follows from the fact that $\displaystyle\sum_{i=1}^n(X_i-\bar{X})=n\bar{X}-n\bar{X}=0.$ The fourth equality is just a change in the index.

0
On

$\newcommand{\S}{\sum\limits_{i=1}^{n}X_i}$The $j$ is just a "dummy variable" of the summation, it doesn't matter what symbol you use. So $\sum\limits_{j=1}^{n}\left(X_j -\bar{X}\right)^2 = \sum\limits_{i=1}^{n}\left(X_i -\bar{X}\right)^2$.

By the way, you have an error in your factoring. You seem to have assumed that you can pull out a factor of $\S$ from $\sum\limits_{i=1}^n X_i^2$. This would be possible if it the $\sum\limits_{i=1}^n X_i^2$ were $\left(\S\right)^2$, but this is different (the former is $X_1^2+\cdots+X_n^2$ while the latter is $\left(X_1+\cdots + X_n\right)^2$.


So what you really need to prove is that $$\sum\limits_{i=1}^{n}X_i^2 -\bar{X}\S = \sum\limits_{i=1}^{n}\left(X_i -\bar{X}\right)^2.$$

A hint to do this: go from right-hand side to left-hand side. Try expanding the right-hand side (using $(a-b)^2=a^2-2ab+b^2$), noting that $\bar{X}$ is a constant with respect to $i$ so can be pulled out as a factor from sums, and also note that $\S = n\bar{X}$ and $\sum\limits_{i=1}^{n}\bar{X}^2=n \bar{X}^2$.