Homoskedasticity and bias in regression My teacher said "Violations of homoskedasticity assumption does not lead to bias in the estimated coef." Can someone motivate/explain this, perhaps with a formula?
 A: In a linear regression model in matrix notation you have $y = X \beta + \varepsilon$. Assuming a non-stochastic regressor matrix $X$ and a zero-mean error, i.e., $E(\varepsilon) = 0$, you get the following expectation for the response:
$E(y) = E(X \beta + \varepsilon) = E(X \beta) + E(\varepsilon) = X\beta + 0 = X \beta$.
You can split up the expectation due to its linearity and then use your assumptions (non-stochastic $X$ and zero-mean $\varepsilon$).
And then you want to establish unbiasedness of the least-squares estimator:
$\hat \beta = (X^\top X)^{-1} X^\top y$.
So you simply take the expectation again, using the non-stochastic $X$ and the expectation of $y$ derived above:
$E(\hat \beta) = E((X^\top X)^{-1} X^\top y) = (X^\top X)^{-1} X^\top E(y) = (X^\top X)^{-1} X^\top X \beta = I \beta = \beta$, where $I$ is the identity matrix.
So you see that for establishing $E(\hat \beta) = \beta$ you only need the assumption that $\varepsilon$ has a zero mean but it does not have to be homoscedastic etc. This works because both the expectation operator and the model are linear.
If the regressors $X$ are stochastic, essentially the same equations can be derived when taking conditional expectations (given $X$). But you additionally need to assume that the columns of $X$ and $\varepsilon$ are not correlated.
