# Why does putting a 1/2 in front of the squared error make the math easier?

Per wiki, the mean squared error (MSE) looks like:

$$\operatorname {MSE} ={\frac {1}{m}}\sum _{i=1}^{m}(y_{i}-{\hat y_{i}})^{2}$$

The professor added a $$1\over2$$ in front of the formula and explained it a little bit. I am a little bit confused. How does putting a $$1\over2$$ in front of the squared error make the math easier?

• Just a guess, but it may simplify mathematics involving the derivative. – bradS Jun 4 '19 at 10:02

A major reason for using MSE is to optimize the parameters of a regression model. From calculus, you know how to find the minimum of a function by taking the derivative. That puts a "2" out in front, which is irritating to keep writing, so it is reasonable to put a "1/2" at the beginning so the derivative doesn't need a constant out front.

We get away with it because the minimum of f(x) and f(x)/2 is achieved at the same value(s) of x.