# Mean Squared Error

*noun*

say it: **“MEEN SKWAIRD AIR-er”** **/ˈmin ˈskwɛrd ˈɛrər/**

The average of the squares of the differences between predicted and real values; larger errors count much more heavily.

## What is **mean squared error**?

**Mean squared error** (MSE) is the average of the squared misses. Squaring makes every miss positive and big misses
count much more than small ones. Its units are squared, such as minutes squared, which is why people usually take its
square root (RMSE).

```python
from sklearn.metrics import mean_squared_error
minutes = [30, 25, 40]     # real delivery times
guessed = [28, 27, 34]
print(mean_squared_error(minutes, guessed))   # 14.666666666666666
```

## In a sentence

- “Ordinary least squares picks the line with the smallest **mean squared error**.”
- “One 6-minute miss made up most of the **mean squared error**.”

Level: Journeyman · [More AI Basics terms at this level](https://www.ask-codey.com/glossary?category=ai&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/mean-squared-error
