Lesson 2 / 13 · 12 min read
Data Displays & Distribution Shape
Histograms, box plots, quartiles, the IQR, and spotting skew and outliers.
Why visualize?
Summary numbers hide structure. Two data sets can share the exact same mean and look completely different. A picture reveals shape, center, spread, and oddities at a glance — before you trust any single number.
Histograms
A histogram groups values into intervals (bins) and draws a bar for how many values land in each bin. A tall bar means many values in that range. The outline shows the shape of the distribution.
Common shapes:
- Symmetric (often bell-shaped) — balanced around the center.
- Right-skewed — a long tail stretching to the right.
- Left-skewed — a long tail stretching to the left.
- Bimodal — two distinct peaks (often two groups mixed together).
Skew drags the mean
The skew direction is the direction of the long tail. A few extreme values in the tail pull the mean toward them, while the median barely moves:
- Right-skewed: mean>median
- Left-skewed: mean<median
- Symmetric: mean≈median
Income is the classic right-skewed example: a few huge earners pull the mean above the median.
Quartiles and the five-number summary
Sort the data. Quartiles cut it into four equal parts:
- Q1 (25th percentile): the median of the lower half.
- Q2 (50th percentile): the median itself.
- Q3 (75th percentile): the median of the upper half.
The five-number summary is: minimum, Q1, median, Q3, maximum.
Example. Data: 2,4,5,7,8,10,12,14,18 (n = 9). The median is the 5th value, 8. Lower half {2,4,5,7} gives Q1=24+5=4.5. Upper half {10,12,14,18} gives Q3=212+14=13.
Five-number summary: 2, 4.5, 8, 13, 18.
Interquartile range (IQR)
IQR=Q3−Q1
The IQR is the spread of the middle 50% of the data. Because it ignores the extremes, it's resistant to outliers. For the example: IQR=13−4.5=8.5.
Box plots
A box plot draws the five-number summary: a box from Q1 to Q3 with a line at the median, and whiskers extending to the smallest and largest non-outlier values. Great for comparing several groups side by side.
The 1.5 × IQR rule for outliers
A value is flagged as an outlier if it falls below the lower fence or above the upper fence:
lower fence=Q1−1.5×IQR upper fence=Q3+1.5×IQR
Example. Lower fence =4.5−1.5(8.5)=−8.25; upper fence =13+1.5(8.5)=25.75. Every value sits inside, so there are no outliers.
Choosing center and spread by shape
- Symmetric, no outliers → report the mean and standard deviation.
- Skewed or outliers present → report the median and IQR (the resistant measures).
Key takeaways
- Histograms reveal shape — watch for skew and multiple peaks.
- Skew points toward the long tail and drags the mean, not the median.
- Five-number summary builds the box plot; IQR=Q3−Q1.
- Flag outliers with the 1.5×IQR rule.
- Skew or outliers? Prefer the median and IQR.