what is a median
A median is the middle value of a set of numbers when they are arranged in order from smallest to largest.
Simple definition
- Line up all the numbers in order.
- If there is an odd number of values, the median is the one right in the middle.
- If there is an even number of values, the median is the average of the two middle numbers.
Example (odd count):
Data: 1, 2, 3, 5, 6, 7, 12 → median is 5 (three numbers are smaller, three are
larger).
Example (even count):
Data: 1, 2, 3, 4, 5, 9 → middle two are 3 and 4, so median =
(3+4)/2=3.5(3+4)/2=3.5(3+4)/2=3.5.
Why the median matters
- It is a measure of “central tendency” (a way to describe the center of the data), along with mean and mode.
- It is less affected by extreme values (outliers) than the mean, so it often gives a better sense of a “typical” value when the data are skewed (like incomes or house prices).
How to find the median (step‑by‑step)
- Arrange the data in order from smallest to largest.
- Count how many values there are; call this number nnn.
- If nnn is odd: the median is the n+12\frac{n+1}{2}2n+1-th value in the ordered list.
- If nnn is even: take the n2\frac{n}{2}2n-th and (n2+1)\left(\frac{n}{2}+1\right)(2n+1)-th values and average them.
Quick comparison with “average” (mean)
- Mean : add all the numbers and divide by how many there are.
- Median : take the middle value (or the average of the two middle values).
- When a few values are very large or very small, the median can be a more representative center than the mean.
In everyday stats like “median income” or “median house price,” median is used so that a few very rich or very expensive cases do not distort the picture of what’s typical.
TL;DR: The median is the middle number in ordered data, or the average of the two middle numbers if there isn’t a single middle.