Statistics 📊 Describing Data

Quartiles, Box Plots & Outliers

Summarize any dataset with five numbers, picture it as a box, and spot the values that don't fit.

Intro StatisticsAP Statistics level
💡
The big idea: A whole dataset — hundreds or thousands of values — can be captured by just five numbers: the minimum, the three quartiles, and the maximum. Draw those as a box with whiskers and you get a compact picture that shows the center, the spread of the middle half, and any unusually extreme values, all at a glance.
🎯 By the end, you'll be able to
  • Find the quartiles Q1, Q2 (the median) and Q3 of a dataset
  • Write the five-number summary and compute the interquartile range (IQR)
  • Draw and read a box-and-whisker plot
  • Apply the 1.5×IQR rule to flag potential outliers
  • Judge whether a distribution is symmetric or skewed from its box plot
📎 You should already know
  • The median of a dataset
  • Minimum, maximum and the range

Five numbers that describe a whole dataset

Suppose you have the exam scores of 200 students, or the price of every house sold in a city last month. You cannot eyeball hundreds of numbers at once. Instead, statisticians boil a dataset down to just five numbers — and then draw a small picture, the box plot, that shows those five numbers at a glance.

To get there, we first cut the data into quarters.

Quartiles: cutting the data into four

Line all your values up from smallest to largest. The median is the middle value — it splits the data into a bottom half and a top half. The quartiles just repeat that same idea:

  • Q1 (the first quartile) is the median of the bottom half — about a quarter of the data lies below it.
  • Q2 is the overall median — half the data lies below it.
  • Q3 (the third quartile) is the median of the top half — about three quarters of the data lie below it.

So Q1, Q2 and Q3 chop the sorted data into four groups, each holding roughly 25% of the values.

🔑 The five-number summary
Five numbers describe the whole dataset: the minimum, Q1, the median (Q2), Q3, and the maximum. Together they tell you where the data starts, where the middle 50% sits, and where it ends.

The IQR: spread of the middle half

The distance between Q1 and Q3 is the interquartile range, or IQR. It measures how spread out the middle half of the data is. Unlike the full range (maximum minus minimum), the IQR ignores the extreme tails, so a single wild value cannot inflate it. That makes the IQR a resistant measure of spread.

\[ \text{IQR} = Q_3 - Q_1 \]
The interquartile range is the width of the middle 50% of the data — the distance from Q1 up to Q3.

The box plot

A box-and-whisker plot draws the five-number summary as a picture. A box stretches from Q1 to Q3, so the length of the box is the IQR. A line inside the box marks the median. Then two whiskers reach out from the box toward the smallest and largest values that are not unusually extreme.

Try it below: feed the tool a dataset and watch it build the box, draw the median line and whiskers, and flag any outliers as separate points.

🎮 Interactive: build a box plot LIVE
Adjust the data and watch the five-number summary, the box (Q1 to Q3), the median line, and the whiskers update live. Values beyond the 1.5×IQR fences are marked as separate outlier points.
✨ Reading skew from the shape
A box plot quietly reveals the shape of a distribution. If the median sits near the middle of the box and the two whiskers are about equal, the data is roughly symmetric. If the box and the right whisker are stretched to the high side while the median hugs the left, the data is right-skewed. A long left whisker with the median pushed to the right means left-skewed. In short: the longer tail points the way the data is skewed.

Flagging outliers: the 1.5×IQR rule

How far from the middle is 'too far'? The most common convention builds a fence on each side of the box, one and a half IQRs out from the quartiles:

\[ \text{lower fence} = Q_1 - 1.5\times\text{IQR} \qquad \text{upper fence} = Q_3 + 1.5\times\text{IQR} \]
Any value below the lower fence or above the upper fence is flagged as a potential outlier.
⚠️ A flag, not a verdict
The 1.5×IQR rule flags points for a closer look — it does not prove they are mistakes. An outlier might be a data-entry error, or it might be a perfectly real and important value, like a genuinely huge sale. The rule also does not delete anything: the whiskers simply stop at the most extreme value still inside the fences, and flagged points are drawn separately.
📝 Worked example: Ten delivery times (in minutes) are recorded: 4, 7, 8, 9, 10, 12, 14, 15, 18, 40. Find the five-number summary and the IQR, then check for outliers with the 1.5×IQR rule.
  1. The data is already sorted. With n = 10 (even), the median is the average of the 5th and 6th values: (10 + 12) / 2 = 11.
  2. Bottom half (the first five values): 4, 7, 8, 9, 10. Its median is the middle value, so Q1 = 8.
  3. Top half (the last five values): 12, 14, 15, 18, 40. Its median is Q3 = 15.
  4. IQR = Q3 − Q1 = 15 − 8 = 7, so 1.5 × IQR = 10.5.
  5. Fences: lower = 8 − 10.5 = −2.5, upper = 15 + 10.5 = 25.5. The value 40 is above 25.5, so it is a high outlier; every other value falls inside the fences.
✓ Five-number summary: min 4, Q1 8, median 11, Q3 15, max 40. The IQR is 7. Because 40 is a high outlier, the box plot's right whisker stops at 18 (the largest value inside the fence) and 40 is drawn as its own point.

Check your understanding

1. The interquartile range (IQR) is defined as…
The IQR is Q3 − Q1, the width of the middle 50% of the data. Maximum − minimum is the full range, which is not resistant to extreme values.
2. A dataset has Q1 = 20 and Q3 = 32. By the 1.5×IQR rule, a value is a high outlier if it is…
IQR = 32 − 20 = 12, so 1.5 × IQR = 18. Upper fence = Q3 + 18 = 32 + 18 = 50. Anything above 50 is flagged.
3. In a box plot, the line drawn inside the box represents…
The box runs from Q1 to Q3 and the line inside it marks the median, Q2. The box plot does not show the mean.
4. A box plot has a much longer whisker on the right (high) side, and the median sits toward the left edge of the box. The distribution is…
The longer tail points the way of the skew. A long right whisker with the median pushed left indicates right-skew (a few high values stretch the top end).
✅ Key takeaways
  • Quartiles Q1, Q2 (the median) and Q3 split sorted data into four groups of about 25% each.
  • The five-number summary is the minimum, Q1, median, Q3, and maximum.
  • The IQR = Q3 − Q1 is the spread of the middle 50% and resists extreme values.
  • A box plot draws the box from Q1 to Q3 with the median inside, and whiskers out to the most extreme non-outlier values.
  • A point is a potential outlier if it is below Q1 − 1.5×IQR or above Q3 + 1.5×IQR; the longer whisker shows the direction of skew.