Mean, Median, and Mode

Learn the basics of mean, median, and mode with clear examples and bar chart visualizations.

BeginnerMeanMedianMode

Understanding Mean, Median, and Mode

When studying statistics, three key concepts always appear: mean, median, and mode.
They are all measures of “central tendency,” but each has a different meaning and method of calculation.

In this article, we’ll cover:

  • The definition and calculation of mean, median, and mode
  • The differences between them
  • How they behave when there are outliers

Let’s explore what makes them different!


1. Mean

The mean is the most commonly used measure of central tendency.
It is calculated by summing all data values and dividing by the number of values:

Mean=x1+x2++xnn\text{Mean} = \frac{x_1 + x_2 + \dots + x_n}{n}

Example: If the data is [2,4,6,8,10][2, 4, 6, 8, 10],

Mean=2+4+6+8+105=305=6\text{Mean} = \frac{2 + 4 + 6 + 8 + 10}{5} = \frac{30}{5} = 6

On a bar chart, the mean is shown as a vertical line that often falls near the center of the bars.


2. Median

The median is the “middle value” when the data is arranged in order.
The calculation depends on whether the number of data points is odd or even:

  • If odd: the single middle value
  • If even: the average of the two middle values

Example 1: Data [2,4,6,8,10][2, 4, 6, 8, 10] (5 values, odd) → Median = 66
Example 2: Data [1,2,3,4,5,6][1, 2, 3, 4, 5, 6] (6 values, even) → Median = 3+42=3.5\frac{3+4}{2} = 3.5

On a bar chart, the median is shown as a vertical line splitting the dataset into two halves.


3. Mode

The mode is the value that appears most frequently.
It corresponds to the tallest bar in a bar chart.

Example: For [2,2,3,4,4,4,5][2, 2, 3, 4, 4, 4, 5],
the tallest bar is at 4, so the mode = 4.


4. Example Showing the Differences

Consider the dataset [1,2,2,2,100][1, 2, 2, 2, 100]:

  • Mean = 1+2+2+2+1005=1075=21.4\frac{1+2+2+2+100}{5} = \frac{107}{5} = 21.4
  • Median = 2 (middle value)
  • Mode = 2 (most frequent value)

On a bar chart:

  • The mode appears clearly as the tallest bar at 2.
  • The median is at the middle of the distribution.
  • The mean is shifted far to the right because of the outlier (100).

This shows how mean can be misleading in skewed data, while median and mode remain more representative.


5. Summary

  • Mean: Good for overall balance, but sensitive to outliers.
  • Median: More robust against outliers.
  • Mode: Useful when identifying the most common value.

Interactive Demo

The tool below comes with three preset datasets:

  • Preset 1: Evenly spaced data → [2, 4, 6, 8, 10]
  • Preset 2: With an outlier → [1, 2, 2, 2, 100]
  • Preset 3: Strong mode → [2, 2, 3, 4, 4, 4, 5]

Switch between them to see how mean, median, and mode behave.
The results will be displayed on a bar chart, making the differences easy to spot.
Once comfortable, try entering your own dataset!

Interactive Mean, Median, and Mode Demo

Current Dataset: [2, 4, 6, 8, 10]

Frequency Bar Chart

Mean (Average)

6.00

Sum of all values ÷ number of values

Red dashed line on chart

Median (Middle)

6

Middle value when sorted

Blue solid line on chart

Mode (Most Frequent)

No mode

Most frequently occurring value(s)

Green bars on chart

Chart Elements:

Regular frequency bars
Mode bars (most frequent)
Mean (red dashed line)
Median (blue solid line)

Key Observations:

  • Preset 1: Evenly distributed data shows all measures close together
  • Preset 2: The outlier (50) pulls the mean far right, but median stays at the center of the main data
  • Preset 3: The mode (4) is clearly visible as the tallest green bar
  • Bar spacing: Shows actual numerical distances between values
  • Green highlighting: Makes the mode(s) easy to identify at a glance
← Back to Encyclopedia