Statistics for Finance
Histograms and box plots
Averages, spread and skew are just numbers. Two simple charts let you see all of them at once, and spot what the numbers hide.
Sixty numbers, one glance
Example, with made-up numbers. You have five years of a fund's monthly returns: 60 numbers, from −7.0% to +7.0%. Reading down the list tells you almost nothing. How can you see what a typical month looks like, how wide the swings are, and whether anything strange is going on?
The idea
A histogram sorts the values into equal-width bins and draws a bar for each, as tall as the number of values that fall in it. A box plot squeezes the same data into five markers. Here are the same 60 months, both ways:
Top: how many months fell in each 2-point bin. Bottom: the same months as a box plot, on the same scale.
Quick check
What share of the data sits inside the box of a box plot?
Worked example: finding the outlier
A box plot marks a value as an outlier when it lies more than 1.5 box-lengths beyond the box. For the 60 months:
| Box (25th to 75th percentile) | −0.7% to 2.95% |
| Box length (interquartile range) | 3.65 points |
| 1.5 box-lengths | 1.5 × 3.65 = 5.48 points |
| Lower fence: −0.7 − 5.48 | −6.18% |
| Upper fence: 2.95 + 5.48 | 8.43% |
That's the month to look into: a one-off shock, a data error, or a sign of fat tails. The mean (0.97%) sits below the median (1.15%), which agrees with the slight negative skew in the histogram.
Try it yourself
Paste values and choose a bin width.
Try a bin width of 0.5, then 5. Too narrow and the shape turns into noise. Too wide and it disappears.
Common mistakes
Three slips beginners make.
- Reading a bar's height as a value. In a histogram, the height is a count: how many values fall in that bin.
- Using bins of different widths. Wider bins catch more values just by being wider, which distorts the shape. Keep them equal.
- Assuming the whiskers reach the lowest and highest values. They stop at the last value inside the fences. Anything further is drawn as a separate dot.
Remember
- A histogram counts values in equal-width bins, and shows the center, spread, skew and tails.
- A box plot shows the median, the middle half (the box), the rest (whiskers) and outliers (dots).
- An outlier lies more than 1.5 box-lengths beyond the box. Always look into it.
Check yourself
Three questions. Try them without scrolling up.
1. A histogram's tallest bars are on the left, with a long, thin tail stretching to the right. What shape is the data?
2. In a box plot, the box runs from 2% to 6%. What is the interquartile range?
3. With the box from 2% to 6%, which of these values would be drawn as an outlier dot?
Misleading charts
Cut axes, cherry-picked dates and other tricks to spot.