"To sum up, we’ve just seen that the three most famous single number summaries of a data set are very closely related: they all minimize the average discrepancy between s
and the numbers being summarized. They only differ in the type of discrepancy being considered:
The mode minimizes the number of times that one of the numbers in our summarized list is not equal to the summary that we use.
The median minimizes the average distance between each number and our summary.
The mean minimizes the average squared distance between each number and our summary."