Lesson 18 · Quartiles

Quartiles

MathematicsSubject
8 minEstimated read

Cutting Data into Four Equal Parts

When data is arranged in ascending order, the value exactly in the middle is the median. The median splits the data into two equal halves: half of the values lie below it and half lie above it. Quartiles take this same idea one step further. Instead of cutting the ordered data into two halves, we cut it into four equal quarters.

Think of a straight line segment AB. To break it into four equal pieces you do not cut it in four places. You cut it in only three, at points we can call P, Q and R. If the whole of AB counts as 100%, then each of the pieces AP, PQ, QR and RB is 25%. Measured from A, the point P sits at 25% of the way, Q at 50% and R at 75%.

Three cuts P, Q and R divide AB into four equal parts: P is the first quartile, Q the median and R the third quartile.
Three cuts P, Q and R divide AB into four equal parts: P is the first quartile, Q the median and R the third quartile.

Ordered data behaves exactly like this segment. The value at the 25% mark is the first quartile, the value at the 50% mark is the median, and the value at the 75% mark is the third quartile. Together these three values split the whole data into four parts, each holding about one quarter of the values.

Definition

Quartiles: the three values that divide ordered data into 4 equal parts. They are written \(Q_1\), \(Q_2\) and \(Q_3\).

Definition

First quartile, or lower quartile, \(Q_1\): the value below which 25% (one quarter) of the data lies.

Definition

Second quartile \(Q_2\): the value that divides the data at 50%. It is the same thing as the median.

Definition

Third quartile, or upper quartile, \(Q_3\): the value below which 75% (three quarters) of the data lies.

Key idea

Three quartiles make four parts. \(Q_2\) is just the median under another name, so the work here is finding \(Q_1\) and \(Q_3\).

Finding the Position of Q1 and Q3

A quartile is found in two stages. First we find its position in the ordered data, and then we read the value that sits at that position. The position and the value are different things, and mixing them up is the most common mistake in this topic.

Writing 25% and 75% as fractions in their lowest terms:

\[ 25\% = \frac{25}{100} = \frac{1 \times 25}{4 \times 25} = \frac{1}{4} \]

\[ 75\% = \frac{75}{100} = \frac{3 \times 25}{4 \times 25} = \frac{3}{4} \]

So 25% is 1 part out of 4, and 75% is 3 parts out of 4. Just as for the median, we add 1 to the number of items N before multiplying by the fraction. This gives the two position rules:

  • Position of \(Q_1\) \(= \frac{1}{4}(N+1)\)th item
  • Position of \(Q_3\) \(= \frac{3}{4}(N+1)\)th item

Why add 1 to N? Look at data with 7 values. The first quartile falls at \(\frac{1}{4}(7+1) = 2\), the median at \(\frac{1}{2}(7+1) = 4\) and the third quartile at \(\frac{3}{4}(7+1) = 6\). The positions 2, 4 and 6 split the seven values evenly, with exactly one value before the 2nd, one between each pair of chosen positions, and one after the 6th.

Common mistake

Always arrange the data in ascending order before you count positions. Picking the 2nd or 6th value from the list in the order it was given gives a wrong answer.

Quartiles of a List of Numbers

Find the first quartile \(Q_1\) and the third quartile \(Q_3\) of the data 57, 59, 52, 54, 51, 53, 55.

Step 1: Arranging the data in ascending order:

\[ 51, 52, 53, 54, 55, 57, 59 \]

Step 2: Counting the items:

\[ N = 7 \]

Step 3: Finding the position of \(Q_1\) with the rule \(\frac{1}{4}(N+1)\):

\[ \frac{1}{4}(7+1) = \frac{1}{4} \times 8 = 2 \]

Step 4: Reading the 2nd item of the ordered data:

\[ Q_1 = 52 \]

Step 5: Finding the position of \(Q_3\) with the rule \(\frac{3}{4}(N+1)\):

\[ \frac{3}{4}(7+1) = \frac{3}{4} \times 8 = 6 \]

Step 6: Reading the 6th item of the ordered data:

\[ Q_3 = 57 \]

A quick check: one value (51) lies below 52 and one value (59) lies above 57. The median is 54, which sits between them. The three quartiles always come in the order \(Q_1 \le Q_2 \le Q_3\).

When the Position Is Not a Whole Number

When N + 1 does not divide exactly by 4, the position comes out as a decimal, such as the 1.75th or the 9.75th item. No such item exists. The 1.75th position lies between the 1st and the 2nd items, 0.75 of the way from the 1st towards the 2nd. So we take the difference between those two values and add 0.75 of it to the smaller one.

\[ Q = a + d\,(b - a) \]

  • \(a\) is the value of the item at the whole-number part of the position.
  • \(b\) is the value of the very next item.
  • \(d\) is the decimal part of the position (0.25, 0.5 or 0.75).

Example: find \(Q_1\) and \(Q_3\) of 12, 3, 19, 8, 14, 7.

Step 1: Arranging in ascending order, which gives \(N = 6\):

\[ 3, 7, 8, 12, 14, 19 \]

Step 2: Finding the position of \(Q_1\):

\[ \frac{1}{4}(6+1) = \frac{7}{4} = 1.75 \]

Step 3: Moving 0.75 of the way from the 1st item (3) to the 2nd item (7):

\[ Q_1 = 3 + 0.75\,(7 - 3) = 3 + 3 = 6 \]

Step 4: Finding the position of \(Q_3\):

\[ \frac{3}{4}(6+1) = \frac{21}{4} = 5.25 \]

Step 5: Moving 0.25 of the way from the 5th item (14) to the 6th item (19):

