E9.2, E9.3 - Quartiles and interquartile range

E9.2, E9.3 - Quartiles and interquartile range

The range can be dominated by a single unusual observation. You will find quartiles and the interquartile range, then compare the middle and spread of data using summaries less sensitive to extreme values.

Quartiles in an ordered list

Can changing only the largest observation leave a useful measure of spread unchanged? First locate the middle of each half of an ordered list, rather than using its two extremes.

You already know that the median splits ordered observations into a lower and an upper half. Find the median of each half to locate the quartiles. Keep repeated values: each observation occupies a position even when its value is repeated.

Quartiles

The lower quartile, Q1Q_1, marks about a quarter of the way through ordered data. The upper quartile, Q3Q_3, marks about three quarters of the way through. For individual lists in this lesson, take the median of the lower half and of the upper half. When the list has an odd number of observations, exclude its overall median from both halves.

This states the convention being used: different small-sample quartile conventions exist. Follow a convention specified in a question. Ties also mean that exactly one quarter of the observations need not be strictly below Q1Q_1.

Worked example 1: an even number of observations

Question. Find the median and quartiles of

2, 4, 5, 7, 9, 11, 12, 142,\ 4,\ 5,\ 7,\ 9,\ 11,\ 12,\ 14

Plan. Split the eight ordered observations into two groups of four, then find their medians.

Median=7+92=8middle two of all eightQ1=4+52=4.5middle two of 2,4,5,7Q3=11+122=11.5middle two of 9,11,12,14\begin{aligned} \text{Median}&=\frac{7+9}{2}=8 && \text{middle two of all eight}\\ Q_1&=\frac{4+5}{2}=4.5 && \text{middle two of }2,4,5,7\\ Q_3&=\frac{11+12}{2}=11.5 && \text{middle two of }9,11,12,14 \end{aligned}

Answer. Q1=4.5Q_1=4.5, median 88, Q3=11.5Q_3=11.5.

Check. Pairing off the extremes of the lower half leaves four and five; doing the same in the upper half leaves eleven and twelve. Both quartiles lie on the correct side of the overall median.

Insert just one extra observation, eight. The overall median is now an actual observation, which we exclude before finding the two half-medians.

Worked example 2: an odd number of observations

Question. Find the median and quartiles of

2, 4, 5, 7, 8, 9, 11, 12, 142,\ 4,\ 5,\ 7,\ 8,\ 9,\ 11,\ 12,\ 14

Use the convention of excluding the overall median from the halves.

Plan. Locate the fifth observation, set it aside, then use the four observations on either side.

Median position=9+12=5four observations on either sideMedian=8fifth observationQ1=4+52=4.5lower half is unchangedQ3=11+122=11.5upper half is unchanged\begin{aligned} \text{Median position}&=\frac{9+1}{2}=5 && \text{four observations on either side}\\ \text{Median}&=8 && \text{fifth observation}\\ Q_1&=\frac{4+5}{2}=4.5 && \text{lower half is unchanged}\\ Q_3&=\frac{11+12}{2}=11.5 && \text{upper half is unchanged} \end{aligned}

Answer. Q1=4.5Q_1=4.5, median 88, Q3=11.5Q_3=11.5, as before.

Check. The two halves contain four observations each; adding back the excluded median gives 4+1+4=94+1+4=9. No observation has been duplicated.

[DIAGRAM: asset_name: Quartiles in even and odd lists; asset_slug: quartile_halves; caption: The same lower and upper halves surround the median in these two lists.; description: Two rows of ordered data show the eight values two four five seven nine eleven twelve fourteen and the nine values formed by inserting eight in the middle. Pale blue rectangles identify the lower four and pale green rectangles identify the upper four in each row. The central eight in the second row is separately outlined and labelled excluded from the halves. Labels give Q1 four point five, median eight and Q3 eleven point five.]
The same lower and upper halves surround the median in these two lists.

Both examples locate centres by position. Neither averages every observation: a middle value and an equal-share mean answer different questions.

Watch out

Quartile positions are counting instructions, not quartile values. Order the data and read the values at the required positions. For the stated odd-list convention, including the overall median in both halves changes the calculation.

Apply the same convention to a new list.

Interquartile range

The distance from Q1Q_1 to Q3Q_3 describes the spread of the middle part of the data. It leaves out the most extreme ends, which can make it a more stable description than the full range.

Interquartile range

interquartile range=Q3−Q1\text{interquartile range}=Q_3-Q_1

The interquartile range, or IQR, has the same unit as the observations. It describes the width of the middle approximately 50%50\% of the ordered data. This formula is not given in the List of formulas: learn it.

An IQR cannot be negative because Q3≥Q1Q_3\ge Q_1. It can be zero when the two quartiles coincide, including some data sets that contain different extreme values.

Worked example 3: comparing the two measures of spread

Question. The eight measurements 2,4,5,7,9,11,12,142,4,5,7,9,11,12,14 centimetres have quartiles 4.54.5 and 11.511.5 centimetres. Find their IQR and range.

Plan. Use quartiles for the IQR and extreme observations for the full range.

IQR=11.5−4.5=7 cmmiddle-half widthRange=14−2=12 cmfull extreme-to-extreme width\begin{aligned} \text{IQR}&=11.5-4.5=7\,\mathrm{cm} && \text{middle-half width}\\ \text{Range}&=14-2=12\,\mathrm{cm} && \text{full extreme-to-extreme width} \end{aligned}

Answer. IQR 7 cm7\,\mathrm{cm}; range 12 cm12\,\mathrm{cm}.

Check. The interval from 4.54.5 to 11.511.5 lies inside the interval from 22 to 1414. Its width must therefore be no larger than the full range, as 7<127<12 confirms.

Change only the largest measurement from fourteen to forty-four. Its magnitude changes, but it remains the largest observation.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account