Box Plot: Median, Quartiles, and Outliers
Problem
Create a box-and-whisker plot from data. Show median, Q1, Q3, IQR, whiskers, and outliers.
Explanation
What is a box plot?
A box plot (box-and-whisker plot) displays the five-number summary of a dataset at a glance: minimum, Q1, median, Q3, maximum. It shows the center, spread, and skewness of data.
How to construct a box plot — step by step
Step 1 — Sort the data. Example: .
Step 2 — Find the median (Q2). Middle value: .
Step 3 — Find Q1 (median of lower half). Lower half: . Q1 .
Step 4 — Find Q3 (median of upper half). Upper half: . Q3 .
Step 5 — Compute the IQR. .
Step 6 — Find the fences (outlier boundaries): Lower fence . Upper fence .
Step 7 — Identify outliers. Any value below or above is an outlier. Here: is an outlier!
Step 8 — Draw the box from Q1 to Q3, with a line at the median. Whiskers extend to the most extreme non-outlier values (2 and 8). Outliers are plotted as individual dots (100).
What box plots reveal
- Skewness: If the median line is closer to Q1 → right-skewed. Closer to Q3 → left-skewed.
- Spread: A wide box (large IQR) means more variability.
- Outliers: Dots beyond the whiskers flag unusual values.
Try it in the visualization
Toggle the outlier on/off. Watch how the box, whiskers, and median change. The data points animate into sorted order, then the box forms around the quartiles.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.