Statistics & Probability: Median (Central Value)

Find the median of datasets with odd and even numbers of values with interactive sorting and pair elimination visualizers, step-by-step middle element calculations, and outlier analysis.

Solved: 0

Median (Central Value)

Learning Topics

📖 Learning Guide - Median (Central Value)

1. What is the Median?

The median is the exact middle value in a dataset when all numbers are ordered from least to greatest. It divides the data into two equal halves: at least 50% of the numbers are less than or equal to the median, and at least 50% are greater than or equal to it.

Notation (Subscripts): When a dataset of nn values is arranged in ascending order (x1x2x3xnx_1 \le x_2 \le x_3 \le \dots \le x_n), we use subscript notation xkx_k to denote the number at position kk in the sorted list (e.g. x1x_1 is the first and smallest value, while xnx_n is the last and largest).

2. The Pair Crossing Elimination Method

To visually locate the median without manual index math, arrange the numbers in ascending order and pair off the smallest and largest remaining numbers from the outside inward until the center is reached.
📊Interactive Sorting & Outer-Pair Elimination Model
Raw (Unsorted) Dataset:[19, 7, 14, 12, 16]
Sorted Dataset (Ascending):
#17
#212
#314
Median
#416
#519
🎯 Center Isolated! The median is 14.

3. Odd Dataset Length (nn is Odd)

When a dataset has an odd number of values (n=5,7,9,n = 5, 7, 9, \dots), there is exactly one number in the exact middle. Its position in the sorted list is given by the formula Position=n+12\text{Position} = \frac{n + 1}{2}.

4. Even Dataset Length (nn is Even)

When a dataset has an even number of values (n=6,8,10,n = 6, 8, 10, \dots), there is no single middle element. Instead, two numbers share the center at positions n2\frac{n}{2} and n2+1\frac{n}{2} + 1. The median is the arithmetic average (mean) of these two numbers.

5. Median vs. Mean (Outlier Resistance)

Why do statisticians use both mean and median? The Mean is sensitive to extreme values (outliers), while the Median is resistant (robust). For example, if someone in a neighborhood earns $10,000,000, the mean income spikes drastically, while the median remains steady, reflecting a typical resident.

6. Real-World Worked Examples

Example 1: Odd Dataset (Quiz Scores)
Raw quiz scores: 14,7,19,12,1614, 7, 19, 12, 16 (n=5n=5).
1. Sort: 7,12,14,16,197, 12, \mathbf{14}, 16, 19.
2. Middle index: 5+12=3\frac{5+1}{2} = 3rd value.
3. Median: 14\mathbf{14}.
Example 2: Even Dataset (Running Times)
Sprint times in seconds: 12.4,11.2,13.0,11.8,14.2,12.012.4, 11.2, 13.0, 11.8, 14.2, 12.0 (n=6n=6).
1. Sort: 11.2,11.8,12.0,12.4,13.0,14.211.2, 11.8, \mathbf{12.0}, \mathbf{12.4}, 13.0, 14.2.
2. Two middle values: 3rd (12.012.0) and 4th (12.412.4).
3. Average: Median=12.0+12.42=12.2 s\text{Median} = \frac{12.0 + 12.4}{2} = \mathbf{12.2\text{ s}}.
Example 3: Impact of an Extreme Outlier
Consider weekly savings: 10,15,20,25,3010, 15, 20, 25, 30. Median = 2020, Mean = 2020.
If the last person saved 1,0001,000 instead of 3030:
  • New Mean: 10+15+20+25+10005=214\frac{10+15+20+25+1000}{5} = 214 (skewed by outlier).
  • New Median: Still 20\mathbf{20} (unaffected).
Learning Topics