All subjects · Mathematics · WST01 (S1)
Stem-and-leaf diagrams
A stem-and-leaf diagram shows every data value while also showing the shape of the distribution. Back-to-back diagrams compare two data sets.
Reading a diagram
The stem holds the leading digit(s) and each leaf is the next digit. A key is essential: it tells you what 2 | 5 means. Leaves are written in order, so the diagram is already sorted. Turned on its side it looks like a bar chart, so you can see the shape.
| Stem | Leaves |
|---|---|
| 1 | 1 4 7 8 |
| 2 | 2 3 3 5 9 |
| 3 | 1 4 6 8 |
| 4 | 2 7 |
Key: 2 | 5 means 25 minutes
Median and quartiles (S1 convention)
For n ordered values:
- Median: the (n + 1)/2 th value.
- Quartiles: work out n/4 (for Q1) or 3n/4 (for Q3). If it is not a whole number, round up and take that value. If it is a whole number k, take the mean of the k th and (k + 1) th values.
For the 15 times above: median = 8th value = 25; n/4 = 3.75 so Q1 = 4th value = 18; 3n/4 = 11.25 so Q3 = 12th value = 36.
Back-to-back diagrams
Two data sets share the stems. The left set's leaves are written to the left of the stem, reading outwards from the stem, so the smallest leaf is nearest the stem. A key such as '5 | 3 | 2 means 35 for group A and 32 for group B' is given.
To compare, quote a measure of location (median) and a measure of spread (IQR or range), with values, in context.
| Group A | Stem | Group B |
|---|---|---|
| 8 4 | 2 | 1 5 9 |
| 7 5 3 1 | 3 | 0 2 6 6 8 |
| 9 6 2 | 4 | 3 7 |
Key: 5 | 3 | 2 means 35 for group A and 32 for group B
Worked example
Find the interquartile range of the 15 times in the first diagram.
- n = 15, so Q1: 15/4 = 3.75, round up, 4th value = 18.
- Q3: 3 × 15/4 = 11.25, round up, 12th value = 36.
- IQR = 36 - 18
Answer: IQR = 18 minutes
Check yourself
- In the diagram with key 2 | 5 = 25 minutes, the stem 3 has leaves 1 4 6 8. What is the largest value in that row?
Show answer
38 minutes. Stem 3, leaf 8 gives 38 minutes.
- Find the median of the 15 times shown.
Show answer
25 minutes. n = 15, so the median is the 8th value. Counting through the leaves: 11, 14, 17, 18, 22, 23, 23, 25. Median = 25.
- Find the upper quartile of the 15 times shown.
Show answer
36 minutes. 3n/4 = 11.25, not whole, so round up to the 12th value: 36.
- The 12 ordered values 40, 41, 43, 45, 48, 52, 55, 57, 58, 60, 63, 66 are shown in a stem-and-leaf diagram. Find the lower quartile.
Show answer
44. n/4 = 3, a whole number, so Q1 is the mean of the 3rd and 4th values: (43 + 45)/2 = 44.
- Find the range of the 15 times shown.
Show answer
36 minutes. Range = 47 - 11 = 36 minutes.
- In a back-to-back stem-and-leaf diagram the key is 5 | 3 | 2 means 35 for group A and 32 for group B. Group A's leaves on stem 4 are '9 6 2'. Which is the smallest group A value on that stem?
- 42
- 49
- 24
- 92
Show answer
42. Group A's leaves are read outwards from the stem, so 2 (nearest the stem) is smallest: 42.
- Which is an advantage of a stem-and-leaf diagram over a grouped frequency table?
- It always shows the mean directly
- It works best for very large data sets
- It keeps the original data values
- It does not need a key
Show answer
It keeps the original data values. Every raw value is still visible, so you can find exact medians and quartiles.
Sources
Last updated 7 November 2026. Spotted a mistake? Tell us.