# KS test for normality on residuals from OLS vs. MLE

This is a conceptual issue. Suppose, one wants to test the residuals $e_t$ from the regression for normality. So, he runs the regression, obtains the estimates of error variance $\sigma^2$, and forms a null hypo $H_0: e_t\sim\mathcal{N}(0,\sigma^2)$

Case 1: Suppose that the regression was estimated with OLS. In this case there was no distributional assumption used to estimate $\sigma$. Also, one could argue that the $H_0$ wasn't formed from the residuals, but rather came from the results of the OLS. Hence, the standard KS test can be applied since the parameters of distribution were not estimated from errors $e_t$, i.e. #3 here is not an issue.

The argument against would be that technically $\hat\sigma^2$ is calculated as $\frac{e'e}{T-k}$ where $T$ is the # of observations and $k$ - # of parameters. Hence, the standard KS test is not applicable, and something like Lilliefors test must be used.

Case 2: The same, but instead of OLS we used MLE. In this case, there was a distributional assumption when estimating $\sigma$, otherwise, both arguments for and against using KS test remain the same, but the argument pro feels somewhat weaker, because one could say that the error variance and the errors were calculated simultaneously ($\sigma$ goes into likelihood function).

Note: Whether normality tests should be done or not is out of the scope of this question. Please, resist the temptation to comment on this subject, there are other threads for that.

• It is estimated from data, but it's not estimated from residuals conceptually. When you call KS test your $H_0$ is already formed, as opposed to getting the residuals then calculating the mean and variance from them. Consider Lilliefors test implementation: it actually estimates both mean and variance from the given data set. – Aksakal Jul 30 '15 at 15:25