← MATH 380 MathScape 0 MATH380

Measures of Spread: Quartiles and the IQR

17 min read

Jump to a section

Quick Reference

Textbook: Moore, McCabe, and Craig, Introduction to the Practice of Statistics (IPS), 9th edition. Location: Chapter 1 (Looking at Data: Distributions), Section 1.3 (Describing Distributions with Numbers), subsection “Measuring spread: the quartiles and the five-number summary.” Pages: Page numbers pending faculty verification. Role in the course: A center alone hides how tightly or loosely the data cluster. The quartiles and the interquartile range supply a resistant measure of spread, complete the five-number summary, and set up the boxplot and the variance/standard deviation that follow.


Try This First

📋 A two-minute warmup before any definition (click to open)

Two study groups each report their five quiz scores out of 10.

  • Group A: 5, 5, 6, 6, 6
  • Group B: 1, 3, 6, 9, 10

Both groups have the same median, 6. Without computing anything formal, answer two questions.

  1. Which group’s scores are bunched close together, and which are spread far apart?
  2. If a single number had to capture how far apart the middle of each group is, what would you measure?
Compare your reasoning

Group A is bunched: every score sits within one point of the median. Group B is spread: scores reach from 1 all the way to 10.

A natural single number is the distance between the values that sit a quarter of the way in from each end. In Group A that distance is small. In Group B that distance is large. That distance is the interquartile range, and the values a quarter of the way in are the quartiles. The section below makes both ideas precise.

The median answers “what is a typical value.” It says nothing about whether the other values huddle near that typical value or scatter far from it. Two data sets can share a median and still describe very different situations, as the warmup shows.

Spread is the missing half of the description. One way to report spread is the range, the largest value minus the smallest. The range uses only the two most extreme observations, so a single unusual value can stretch it without warning. A measure that looks at the middle of the data instead is steadier. The quartiles mark off the middle, and the interquartile range reports its width.


Prerequisite Hub

Builds on

Skill Why it comes first
Measures of Center: Mean and Median A quartile is the median of one half of the data, so the median locate-and-average procedure must already be automatic.
Describing a Distribution: Shape, Center, Spread Spread is one of the three features every distribution is described by. Quartiles and the IQR are a specific way to report spread.

Unlocks

Skill What this enables
Measures of Spread: Variance and Standard Deviation The second major spread measure, used when the mean is the chosen center.
Density Curves A smooth model of a distribution, where quartiles reappear as areas under the curve.

Cross-course prerequisites: none.

Prerequisite Map


Quick Reference

Property Value
Chapter.Section IPS 1.3
Course MATH380
Difficulty Intermediate
Time ~30 minutes

The Quartiles at a Glance

Symbol Name What it marks
$Q_1$ First quartile The median of the lower half of the ordered data; about one quarter of the values fall below it
$M$ Median The center of the ordered data; about half the values fall below it
$Q_3$ Third quartile The median of the upper half of the ordered data; about three quarters of the values fall below it
$\text{IQR}$ Interquartile range The width of the middle half, $Q_3 - Q_1$

Procedure in one line: order the data, find the median to split the list, then take the median of each half.


Official Definitions

Quartiles ($Q_1$ and $Q_3$).

To calculate the quartiles, arrange the observations in increasing order and locate the median $M$. The first quartile $Q_1$ is the median of the observations whose position in the ordered list is to the left of the location of the overall median. The third quartile $Q_3$ is the median of the observations to the right of the location of the overall median.

Source: Moore, McCabe, Craig, IPS 9th edition, Section 1.3 (Describing Distributions with Numbers); corroborated by OpenStax Introductory Statistics 2e, quartiles separate the data into quarters (openstax.org).

Interquartile range (IQR).

The interquartile range IQR is the distance between the first and third quartiles, $\text{IQR} = Q_3 - Q_1$. It is the spread of the middle half of the data.

Source: Moore, McCabe, Craig, IPS 9th edition, Section 1.3 (Describing Distributions with Numbers); corroborated by OpenStax Introductory Statistics 2e, the IQR is the range of the middle 50 percent found by subtracting $Q_1$ from $Q_3$ (openstax.org).

Read the quartile definition slowly, because it contains the one rule beginners most often miss. After the overall median splits the ordered list, the lower half is “the observations to the left of the location of the overall median” and the upper half is “the observations to the right.” When the data set has an odd count, the median is an actual data value, and that value belongs to neither half. It is left out when each half’s median is taken.

There is no theorem in this section. The two definitions are the entire toolkit. The skill is following the locate-then-split-then-locate-again procedure carefully and reading $\text{IQR} = Q_3 - Q_1$ as a width, the size of the box that holds the middle half of the data.


Worked Examples

