# why are errors normal in OLS? [duplicate]

In maximum likleihood, we believe that the y-variable is conditionally normally distributed. So this means that errors are also normally distributed.

In ols regression, things seem to be more algebra/geometry driven. I am trying to fit a line of best fit between some points. I have done this in high school in my vector algebra class ... and there was never any mention of normal distribution in fitting a line of best fit.

So how come the errors in OLS are needed to be normally distributed?

• They are not (If by OLS you mean optimising a line to minimize the sum of squared residuals) Sep 26 at 18:40
• Hi: They only need to be normally distributed if you want to do inference and hypothesis testing. You can minimize the sum of the squared errors without the errors being normally distributed and still get a line of best fit. Sep 26 at 18:42
• Notice that, in the MLE framework, you are maximizing a likelihood so you need a likelihood function. The assumption of normally distributed errors results in the likelihood function. So, the two frameworks give the same coefficient estimates but under different assumptions. Sep 26 at 18:44
• thx! just to confirm ... ols does not need normal distribution errors? Sep 26 at 19:17
• can you explain why they need to be normal for hypothesis test and inferences? Sep 26 at 19:17

In OLS, the errors do not have to have a normal distribution or even any particular distribution at all. All OLS does is solve the correspondence:

$$\hat\beta_{OLS}\in\\ \underset{\beta=\left( \beta_0,\beta_1,\dots,\beta_p \right)}{\arg\min}\left\{ \overset{n}{\underset{i=1}{\sum}}\left( y_i-\left( \beta_0+\beta_1x_{i1}+\dots\beta_px_{ip} \right)\right)^2 \right\}$$

(I say that it is a correspondence instead of an equation because there does not have to be a unique solution $$(\arg\min)$$, such as if two features add up to a third.)

However, when you assume $$iid$$ Gaussian errors, the maximum likelihood estimate and OLS solution are equal.

To some extent, though, we're splitting hairs. The negative log-likelihood, which is being minimized to obtain $$\hat{\beta}_{MLE}$$, is algebraically identical to the least-squares objective function whose minimization leads to $$\hat{\beta}_{OLS}$$. If you further don't take the normal likelihood "too literal" but rather understand it as a second-order approximation of the "true" likelihood, you've pretty much eliminated all conceptual differences between OLS and (quasi)-MLE.