The Complete Statistical Guide to the Median: Non-Parametric Central Tendency, Five-Number Summaries & Tukey's Outlier Fences
In descriptive statistics, exploratory data analysis (EDA), real estate econometrics, labor economics, and clinical epidemiology, the Median (˜x) is the essential non-parametric measure of central tendency representing the exact 50th percentile (second quartile $Q_2$) of an ordered dataset. Explore our comprehensive Advanced Mathematics & Statistics Suite for complete statistical tools.
Unlike the arithmetic mean, which is highly vulnerable to distortion by extreme outliers and asymmetrical skewness, the median represents the true geometric center of a dataset: exactly 50% of all numerical observations lie at or below the median, and 50% lie at or above it. For this reason, governmental agencies such as the US Census Bureau, the Federal Reserve, and the National Association of Realtors (NAR) report Median Household Income and Median Home Sale Prices rather than arithmetic averages. To analyze data dispersion around the mean, use our Standard Deviation Calculator, or examine bivariate relationships with our Correlation Coefficient Calculator.
1. Median for an Odd Number of Observations (n is Odd):
Median = x(n + 1) / 2The single middle value of the sorted sequence.
2. Median for an Even Number of Observations (n is Even):
Median = [ xn / 2 + x(n / 2) + 1 ] ÷ 2The arithmetic average of the two central sorted values.
3. The Five-Number Summary:
{ Minimum, Q₁ (25th Percentile), Median Q₂ (50th Percentile), Q₃ (75th Percentile), Maximum }4. Interquartile Range (IQR):
IQR = Q₃ - Q₁Measures the statistical spread of the middle 50% of the distribution.
5. Tukey's Outlier Fences:
•
Lower Inner Fence = Q₁ - (1.5 × IQR)•
Upper Inner Fence = Q₃ + (1.5 × IQR)•
Lower Outer Fence (Extreme) = Q₁ - (3.0 × IQR)•
Upper Outer Fence (Extreme) = Q₃ + (3.0 × IQR)6. Arithmetic Mean:
x̄ = (∑ xi) ÷ n7. Pearson's Median Skewness Coefficient:
Skewness ≈ 3 × (Mean - Median) ÷ Standard Deviation
💡 Why the Real Estate Market & US Census Use Median Instead of Mean
Consider a neighborhood with 7 homes sold during a given month with the following sale prices:
$250,000, $275,000, $310,000, $325,000, $350,000, $420,000, and $1,850,000 (a luxury mansion).
- The Median Price is $325,000: Exactly three homes sold for less, and three homes sold for more. It accurately reflects what a typical buyer paid in that community.
- The Mean Price is $540,000: The single $1.85 million mansion pulls the arithmetic mean up by over $215,000, giving a completely misleading impression that homes in the area cost more than half a million dollars when 85% of homes sold for $420,000 or less!
Comprehensive Comparative Matrix: Measures of Central Tendency
Choosing between Mean, Median, Mode, and Trimmed Mean depends upon data symmetry, outliers, and scale:
| Measure of Center | Mathematical Definition | Resilience to Outliers (Robustness) | Applicable Data Types | Optimal Analytical Scenarios |
|---|---|---|---|---|
| Median (˜x) | 50th percentile (exact middle value) | Extremely High (Breakdown point = 50%) | Continuous, Discrete, and Ordinal ranked data | Skewed economic distributions (salaries, net worth, home prices), medical patient length of stay, survival times. |
| Mean (&bar;x) | Sum of all values divided by count (∑x / n) | Low (A single rogue outlier can pull mean infinitely) | Continuous numerical (Interval or Ratio scale) | Symmetric bell curves, physical laboratory measurement standards, financial portfolio expected return models. |
| Mode | Most frequently occurring value(s) in dataset | High (Unimpressed by extreme values) | Nominal categorical, Discrete, and Continuous | Retail inventory stock sizing (most common shoe size purchased), election ballot voting, peak customer traffic hours. |
| Trimmed Mean | Mean calculated after discarding top & bottom k% | Moderate to High | Continuous numerical | Olympic figure skating scoring (discarding highest and lowest judge marks), industrial sensor filtering. |
Step-by-Step Worked Example: Odd vs. Even Parity
To master the calculation of median and quartiles, consider two illustrative datasets:
Example 1: Odd Dataset (n = 7)
Raw Data: [ 14, 8, 22, 5, 19, 31, 11 ]
Sorted: [ 5, 8, 11, 14, 19, 22, 31 ]Step 2: Find Middle Position for Odd n = 7
Position = (n + 1) ÷ 2 = (7 + 1) ÷ 2 = 4th elementMedian = 14Step 3: Calculate Quartiles and IQR
•
Lower Half: [ 5, 8, 11 ] → Q₁ = 8•
Upper Half: [ 19, 22, 31 ] → Q₃ = 22•
IQR = Q₃ - Q₁ = 22 - 8 = 14
Example 2: Even Dataset (n = 8)
Raw Data: [ 45, 12, 88, 34, 67, 23, 91, 56 ]
Sorted: [ 12, 23, 34, 45, 56, 67, 88, 91 ]Step 2: Find the Two Central Elements for Even n = 8
•
First central position: n ÷ 2 = 8 ÷ 2 = 4th element (45)•
Second central position: (n ÷ 2) + 1 = 5th element (56)Median = (45 + 56) ÷ 2 = 101 ÷ 2 = 50.5Step 3: Calculate Quartiles and IQR
•
Lower Half: [ 12, 23, 34, 45 ] → Q₁ = (23 + 34) ÷ 2 = 28.5•
Upper Half: [ 56, 67, 88, 91 ] → Q₃ = (67 + 88) ÷ 2 = 77.5•
IQR = Q₃ - Q₁ = 77.5 - 28.5 = 49.0
Box-and-Whisker Plot Anatomy & Tukey Outlier Rules
Introduced by John Tukey in 1977, the Box-and-Whisker Plot (Boxplot) is the standard graphical visualization of the Five-Number Summary:
- The Box: Spans from the first quartile ($Q_1$) to the third quartile ($Q_3$), representing the Interquartile Range ($IQR$) containing the central 50% of all data points.
- The Median Line: A vertical line dividing the box at $Q_2$. If the median line is closer to $Q_1$, the distribution is right-skewed; if closer to $Q_3$, it is left-skewed.
- The Whiskers: Extend outward from $Q_1$ and $Q_3$ to the smallest and largest observations that fall within the Tukey inner fences ($1.5 \times IQR$).
- Outliers (Points / Asterisks): Any individual observation located beyond the inner fences ($x < Q_1 - 1.5 \times IQR$ or $x > Q_3 + 1.5 \times IQR$) is plotted as an individual outlier dot.
Real-World Applications of the Median
The median is the preferred central metric across diverse scientific and socioeconomic domains:
1. Socioeconomic Income & Wealth Reporting
Because national wealth and income distributions are heavily skewed by billionaires and high-earning executives, the arithmetic mean suggests an artificially elevated standard of living. The Median Household Income represents the exact threshold where half of all families earn more and half earn less, providing an accurate foundation for poverty threshold benchmarks.
2. Oncology & Medical Clinical Trial Survival Times
In cancer clinical trials, measuring "Average Survival Time" is impossible until the final surviving patient passes away (which may take decades). Medical researchers report Median Overall Survival (OS): the exact duration of time after which 50% of the patient cohort remains alive, allowing clinical trials to reach decisive statistical endpoints much faster.
3. Web Performance: Server Latency (P50, P95, P99)
In cloud computing and site reliability engineering (SRE), average server response time is misleading because occasional network timeouts inflate the mean. Engineers monitor Median Latency (P50) to evaluate typical user experience alongside P95 and P99 tail percentiles.
Frequently Asked Questions (FAQ)
The median is the middle value in a sorted, ascending or descending dataset. It divides a statistical distribution into two equal halves, such that exactly 50% of the observations lie below the median and 50% lie above it.
If the number of elements n is odd, the median is the single middle element located at position (n + 1) / 2.
If n is even, the median is the arithmetic mean of the two middle elements located at positions n / 2 and (n / 2) + 1.
The median is a robust, non-parametric measure of central tendency that is resistant to extreme outliers and asymmetric skewness. In contrast, the arithmetic mean is sensitive to extreme values and gets pulled heavily toward the tail in skewed distributions (such as housing prices and household income).
The Five-Number Summary consists of five key descriptive statistics:
- Minimum: Smallest non-outlier value in dataset
- First Quartile (Q1): 25th percentile (median of lower half)
- Median (Q2): 50th percentile (central value)
- Third Quartile (Q3): 75th percentile (median of upper half)
- Maximum: Largest non-outlier value in dataset
The Interquartile Range is calculated as IQR = Q3 - Q1, measuring the spread of the middle 50% of the data. Under Tukey's Outlier Rule:
- Lower Fence:
Q1 - 1.5 × IQR - Upper Fence:
Q3 + 1.5 × IQR
Any data point falling outside these fences is identified as a statistical outlier.
When Mean > Median, the dataset exhibits positive or right-skewness. This indicates the presence of extreme high values (outliers) that pull the arithmetic mean upward while the median remains stable.
Yes. When a dataset has an even number of integer observations, the median is the arithmetic average of the two middle values. If one middle number is even and the other is odd (e.g. 4 and 5), their average will be a decimal (4.5).
If a single number appears with the highest frequency, the dataset is unimodal. If two numbers tie for highest frequency, it is bimodal. If three or more tie, it is multimodal. If every number appears exactly once (equal frequency), the dataset has no mode.