Example 1: An odd count, so the median is a data value

A clinic records the wait time in minutes for seven patients: 12, 4, 18, 7, 9, 15, 6.

Predict first. The values run from 4 to 18. Predict whether the interquartile range will be closer to 5 or closer to 14, then check after the calculation.

Step 1: Order the data.

$$4, \quad 6, \quad 7, \quad 9, \quad 12, \quad 15, \quad 18.$$

Step 2: Locate the overall median. There are seven values, an odd count. The median is the fourth value, $M = 9$.

Step 3: Split into halves, leaving out the median. The lower half is the three values to the left of the median’s position: $4, 6, 7$. The upper half is the three values to the right: $12, 15, 18$. The median value 9 is in neither half.

Step 4: Take the median of each half.

$$Q_1 = \text{median of } (4, 6, 7) = 6, \qquad Q_3 = \text{median of } (12, 15, 18) = 15.$$

Step 5: Compute the IQR.

$$\text{IQR} = Q_3 - Q_1 = 15 - 6 = 9 \text{ minutes}.$$

Check against your prediction. The IQR is 9 minutes, between the two guesses and closer to 14 than to 5. The middle half of the patients waited within a 9-minute window. The full range, $18 - 4 = 14$ minutes, is larger because it includes the two most extreme waits.

Example 2: An even count, so the median splits cleanly between two values

A coffee shop records the number of customers in eight 10-minute windows: 22, 30, 18, 25, 27, 19, 24, 31.

Predict first. Predict whether $Q_1$ will be below or above 20, then check.

Step 1: Order the data.

$$18, \quad 19, \quad 22, \quad 24, \quad 25, \quad 27, \quad 30, \quad 31.$$

Step 2: Locate the overall median. There are eight values, an even count. The median is the average of the fourth and fifth values:

$$M = \frac{24 + 25}{2} = 24.5.$$

Step 3: Split into halves. Because the count is even, the median falls between two values, and every observation lands in one half. The lower half is the first four values, $18, 19, 22, 24$. The upper half is the last four, $25, 27, 30, 31$.

Step 4: Take the median of each half. Each half has four values, an even count, so each quartile is an average of the two middle values of its half.

$$Q_1 = \frac{19 + 22}{2} = 20.5, \qquad Q_3 = \frac{27 + 30}{2} = 28.5.$$

Step 5: Compute the IQR.

$$\text{IQR} = Q_3 - Q_1 = 28.5 - 20.5 = 8 \text{ customers}.$$

Check against your prediction. $Q_1 = 20.5$, just above 20. The middle half of the busy-window counts spans 8 customers.

Example 3: The IQR resists a single extreme value

Start with the wait times from Example 1, where the IQR was 9 minutes and the range was 14 minutes. Now suppose the last patient’s record is corrected to a 90-minute wait by mistake, so the data become 4, 6, 7, 9, 12, 15, 90.

Predict first. The range will clearly grow. Predict whether the IQR changes at all, then check.

Work it out. The data are already ordered. With seven values, the median is still the fourth, $M = 9$. The lower half is still $4, 6, 7$ and the upper half is still $12, 15, 90$.

$$Q_1 = \text{median of } (4, 6, 7) = 6, \qquad Q_3 = \text{median of } (12, 15, 90) = 15.$$

$$\text{IQR} = 15 - 6 = 9 \text{ minutes}.$$

Compare the two spread measures.

Measure Original data After the 90-minute value
Range $18 - 4 = 14$ $90 - 4 = 86$
IQR $15 - 6 = 9$ $15 - 6 = 9$

Conclusion. Changing the largest value from 18 to 90 multiplied the range by more than six, yet left the IQR unchanged. The quartiles depend on the position of values in the ordered list, not on the size of the most extreme ones. This is what it means to call the IQR a resistant measure of spread. The same property makes the IQR the spread reported alongside the median, while the standard deviation is reported alongside the mean.


Common Misconceptions

Common misconception

the first quartile is the value one quarter of the way along the number line between the smallest and largest values. The quartiles are positions in the ordered list of observations, not points cut from the numerical range. In Example 1 the smallest value is 4 and the largest is 18, so a quarter of the way along the number line would be $4 + 0.25(18 - 4) = 7.5$. The actual first quartile is 6, the median of the lower half. The quartiles count observations, they do not slice the axis. Predict-then-check: compute the “quarter of the way along the axis” value, then compute the real $Q_1$, and confirm the two disagree.

Common misconception

