for a simple linear model:
$y= \alpha+\beta x+e$
$\hat \beta= \frac{cov(x,y)}{var(x)} = $ second element of $(X'X)^{-1}X'y $
where $X = [1, x]$
However, if the true relation is
$y= \beta x+e$ with $cov(x,e)=0$
the cov formula still works as
$\frac{cov(x,y)}{var(x)} = \frac{cov(x,(\beta x+e))}{var(x)} = \frac{\beta*cov(x,x)+cov(x,e)}{var(x)} = \beta $
But I am trying to understand why the least squares doesnt work anymore:
$(X'X)^{-1}X'y = (X'X)^{-1}X'(X\beta+e) = \beta + (X'X)^{-1}X'e = \ \beta$
But now for true model $(X'X)^{-1}X'y = \frac{\sum(xy)}{\sum(x^2)} \not= \frac{cov(x,y)}{var(x)} $ for model with a constant.
Can someone point out if I might be mistaken in thinking that regular OLS with constant is still unbiased and consistent? How can both of these be unbiased as they are different.
In other words, are both $\frac{\sum(xy)}{\sum(x^2)} $ and $ \frac{cov(x,y)}{var(x)} $ unbiased/consistent when true $\alpha=0$ and how (assuming $E(x), E(y) \not=0$)?