Compare mean squared error after one large miss

Type each count alongside the label that gives it meaning. · 204 words

Mean squared error (MSE) measures the average squared gap between a model's prediction and the observed value. First compute each error as observed minus predicted. Squaring removes the sign and gives unusually large misses extra influence. For example, a visitor-count model predicts 90, 60, and 30 for three museum exhibits whose true counts are 100, 50, and 20. The errors are 10, -10, and -10, so the squared errors are 100, 100, and 100. The MSE is their average: (100 + 100 + 100) / 3 = 100. Its units are visitors squared, and a lower value means the predictions are closer on average.

Now suppose a fourth exhibit has a true count of 20 and the model predicts 0. That miss has an error of 20, which becomes 400 after squaring. The first three squared errors remain 100 each, so the new MSE is (100 + 100 + 100 + 400) / 4 = 175. Thus one large miss raises the MSE from 100 to 175, a 75 percent increase. This illustrates why MSE reacts strongly to rare, severe errors. When comparing models, inspect the individual errors as well as the average, because a slightly lower MSE can hide a dangerous large miss.

Check your recall

A model has errors of 2, -3, and 4. If one more prediction has an error of -10, what are the old and new MSE values?

Check your answer

The old MSE is (4 + 9 + 16) / 3 = 29 / 3, or about 9.67. The new MSE is (4 + 9 + 16 + 100) / 4 = 129 / 4, or 32.25.

Sources and credits

Original KeyTouch lesson. Background reading · Google · Classification metrics.