Defining the Median

Descriptive StatisticsCentral TendencyFree Lesson

Advertisement

The Honest Middle

US median household income ≈ 74k;mean74k; mean ≈ 100k. The gap exists because billionaires pull the mean up. The median tells you what a typical household earns — the mean tells you the mathematical centre.

Core Insight: The median splits sorted data in half — 50% below, 50% above. It is completely unaffected by how extreme the extremes are.


Formula

Median={x(n+12)n oddx(n/2)+x(n/2+1)2n even\text{Median} = \begin{cases} x_{(\frac{n+1}{2})} & n \text{ odd} \\ \dfrac{x_{(n/2)} + x_{(n/2+1)}}{2} & n \text{ even} \end{cases}


Worked Examples

Odd (n=5): 3, 7, 1, 9, 5 → Sorted: 1, 3, 5, 7, 9 → Median = 5

Even (n=6): 3, 7, 1, 9, 5, 11 → Sorted: 1, 3, 5, 7, 9, 11 → Median = 6

Odd:   1   3  [5]  7   9     ← centre element
Even:  1   3  [5  7]  9  11  ← average of pair

Python Implementation

import numpy as np
import statistics

odd_data  = [3, 7, 1, 9, 5]
even_data = [3, 7, 1, 9, 5, 11]

print(np.median(odd_data))           # 5.0
print(np.median(even_data))          # 6.0

salaries = [45000, 50000, 52000, 48000, 1_000_000]
print(f"Mean:   {np.mean(salaries):,.0f}")    # 239,000  ← distorted
print(f"Median: {np.median(salaries):,.0f}")  # 50,000   ← honest

R Implementation

odd  <- c(3, 7, 1, 9, 5)
even <- c(3, 7, 1, 9, 5, 11)

median(odd)   # 5
median(even)  # 6

salaries <- c(45000, 50000, 52000, 48000, 1000000)
cat("Mean:", mean(salaries), "Median:", median(salaries), "\n")

Skewness Indicator

Median = Mean   → symmetric distribution
Median < Mean   → right-skewed (long right tail)
Median > Mean   → left-skewed (long left tail)
Use CaseRecommended
Income / wealthMedian
House pricesMedian
Normal exam scoresEither
Response timesMedian
TemperatureEither

Key Takeaways

  1. Sort first — median only makes sense on ordered data
  2. Odd n — exact middle element at position (n+1)/2(n+1)/2
  3. Even n — average of the two middle elements
  4. Outlier resistant — extreme values don't move the median
  5. 50th percentile — median equals the 50th percentile by definition
  6. Skew detector — large mean-median gap signals skewed distribution

Advertisement

Need Expert Statistics Help?

Get personalized tutoring, dissertation support, or statistical consulting.

Advertisement