Why Squaring Changes Learning
See why MSE emphasizes large errors and how outliers can dominate learning.
Why Squaring Changes Learning explained visually
Use archery and an unusual mansion to see the strength and weakness of squared error.
What you will learn
Measure numerical prediction errors and compare MSE, MAE, and Huber loss.
Large errors grow faster
Squaring makes a ten-times-larger error contribute one hundred times as much loss.
Strong penalties can help
MSE fits problems where large mistakes deserve much more attention than small ones.
Outliers can dominate
One extreme example may overwhelm the loss and redirect learning away from typical examples.
Match loss to the problem
The meaning of large errors and the reliability of unusual examples should guide the choice.
Quick check: test your understanding
What does squaring do to large errors?
It increases their influence much faster than their original size.
What is an outlier?
An example that lies far from most other observations.
When can MSE help?
When large errors deserve especially strong penalties.
Accessible referenceLesson 9 transcript342 words · Matches the published narration and captionsOpen transcript
In Lesson 8, we calculated Mean Squared Error by squaring every prediction error. But why use squares? And what happens when one prediction is extremely wrong? Imagine two archery students practicing with a target. The first student misses the center by two inches. The second misses by ten inches.
If we use absolute distance, the second mistake is five times larger than the first. But if we square those distances, two becomes four and ten becomes one hundred. The second mistake now receives twenty-five times more attention. Mean Squared Error behaves in the same way.
A house-price error of ten thousand dollars produces a squared error of one hundred million. An error of one hundred thousand dollars is only ten times larger before squaring. After squaring, however, it produces ten billion, one hundred times the smaller result. This makes Mean Squared Error useful when large mistakes are especially dangerous.
For example, a delivery-time model that is wrong by two minutes may cause a small inconvenience. Being wrong by two hours could create a serious business problem. Squaring tells the model to focus strongly on that larger mistake. But this strength can also become a weakness.
Imagine that most homes in a dataset cost between two hundred and four hundred thousand dollars. One unusual mansion costs ten million dollars. If the model predicts the mansion poorly, its enormous squared error may dominate the loss. Training can begin focusing heavily on that single mansion while paying less attention to hundreds of normal homes.
That unusual example is called an outlier. An outlier is not automatically bad data. It may be real and important. But we must decide whether it should control the model's learning. Mean Squared Error is therefore a good choice when large errors deserve much stronger penalties and extreme values are meaningful.
When the dataset contains unusual values that should not dominate training, we may need a gentler loss function. In Lesson 10, we will meet Mean Absolute Error, which treats every mistake according to its direct distance from the correct answer.