when the count is odd, the median value should be placed in both halves before finding the quartiles. The definition states that the lower half is the observations to the left of the median’s position and the upper half is the observations to the right. The median value itself sits at neither side, so it is excluded from both halves when an odd count makes it an actual data value. In Example 1, including 9 in each half would change $Q_1$ to the median of $(4, 6, 7, 9)$, which is 6.5, and would change $Q_3$ to the median of $(9, 12, 15, 18)$, which is 13.5, giving a different IQR. Different software packages handle this boundary case in different ways, so always follow the textbook rule for this course: exclude the overall median from both halves.

Common misconception

a larger IQR always means a larger range, and a small range guarantees a small IQR. The IQR measures the width of the middle half, while the range measures the full extent. Example 3 shows them coming apart: the range jumps from 14 to 86 while the IQR holds at 9. The IQR ignores the extreme values that the range is built from. A distribution can have a wide range from one outlier and still have a narrow, tightly clustered middle. The two numbers report different things on purpose.


Practice Problems

Level 1 Read the Definition

Fill in each blank using the official definitions.

(a) The interquartile range is computed as $\text{IQR} = \rule{2cm}{0.4pt}$.

(b) The first quartile $Q_1$ is the median of the observations whose position is to the $\rule{2cm}{0.4pt}$ of the overall median.

(c) The IQR describes the spread of the middle $\rule{2cm}{0.4pt}$ of the data.

Thought Process

Match each blank to the wording in the two definitions. The IQR is a difference of two quartiles, $Q_1$ comes from one side of the median, and the IQR captures a fixed fraction of the data.

Show Answer

(a) $\text{IQR} = Q_3 - Q_1$.

(b) To the left of the overall median.

(c) The middle half (the middle 50 percent) of the data.

Level 2 Quartiles of an Odd-Count Set

The ages of nine members of a hiking club are 21, 34, 27, 45, 30, 52, 38, 29, 41. Find $Q_1$, $M$, $Q_3$, and the IQR.

Thought Process

Order the nine ages first. With nine values the median is the fifth one, and it is excluded from both halves. The lower half is the first four ordered values and the upper half is the last four. Each half has an even count, so each quartile averages its two middle values.

Show Answer

Ordered: 21, 27, 29, 30, 34, 38, 41, 45, 52.

Median: the fifth value, $M = 34$.

Lower half (to the left of position 5): 21, 27, 29, 30. So

$$Q_1 = \frac{27 + 29}{2} = 28.$$

Upper half (to the right of position 5): 38, 41, 45, 52. So

$$Q_3 = \frac{41 + 45}{2} = 43.$$

IQR:

$$\text{IQR} = Q_3 - Q_1 = 43 - 28 = 15 \text{ years}.$$

Level 2 Quartiles of an Even-Count Set

The prices in dollars of six used textbooks are 35, 12, 48, 20, 27, 41. Find $Q_1$, $M$, $Q_3$, and the IQR.

Thought Process

Order the six prices. With an even count the median is the average of the third and fourth values, and every value lands in one half. The lower half is the first three and the upper half is the last three. Each half now has an odd count, so each quartile is the single middle value of its half.

Show Answer

Ordered: 12, 20, 27, 35, 41, 48.

Median:

$$M = \frac{27 + 35}{2} = 31.$$

Lower half: 12, 20, 27, so $Q_1 = 20$.

Upper half: 35, 41, 48, so $Q_3 = 41$.

IQR:

$$\text{IQR} = Q_3 - Q_1 = 41 - 20 = 21 \text{ dollars}.$$

Level 3 Choosing the Right Spread

A neighborhood’s home prices are strongly right-skewed, with a few very expensive houses pulling the high end far out. A report needs one center and one matching spread. Which pairing is the most appropriate?

(A) Report the mean for the center and the IQR for the spread.

(B) Report the median for the center and the IQR for the spread.

(C) Report the median for the center and the range for the spread.

(D) Report the mean for the center and the range for the spread.

Thought Process

A few very expensive houses are extreme values on the high side. Ask which center is resistant to those values and which spread is resistant to them, then pair the two resistant measures. The range and the mean are both pulled by extreme values; the median and the IQR are not.

Show Answer

Answer: (B).

The few very expensive houses are extreme values. The mean is pulled toward them, and the range is built from the most extreme values, so options (A), (C), and (D) each include at least one measure that the skew distorts.

  • The median is resistant: it reports the center of the ordered prices without being dragged up by the expensive houses.
  • The IQR is resistant: Example 3 showed it ignoring an extreme value entirely.

The standard pairing for a skewed distribution is the median with the IQR, which is option (B). The mean with the standard deviation is the pairing reserved for roughly symmetric distributions, covered in the next skill.

Level 4 The Boundary Case Done Two Ways

A data set has five values: 2, 5, 8, 11, 20. A classmate computes $Q_1$ by including the overall median in the lower half, while the textbook rule excludes it. Find $Q_1$ both ways, and state which one this course uses and why the two disagree.

Thought Process

