The use of square in maths

47 Views Asked by At

The variance of a random variable is defined as $E[(X-E[X])^2]$.

In machine learning and linear regressions, loss is sometimes calculated with the squared error.

In both cases, the main function of the square is to prevent positive/negative cancellation. But square introduces non linearity, why people don’t care about this non linearity? If I were to measure something, I hope it changes linearly, it’s easier to grasp.

Is there some long term consequences due to this?

Is there something that has all the good part of abs and square (linear, simple and easy to differentiate)? If so, why people don’t use it?