LightMySky
به انگلیسی

Quartiles and the Interquartile Range

Find the median, the quartiles and the interquartile range of a data set, and use the interquartile range to compare how spread out two sets are.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Find medians and quartiles or recover list size using a stated convention; count observations strictly below a supplied quartile, distinguishing rank locations from exact value counts with ties
  • Calculate and interpret the interquartile range, and calculate and compare full ranges even when the quartiles match
  • Explain when changing an extreme observation leaves the interquartile range unchanged, and why adding an observation requires checking again

1 · Read

You used positions to locate a median in grouped data. Here the race times are exact: 21, 23, 24, 26, 27, 29, 30, 32, 35, 41 and 58 minutes. Order values from smallest to largest before finding a median or quartile. With eleven values, the median is at position (11 + 1) / 2 = 6: 29 minutes. For an even count, average the two middle values.

202224262932353840
The marks show the quartiles and median, not every runner: lower quartile 24, median 29 and upper quartile 35 minutes.

Quartile conventions differ. Here, split an ordered list into lower and upper halves. Exclude the central observation when the count n is odd. Each half's median is its quartile. For odd n, their positions are (n + 1) / 4 and 3(n + 1) / 4. Average adjacent values for a halfway position. Eleven runners give positions 3 and 9: 24 and 35 minutes. Subtract lower from upper to find the interquartile range.

Quartiles mark roughly the 25% and 75% ranks. Finite lists and repeated values need not give equal counts in the intervals; count entries for an exact answer. The median need not be halfway between quartile values. IQR cannot exceed range because quartiles lie within the extremes. If the quartiles are equal, every ordered value between their positions equals that value.

Q1: near 25% rankmedian: near 50% rankQ3: near 75% rank
Q1 means lower quartile and Q3 means upper quartile. Rank locations do not promise exact counts in value intervals.
Try it together

The interquartile range, or IQR, is upper quartile minus lower quartile: 35 - 24 = 11 minutes. The range uses the extremes: 58 - 21 = 37 minutes. To recover the upper quartile, add the IQR to the lower quartile. With equal medians, an IQR of 5 rather than 20 minutes describes a narrower middle spread.

242526272829303132333435IQR 11

The quartile gap measures the middle spread.

Suppose only the last race time increases from 58 to 90 minutes. Positions 3 and 9 still hold 24 and 35, so the IQR stays 11. The range becomes 90 - 21 = 69. This shows resistance to an extreme value, not immunity to every change. Changing a value used for a quartile can change the IQR. Adding a new observation also changes the count, so find the quartiles again.

Adding the same amount to every observation shifts the median and both quartiles by that amount. Their difference stays unchanged, so equal IQRs need not mean equal medians. Sets can also share a median and quartiles while having different extremes. To compare their ranges, calculate each maximum minus minimum, then subtract the two ranges.

append a new valuen increases by 1find quartiles again
Appending a value differs from increasing an existing last value.

For an even list, keep every observation and split it into two equal halves. Find each half's median, averaging its middle pair when needed. You can recover a missing value: if a quartile is (a + b) / 2, then b = 2 × quartile - a. If the lower quartile is missing, use lower quartile = upper quartile - IQR first. Check that any recovered value preserves the list's order.

You can reverse a quartile-position calculation. For an odd-sized list, a lower-quartile position p satisfies p = (n + 1) / 4. Multiply by 4 and subtract 1 to get n = 4p - 1. Check that the resulting count is odd before using this rule.

To find quartiles for combined groups, collect every observation from both groups, keeping repeated values. Sort the combined list, then apply the stated quartile convention to its new count. Do not average the groups' IQRs to obtain the combined IQR. Each group's quartiles describe positions within that group; combining groups changes which observations occupy the quartile positions.

combine all observationssort the combined listfind its quartiles

Order the data and use the stated quartile convention. IQR = upper quartile - lower quartile. It measures the middle spread and is usually less sensitive to extreme values than the range.

The lesson, exercises and flashcards were written for this learning dataset.

The practice questions, readings and flashcards were written for this learning dataset. The linked videos are by Khan Academy.

More to read

Quartile ranks and repeated values

A quartile is found through positions in ordered data. This lesson uses the median of each half, excluding the central observation when the full count is odd. For an even count, split the list into equally sized halves.

A quartile value can appear several times. Equal observations may occupy positions on both sides of a cut. A rank near 25% therefore does not promise that exactly 25% of observations are strictly smaller than the quartile value. For an exact count, inspect the list and distinguish less than from equal to.

Replacing an observation or adding one

Increasing an existing maximum keeps the number of observations unchanged. If neither quartile uses that last value, the quartiles and their difference stay unchanged. The range increases because it uses the maximum directly.

A different replacement can change a quartile value and therefore change the IQR. Adding an observation is another case: the list size changes, so its halves must be found again. The IQR is usually less sensitive to extreme observations than the range, but it is not immune to every change.

Location and spread describe different features

The median describes a middle location. The IQR describes the width between two quartile values. Adding the same amount to every observation shifts the median and both quartiles by that amount. The additions cancel in the quartile subtraction, leaving the IQR unchanged.

Two lists can also share their median and quartiles while having different extremes. Calculate their ranges separately before comparing their full spreads. Matching middle summaries do not establish that the entire lists match.

Explore more

2 · Watch

به انگلیسی

3 · Play

به انگلیسی
step 1 of 6

You used ordered positions to locate a median. The eleven race times are 21, 23, 24, 26, 27, 29, 30, 32, 35, 41 and 58 minutes. Sam calculates the range.

Which two observations determine the range?

minimum: 21maximum: 5858 - 21 = 37

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Where this leads

Jobs that lean on this skill. Follow one to see everything it is built on.

Then practise

30 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Quartiles and the Interquartile Range · Mathematics, ages 15 to 16 · LightMySky