Quartiles and the IQR

The median splits sorted data into two halves. Quartiles go one step further and split it into four equal quarters using three cut points:

Each quartile is itself a median: Q_1 is the median of the lower half, Q_3 the median of the upper half.

The interquartile range

The distance between the outer quartiles is the interquartile range:

\text{IQR} = Q_3 - Q_1.

It is the width of the middle 50% of the data. Unlike the range, which is decided entirely by the two most extreme points, the IQR throws those extremes away. That makes it robust: a single wild outlier can blow up the range but barely nudges the IQR.

The boxplot

A boxplot draws all five summary numbers at once. For the sorted data set 3, 5, 6, 7, 8, 9, 11, 13, 15, 21 the quartiles are Q_1 = 6, median = 8.5 and Q_3 = 13, so \text{IQR} = 13 - 6 = 7. The box runs from Q_1 to Q_3 with the median marked inside; the whiskers reach out to the smallest and largest values.

At a glance the box shows where the central half of the data sits, and the whiskers show how far the tails stretch. A long whisker on one side already hints at skew.