Skip to main content
Scientific Principles

Mean Squared Error (MSE)

Mean squared error (MSE) is a measure of overall error that averages the squares of individual errors. It provides a way to weigh both bias and noise in forecasts.

THE IDEA

The difference between figures 3 and 4 is analogous to the difference between a pattern of shots seen from the back and the front of the target in figures 1 and 2 (see the introduction). Knowing the position of the target was not necessary to observe noise in shooting; similarly, knowing the true outcome adds nothing at all to what was already known about noise in forecasting.

Amy Simkin and her boss now know something they did not know earlier: the amount of bias in the forecasts. Bias is simply the average of errors, which in this case is also 10%. Bias and noise, therefore, happen to be numerically identical in this set of data. (To be clear, this equality of noise and bias is by no means a general rule, but a case in which bias and noise are equal makes it easier to understand their roles.) We can see that most forecasters had made an optimistic error—that is, they overestimated the market share that would be achieved: most of them erred on the right-hand side of the zero-error vertical bar. (In fact, using the properties of the normal distribution, we know that is the case for 84% of the forecasts.)

As Amy’s boss notes with barely concealed satisfaction, he was right. There was a lot of bias in the forecasts! And indeed, it is now evident that reducing bias would be a good thing. But, Amy still wonders, would it have been a good idea a year ago—and would it be a good idea now—to reduce noise, too? How would the value of such an improvement compare with the value of reducing bias?

Mean Squares

To answer Amy’s question, we need a “scoring rule” for errors, a way to weight and combine individual errors into a single measure of overall error. Fortunately, such a tool exists. It is the method of least squares, invented in 1795 by Carl Friedrich Gauss, a famous mathematical prodigy born in 1777, who began a career of major discoveries in his teens.

Gauss proposed a rule for scoring the contribution of individual errors to overall error. His measure of overall error—called mean squared error (MSE)—is the average of the squares of the individual errors of measurement.

Gauss’s detailed arguments for his approach to the measurement of overall error are far beyond the scope of this book, and his solution is not immediately obvious. Why use the squares of errors? The idea seems arbitrary, even bizarre. Yet, as you will see, it builds on an intuition that you almost certainly share.

To see why, let us turn to what appears to be a completely different problem but turns out to be the same one. Imagine that you are given a ruler and asked to measure the length of a line to the nearest millimeter. You are allowed to make five measurements. They are represented by the downward-pointing triangles on the line in figure 5.

As you can see, the five measurements are all between 971 and 980 millimeters. What is your best estimate of the true length of the line? There are two obvious contenders. One possibility is the median number, the measurement that sits between the two shorter measurements and the two longer ones. It is 973 millimeters. The other possibility is the arithmetic mean, known in common parlance as the average, which in this example is 975 millimeters and shown here as an upward-pointing arrow. Your intuition probably favors the mean, and your intuition is correct. The mean contains more information; it is affected by the size of the numbers, while the median is affected only by their order.

There is a tight link between this problem of estimation, about which you have a clear intuition, and the problem of overall error measurement that concerns us here. They are, in fact, two sides of the same coin. That is because the best estimate is one that minimizes the overall error of the available measurements. Accordingly, if your intuition about the mean being the best estimate is correct, the formula you use to measure overall error should be one that yields the arithmetic mean as the value for which error is minimized.

MSE has that property—and it is the only definition of overall error that has it. In figure 6, we have computed the value of MSE in the set of five measurements for ten possible integer values of the line’s true length. For instance, if the true value was 971, the errors in the five measurements would be 0, 1, 2, 8, and 9. The squares of these errors add up to 150, and their mean is 30. This is a large number, reflecting the fact that some measurements are far from the true value. You can see that MSE decreases as we get closer to 975—the mean—and increases again beyond that point. The mean is our best estimate because it is the value that minimizes overall error.

When to use it

  • Assessing the accuracy of financial forecasts

  • Evaluating the performance of machine learning regression models

  • Measuring the consistency of employee performance ratings

  • Judging the precision of medical diagnostic tests

  • Quality control: measuring product dimensions to find the best estimate of true size.

  • Scientific experiments: combining multiple readings to estimate a physical constant.

  • Finance: estimating the expected return of an investment from historical data.

  • Machine learning: using MSE as a loss function for regression models.

FROM THEORY TO EVERYDAY LIFE

In practice

01

Forecasting Market Share at GoodSell

In the GoodSell example, 84% of forecasts overestimated market share, creating an average optimistic bias of 10%. The noise, measured by the spread of errors, was also 10%. Bias and noise can be numerically equal while remaining distinct components of error.

02

Measuring a Line with a Ruler

When measuring a line five times, the individual measurements vary around the true length. The mean squared error combines these variations and any consistent offset to produce an overall error score.

03

Estimating the true length of a line from five measurements

Given five measurements: 971, 972, 973, 979, 980 mm. The mean is 975 mm and the median is 973 mm. MSE computed for candidate true values shows that the mean minimizes MSE, confirming it as the best estimate.

✳

A MOMENT TO REFLECT

Put it to work.

  1. How would you calculate the mean squared error of a set of predictions you have made?

  2. In what situations might reducing noise be more valuable than reducing bias?

  3. Why do you think Gauss chose to square the errors rather than take absolute values?

  4. Why does the mean give a better estimate than the median in this example?

  5. What is the relationship between minimizing MSE and selecting the best estimate?

  6. How would the concept of MSE apply if the measurements had different weights?

Connected ideas

Another lens can bring the same problem into focus.

Often confused with

References

  1. Least Squares Method — Carl Friedrich Gauss (1795)

CONTINUE THE CONVERSATION

Source texts

  • Noise A Flaw in Human Judgment (Daniel Kahneman, Olivier Sibony etc.)
  • Noise A Flaw in Human Judgment (Daniel Kahneman, Olivier Sibony etc.)
← More scientific principles