With five values the median is the third value, 8. The textbook rule keeps only the values to the left of that position for the lower half. The classmate’s rule adds the median value 8 into the lower half. Compute $Q_1$ under each rule and compare.

Show Answer

The data are ordered: 2, 5, 8, 11, 20. The median is the third value, $M = 8$.

Textbook rule (this course): exclude the median. The lower half is the values to the left of position 3, namely 2 and 5. So

$$Q_1 = \frac{2 + 5}{2} = 3.5.$$

Classmate’s rule: include the median. The lower half would be 2, 5, 8, so

$$Q_1 = 5.$$

The two disagree because they treat the boundary value 8 differently. This course follows the textbook definition, which excludes the overall median from both halves whenever an odd count makes it an actual observation. The classmate’s method is a real convention used by some software, which is exactly why a course must fix one rule and apply it consistently. For this course, $Q_1 = 3.5$.

Level 5 Designing a Data Set to Order

Construct a set of eight whole-number test scores between 0 and 100 that has a median of 70 and an interquartile range of exactly 20. Show the quartiles for your set, and explain the two free choices you made.

Thought Process

With eight values, the median is the average of the fourth and fifth values, so those two must average 70. The lower half is the first four values and the upper half is the last four. $Q_1$ is the average of the second and third values, $Q_3$ is the average of the sixth and seventh values, and the IQR is $Q_3 - Q_1 = 20$. Pick values to hit a median of 70 first, then adjust the quartile positions to make the IQR land on 20.

Show Answer

One valid set, with many others possible:

$$50, \quad 55, \quad 65, \quad 68, \quad 72, \quad 78, \quad 85, \quad 90.$$

Median. The fourth and fifth values are 68 and 72, so

$$M = \frac{68 + 72}{2} = 70. \checkmark$$

First quartile. The lower half is 50, 55, 65, 68, so

$$Q_1 = \frac{55 + 65}{2} = 60.$$

Third quartile. The upper half is 72, 78, 85, 90, so

$$Q_3 = \frac{78 + 85}{2} = 81.5.$$

That gives $\text{IQR} = 81.5 - 60 = 21.5$, which misses the target. Adjusting the relevant values fixes it. Replace 85 with 83 and 65 with 67:

$$50, \quad 55, \quad 67, \quad 68, \quad 72, \quad 78, \quad 83, \quad 90.$$

Now $Q_1 = \dfrac{55 + 67}{2} = 61$ and $Q_3 = \dfrac{78 + 83}{2} = 80.5$, so $\text{IQR} = 80.5 - 61 = 19.5$. Still not exact. The cleanest way is to control the averaged pairs directly.

A clean construction. Choose the lower-half middle pair to average 60 and the upper-half middle pair to average 80, so the IQR is exactly $80 - 60 = 20$. One such set is

$$50, \quad 58, \quad 62, \quad 68, \quad 72, \quad 78, \quad 82, \quad 90.$$

Here $M = \dfrac{68 + 72}{2} = 70$, $Q_1 = \dfrac{58 + 62}{2} = 60$, and $Q_3 = \dfrac{78 + 82}{2} = 80$, giving $\text{IQR} = 80 - 60 = 20$. The two free choices are which numbers fill the lower-half and upper-half middle pairs. Any pairs averaging 60 and 80 respectively, with the rest of the values placed so the order is preserved, will satisfy the requirement.


Mental Model

The box that holds the middle half.

Picture the ordered data as a row of dots on a number line. The median is one cut that splits the row in two. Two more cuts, one in the center of each half, mark $Q_1$ and $Q_3$. Those two outer cuts fence off the middle half of the data. The interquartile range is the width of that fence, $Q_3 - Q_1$.

This is exactly the box drawn in a boxplot. A narrow box means the middle of the data is tightly packed. A wide box means it is loose. Because the fence ignores the values beyond $Q_1$ and $Q_3$, one or two extreme observations can sit far outside the box without changing its width at all. That is the resistance shown in Example 3, seen as a picture.


Mastery Checklist

Novice (Level 1-2):

Competent (Level 3-4):

Proficient (Level 5):


Connections

Looking back:

Looking ahead:

Real-world connections:


Resources

Resource Where it points
IPS 9th edition, Section 1.3 (Describing Distributions with Numbers) Moore, McCabe, Craig, IPS 9e, Chapter 1, Section 1.3. The primary source for the quartile and IQR definitions in this skill.
OpenStax Introductory Statistics 2e, 2.3 Measures of the Location of the Data openstax.org. Free open companion treatment of quartiles and percentiles.
OpenStax Introductory Statistics 2e, 2.4 Box Plots openstax.org. The boxplot that displays the five-number summary built from the quartiles.


Last updated: 2026-06-16