Introduction
The mean, median, and mode are the three standard measures of central tendency, each describing a dataset's typical value in a different way. The mean is the sum of all values divided by the count of values, and it uses every single number in the calculation. The median is the middle value when all observations are sorted in order, so it depends only on rank, not magnitude. The mode is the value that occurs most frequently, and it is the only one of the three that can be used on purely categorical data as well as numerical data.
Cricket analogy: A team's mean score sums every batter's runs and divides by the number of batters, using every single score, while the median score just picks the middle-ranked batter once everyone is sorted, showing how mean uses magnitude and median only uses rank.
Explanation
Because the mean uses every value's exact magnitude, a single extremely large or small value can pull it noticeably away from where most of the data actually sits; this is why household income statistics, for example, are often reported using the median rather than the mean, since a small number of very high incomes would otherwise distort the average upward. The median, depending only on rank, is far less affected by such extreme values. The mode, meanwhile, is most useful when the data is categorical, such as identifying the most common product color ordered, where a mean or median cannot be computed at all.
Cricket analogy: One player's freak 300-run innings can drag a small squad's mean score far above what everyone else actually scored, while the median score barely moves since it only cares about the middle rank, which is why an unusual outlier innings distorts a mean far more than a median.
Example
values = [2, 3, 3, 4, 100]
mean_val = sum(values) / len(values)
sorted_vals = sorted(values)
median_val = sorted_vals[len(values) // 2]
from collections import Counter
mode_val = Counter(values).most_common(1)[0][0]
print(f"mean={mean_val}, median={median_val}, mode={mode_val}")Analysis
Given the values 2, 3, 3, 4, 100, the mean is 22.4, heavily pulled upward by the single value 100, while the median is 3, matching where most of the data actually clusters, and the mode is also 3, the most frequently occurring value; this small example shows concretely why reporting the mean alone for a dataset containing an extreme value would misrepresent what a typical observation looks like, while the median and mode together give a more honest picture.
Cricket analogy: In a five-innings sample of 2, 3, 3, 4, and 100 runs, the mean of 22.4 makes it look like a strong batter, but the median of 3 and the mode of 3 reveal that this player actually scores low most of the time, with one huge innings distorting the mean.
Key Takeaways
- The mean sums all values and divides by the count, using every value's exact magnitude.
- The median is the middle value once data is sorted, depending only on rank rather than magnitude.
- The mode is the most frequently occurring value and is the only one of the three usable on purely categorical data.
- A single extreme value can pull the mean noticeably away from where most data actually sits, while the median is far less affected.
- Reporting median and mode alongside the mean gives a more honest picture of a dataset containing outliers.
Practice what you learned
1. Which measure of central tendency uses every value's exact magnitude in its calculation?
2. Why is the median often preferred over the mean when a dataset contains extreme values?
3. Which measure of central tendency can be used on purely categorical data, such as the most common product color?
4. For the values 2, 3, 3, 4, 100, what is the median?
Was this page helpful?
You May Also Like
Descriptive Statistics
An overview of descriptive statistics, the measures of central tendency and spread used to summarize a dataset's key numerical patterns.
Standard Deviation
How standard deviation measures the average distance of values from the mean, and why it matters for comparing consistency between groups.
What Is a Dataset
An introduction to what a dataset is, how observations and variables form rows and columns, and how structured, semi-structured, and unstructured data differ.