\[ Q_3 = 14 + 0.25\,(19 - 14) = 14 + 1.25 = 15.25 \]

Key idea

A quartile does not have to be one of the data values. Above, \(Q_1 = 6\) and \(Q_3 = 15.25\) are not in the list, and both are correct. If the two neighbouring items have the same value, the quartile is simply that value.

Quartiles from a Frequency Table

When data comes in a frequency table, writing out every value one by one is slow. Instead we build a cumulative frequency (cf) column. It shows how many items have been counted up to each value, so it tells us straight away which value sits at any position.

Definition

Cumulative frequency (cf): the running total of the frequencies up to and including a value. The last cumulative frequency equals the total number of items N.

The weights of a group of people are: 6 people at 20 kg, 8 at 22 kg, 9 at 24 kg, 7 at 27 kg, 5 at 28 kg, 5 at 30 kg and 3 at 31 kg.

Step 1: Building the cumulative frequency table by adding each frequency to the total so far:

Cumulative frequency table of the weights: the last cf, 43, is the total number N.
Cumulative frequency table of the weights: the last cf, 43, is the total number N.

Step 2: Finding the position of \(Q_1\) with \(N = 43\):

\[ \frac{1}{4}(43+1) = \frac{44}{4} = 11 \]

Step 3: Reading the cf column. The cf of 20 kg is 6, so items 1 to 6 are 20 kg. The cf of 22 kg is 14, so items 7 to 14 are 22 kg. The 11th item falls in this group:

\[ Q_1 = 22 \text{ kg} \]

Step 4: Finding the position of \(Q_3\):

\[ \frac{3}{4}(43+1) = \frac{132}{4} = 33 \]

Step 5: The cf of 27 kg is 30, which only reaches the 30th item. The cf of 28 kg is 35, so items 31 to 35 are 28 kg. The 33rd item falls here:

\[ Q_3 = 28 \text{ kg} \]

Key idea

Run down the cf column from the top. The quartile is the value beside the first cf that is equal to or greater than the position.

Common mistake

Getting a position of 11 does not make the quartile 11. The 11 is the place in the order; the quartile is the value found at that place, here 22 kg.

Worked Example: Marks of Students

Find the first quartile \(Q_1\) and the third quartile \(Q_3\) from the marks below.

Marks obtained and the number of students who obtained each mark
Marks obtained and the number of students who obtained each mark

Step 1: The marks are already in ascending order. Building the cumulative frequency table:

MarksNumber of studentsCumulative frequency (cf)
101212
203244
305094
4085179
5045224
6030254
705259
Total (N) = 259

Step 2: Finding the position of \(Q_1\):

\[ \frac{1}{4}(259+1) = \frac{260}{4} = 65 \]

Step 3: The first cf equal to or greater than 65 is 94, beside the mark 30. Every student from the 45th to the 94th scored 30:

\[ Q_1 = 30 \]

Step 4: Finding the position of \(Q_3\):

\[ \frac{3}{4}(259+1) = \frac{780}{4} = 195 \]

Step 5: The cf of 40 is 179, which does not reach the 195th item. The first cf greater than 195 is 224, beside the mark 50:

\[ Q_3 = 50 \]

This tells us that about a quarter of the students scored 30 or less, and about three quarters scored 50 or less.

Worked Example: A Decimal Position in a Table

Find \(Q_1\) and \(Q_3\) from the table below. Here the positions do not come out as whole numbers.

Marks from 12 to 18 and the number of students at each
Marks from 12 to 18 and the number of students at each

Step 1: Building the cumulative frequency table, which gives \(N = 38\):

Cumulative frequency: 12 fills items 1 to 6, 13 fills items 7 to 14, 16 fills items 27 to 29 and 17 fills items 30 to 34.
Cumulative frequency: 12 fills items 1 to 6, 13 fills items 7 to 14, 16 fills items 27 to 29 and 17 fills items 30 to 34.

Step 2: Finding the position of \(Q_1\):

\[ \frac{1}{4}(38+1) = \frac{39}{4} = 9.75 \]

Step 3: The 9th and 10th items both lie in the group of items 7 to 14, so both are 13. Putting these into the rule:

\[ Q_1 = 13 + 0.75\,(13 - 13) = 13 \]

Step 4: Finding the position of \(Q_3\):

\[ \frac{3}{4}(38+1) = \frac{117}{4} = 29.25 \]

Step 5: The cf of 16 is 29, so the 29th item is 16. The 30th item starts the next group, which is 17. Moving 0.25 of the way from the 29th item to the 30th:

\[ Q_3 = 16 + 0.25\,(17 - 16) \]

\[ = 16 + 0.25 = 16.25 \]

Careful at a group boundary

When a decimal position lands right on the edge of a group, the next item belongs to the next value. Treating the 29th and 30th items as equal and writing \(Q_3 = 16\) is wrong.

Quartiles at a Glance

QuartileOther nameShare of data below itPosition
\(Q_1\)lower quartile25%\(\frac{1}{4}(N+1)\)th item
\(Q_2\)median50%\(\frac{1}{2}(N+1)\)th item
\(Q_3\)upper quartile75%\(\frac{3}{4}(N+1)\)th item

Whatever form the data takes, the method is the same: put it in order, count N, work out the position, then read the value at that position. If the position is a decimal, go between the two neighbouring items. In a frequency table, the cumulative frequency column does the counting for you.

🔐

The full lesson is waiting for you

The notes are free to read in full. A free account opens the rest of the practice, and tracks your progress and confidence score for every subject. Presentations and videos need approval from Learn Yeti.