Median
Statistics & ProbabilityThe median is the middle value of a dataset when arranged in order, splitting the data into two equal halves.
Definition
The median is the middle value when all the data is lined up in order from least to greatest. Half the values are below it and half are above it.
Example
Heights: $58$, $60$, $62$, $65$, $70$ inches. The median is $62$ because it is in the middle. For an even number of values (e.g., $58$, $60$, $62$, $65$), the median is the average of the two middle values: $(60+62)/2 = 61$.
Key Insight
The median is not fooled by extremely large or small values. That is why it is often reported for housing prices and incomes, where a few very high values would skew the mean.
Definition
The median is the value that divides an ordered dataset into two equal halves. For an odd number of values $n$, it is the $((n+1)/2)$th ordered value. For an even number, it is the mean of the $(n/2)$th and $(n/2+1)$th ordered values. The median is resistant to outliers.
Example
Salaries (in thousands): $40$, $45$, $48$, $52$, $55$, $60$, $500$. Mean $= 114.3$, median $= 52$. The median better represents the typical salary because the outlier ($500$) does not affect it.
Key Insight
The median minimizes the sum of absolute deviations: $\sum |x_i - c|$ is minimized when $c = \text{median}$. This connects median to L1 optimization and robust statistics.
Definition
The median is the $50$th percentile ($Q_2$) of the empirical distribution. As an estimator of population location, the sample median is consistent and approximately normally distributed with mean $\mu$ and variance $1/(4nf(\mu)^2)$ by the asymptotic theory of order statistics, where $f(\mu)$ is the pdf at the true median.
Example
For normal data, the asymptotic relative efficiency (ARE) of the median relative to the mean is $2/\pi$, approximately $0.637$. This means the median requires about $57\%$ more data to achieve the same precision as the mean, making the mean preferable when normality holds.
Key Insight
In heavy-tailed distributions (e.g., Cauchy, where the mean does not exist), the median is the preferred measure of location. Robust statistics builds on this: estimators like the Huber M-estimator interpolate between mean and median behavior.