Median
The median is the middle value of the data sorted in increasing order, or the mean of the two middle values when is even. Unlike the mean, it is robust to outliers. Use it to describe typical incomes or house prices, where a few extreme values would distort the mean.
LaTeX
\text{median}=\begin{cases}x_{\left(\frac{n+1}{2}\right)} & n\text{ odd}\\[4pt] \dfrac{x_{\left(\frac{n}{2}\right)}+x_{\left(\frac{n}{2}+1\right)}}{2} & n\text{ even}\end{cases}Variables
- the k-th smallest value
- number of values
Example
Find the median of and of .
- Sorted: ; the 3rd value is .
- Sorted: ; .
Answer: Medians and .