Finding something worth knowing…

Science

Mean squared error scores guesses by squaring every miss

Whenever a model predicts a number, somebody has to decide how wrong it was. The most common answer is to take every miss, square it, and average the results. That simple recipe, mean squared error, quietly bundles two different kinds of mistake into one score.

Mean squared error, also called mean squared deviation, measures the average squared gap between estimated values and the true value. Squaring gets rid of the awkward negative signs that come from over- and under-shooting, so the figure is essentially always positive and shrinks towards zero as errors vanish. It is a risk function, the expected value of what statisticians call squared error loss, and it can judge either a predictor, which maps inputs to outputs, or an estimator, which turns a sample into an estimate of some population value.

Its most useful property is a decomposition. The score equals the variance of an estimator, meaning how much its estimates wobble from one sample to the next, plus the square of its bias, how far its average lands from the truth. For an unbiased estimator the two measures coincide. In practical modelling a third ingredient appears, irreducible uncertainty, which is the basis of the bias-variance tradeoff. Comparing estimators by this combined figure is known as the MSE criterion. One caveat: like variance, it is measured in squared units of the original quantity.

The name gets used loosely. Computed on data held back from fitting, as in cross-validation, it becomes the test MSE or out-of-sample error, a practical check on whether a model generalises. In regression, the term sometimes means the residual sum of squares divided by degrees of freedom, a different denominator from the plain average. Some authors even halve it to simplify derivatives and still call the result the MSE.

Which estimator is best depends on the data. For a Gaussian distribution the sample mean achieves the lowest error of any unbiased estimator of the population mean, but for a uniform distribution it does not.

Source: Mean squared error

Related

More in Science · All topics