Why do we take mean of errors in linear regression?

I was reading about the probabilistic interpretation of linear regression and the following formula is derived using maximum likelihood estimates : \begin{align*} β=\underset{β}{\text{argmin}}\sum_{i=1}^{n}(y_i−(β_0+β_1x_1+...+β_px_p))^2 =\underset{β}{\text{argmin}}\sum_{i=1}^{n}(y_i−\hat{y_i})^2 \end{align*}

where $$β$$ is the weight vector , $$y$$ is the target variable and $$\hat{y}$$ is the hypothesis.

The only thing I am not getting is the $$1/N$$ (where $$N$$ is the number of samples) term . The above equation is just the sum of squared error. But we always use mean squared error. So, is there any mathematical proof of the same ?

• For a given dataset with a fixed sample size, whatever minimises the sum of squared errors also minimises the mean of those squared errors. For example if the data are 1, 2, 3 the sum of squared errors is minimised by 2, which is the mean; you'd get the same answer if you minimised the mean squared error; the two have the same minimand. The principle carries over to estimating two or more parameters in a regression. (If you plot the function as a quadratic, dividing by sample size just changes the axis labels; it doesn't move the function.) Commented Oct 11, 2020 at 8:41
• @Nick But then , is there any reason behind taking mean of errors ? Commented Oct 11, 2020 at 10:51
• The size of the mean can be interpreted in terms of the size of the original observations. Commented Oct 11, 2020 at 10:54
• The mean squared error is a step towards its square root, which can be useful as a standard error. In practice people often use a different denominator for other reasons. This is discussed in detail in just about any regression text. Commented Oct 11, 2020 at 10:54

It is a fact from calculus that $$\arg\min$$ does not change when we apply an increasing function like multiplication by a positive number. For instance, $$f(x)=x^2$$ and $$f(x)=7x^2$$ have the same minimizer, $$x=0$$.