Stem-and-leaf diagrams and line plots
After a class test, the teacher reads out 30 marks in a row. Can you tell at a glance what the highest mark was, what the middle one was, and where most students scored? A list is hard to read. Two simple diagrams, the stem-and-leaf diagram and the line plot, keep every value on view and show the shape of the data at the same time.
Ordered stem-and-leaf diagrams
A stem-and-leaf diagram splits each number into two parts. The stem is the leading digit or digits. The leaf is the last digit. For 27, the stem is 2 and the leaf is 7.
Unlike a bar chart, no information is lost: you can read every original value back from the diagram.
Three rules every diagram must follow:
-
Write the stems in a column, in order, with a vertical line beside them.
-
Write the leaves in increasing order along each row (this is what "ordered" means).
-
Always include a key, for example $2 \mid 7$ means $27$.
If the data have decimals, the leaf is the decimal digit. With the key $4 \mid 7$ meaning $4.7$ kg, the entry $4 \mid 7$ is the value $4.7$ and $5 \mid 3$ is $5.3$.
The marks of 12 students in a test were: 34, 45, 27, 38, 41, 29, 45, 52, 33, 38, 46, 30. a) Draw an ordered stem-and-leaf diagram with a key. b) State the highest and…
The marks of 12 students in a test were: 34, 45, 27, 38, 41, 29, 45, 52, 33, 38, 46, 30.
- a) Draw an ordered stem-and-leaf diagram with a key.
- b) State the highest and the lowest mark.
- c) Find the median.
The times in seconds taken by 15 students to run 100 m were: 14.2, 15.1, 13.8, 16.0, 14.9, 15.5, 13.5, 14.7, 15.8, 16.4, 14.1, 15.0, 13.9, 14.6, 15.3. a) Draw an ordered…
The times in seconds taken by 15 students to run 100 m were: 14.2, 15.1, 13.8, 16.0, 14.9, 15.5, 13.5, 14.7, 15.8, 16.4, 14.1, 15.0, 13.9, 14.6, 15.3.
- a) Draw an ordered stem-and-leaf diagram with a key.
- b) Find the median and the range.
- c) Find the number of students who took less than 15 seconds.
Reading a diagram: mode, median, range and mean
Because the leaves are in order, the diagram is already a sorted list. This makes the main measures easy to find.
The ordered diagram for the texts example is:
1 | 8 9
2 | 2 3 5 7 9
3 | 1 1 5
4 | 0
Key: $2 \mid 3$ means 23.
-
Mode: the value that appears most often. Here 31 appears twice, so the mode is 31.
-
Range: highest minus lowest, $40 - 18 = 22$.
-
Median: the middle value of the ordered list. With $n$ values, it is in position $\frac{n+1}{2}$. Here $n = 11$, so it is the 6th value. Count along the leaves: 18, 19, 22, 23, 25, 27. The median is 27.
-
Mean: add all the values and divide by how many there are. The sum is $300$, so the mean is $300 \div 11 \approx 27.3$.
If $n$ is even there are two middle values. The median is the number halfway between them. For 10 values, take the 5th and 6th and find their average.
Here is an ordered stem-and-leaf diagram, with key $2 \mid 3$ meaning $23$. a) How many values are there? b) Find the mode. c) Find the median.
Here is an ordered stem-and-leaf diagram, with key $2 \mid 3$ meaning $23$.
1 | 2 5 8
2 | 0 3 3 7
3 | 1 4
- a) How many values are there?
- b) Find the mode.
- c) Find the median.
A stem-and-leaf diagram has key $4 \mid 7$ meaning $4.7$ kg. a) Find the mean, median and mode. b) Explain how the diagram shows the shape of the data. c) The value…
A stem-and-leaf diagram has key $4 \mid 7$ meaning $4.7$ kg.
3 | 5 8 9
4 | 0 2 2 6 7
5 | 1 3 3 3 8
6 | 4
- a) Find the mean, median and mode.
- b) Explain how the diagram shows the shape of the data.
- c) The value $6.4$ is removed. Find the new mean and median, and say which is affected more.
Line plots
A line plot is used when the data are whole numbers that repeat a lot and do not spread over a wide range, such as goals in a match, children in a family or pets per household. Draw a number line, and for each value put a cross (×) above its position. Repeated values are stacked.
Fifteen students were asked how many pets live in their home. The results: 0 pets: 2 students; 1 pet: 5; 2 pets: 4; 3 pets: 3; 4 pets: 1.
The tallest stack is the mode: 1 pet. The range is $4 - 0 = 4$.
For the median, the 8th value of 15 is in the middle. Count up the stacks: the first two values are 0, the next five are 1 (that takes us to the 7th value), and the 8th is the first 2. The median is 2.
For the mean, multiply each value by its number of crosses and add:
$$\text{mean} = \frac{0 \times 2 + 1 \times 5 + 2 \times 4 + 3 \times 3 + 4 \times 1}{15} = \frac{26}{15} \approx 1.73$$The number of goals scored by a team in 10 matches was: 2, 0, 1, 3, 2, 2, 1, 0, 4, 2. a) Draw a line plot. b) State the mode. c) Find the range.
The number of goals scored by a team in 10 matches was: 2, 0, 1, 3, 2, 2, 1, 0, 4, 2.
- a) Draw a line plot.
- b) State the mode.
- c) Find the range.
A line plot shows the number of siblings of 20 students: 0 siblings: 3, 1 sibling: 7, 2 siblings: 5, 3 siblings: 3, 4 siblings: 2. a) Draw the line plot. b) Find the…
A line plot shows the number of siblings of 20 students: 0 siblings: 3, 1 sibling: 7, 2 siblings: 5, 3 siblings: 3, 4 siblings: 2.
- a) Draw the line plot.
- b) Find the mean number of siblings.
- c) Find the median and the mode.
Back-to-back stem-and-leaf diagrams
To compare two sets of data, draw a back-to-back diagram. The stems go down the middle. One data set has its leaves on the left of the stems, the other on the right. Both sets use the same stems, so you can compare them directly.
Two classes timed their journey to school, in minutes.
Class X: 5, 8, 12, 14, 17, 21, 25, 26, 32.
Class Y: 9, 11, 15, 18, 19, 22, 27, 28, 34.
Class X | | Class Y
8 5 | 0 | 9
7 4 2 | 1 | 1 5 8 9
6 5 1 | 2 | 2 7 8
2 | 3 | 4
Keys: $4 \mid 1$ on the left means 14 minutes (Class X). On the right, $1 \mid 5$ means 15 minutes (Class Y).
The right-hand side is read exactly as before, from the stem outwards. On the left, the leaves are also in increasing order outwards from the stem. So the smallest leaf is always the one closest to the stem. For example, the values 12, 14, 17 in the row for stem 1 are written as $7\ 4\ 2$: the 2 is next to the stem and the 7 is furthest out.
When you compare, always use a measure of average (median or mean) and a measure of spread (range), and say what they mean for the situation.
The ages of people at two sports clubs, A and B, are: Club A: 18, 22, 25, 31, 34, 35, 41, 47, 52, 58 Club B: 21, 24, 27, 28, 33, 36, 38, 39, 44, 45 a) Draw a…
The ages of people at two sports clubs, A and B, are:
Club A: 18, 22, 25, 31, 34, 35, 41, 47, 52, 58
Club B: 21, 24, 27, 28, 33, 36, 38, 39, 44, 45
- a) Draw a back-to-back stem-and-leaf diagram with a key.
- b) Find the median age of each club.
The scores of 14 students in Maths and in Irish are given. Maths: 52, 61, 67, 70, 73, 75, 78, 80, 82, 84, 85, 88, 91, 95 Irish: 45, 50, 54, 58, 62, 64, 66, 68, 71, 72,…
The scores of 14 students in Maths and in Irish are given.
Maths: 52, 61, 67, 70, 73, 75, 78, 80, 82, 84, 85, 88, 91, 95
Irish: 45, 50, 54, 58, 62, 64, 66, 68, 71, 72, 75, 79, 83, 87
- a) Draw a back-to-back stem-and-leaf diagram with a key.
- b) Find the median, range and mean of each subject.
- c) Compare the distributions and state which subject has the greater spread, justifying your answer.
Which display should I use?
Both displays show every value, but they suit different data.
| Display | Best for | Why |
|---|---|---|
| Line plot | Whole numbers with few different values and many repeats (goals, siblings, shoe sizes) | Each value has its own place on the line, so the stacks show frequency clearly. |
| Stem-and-leaf | Larger or decimal values that spread out with few repeats (times, masses, marks, heights) | The stems group the values into tens, so you do not need a huge number line. |
Think about the data set 112, 125, 131, 134, 140, 143, 147, 152, 158, 161. A line plot would need a number line from 112 to 161 with nearly every value appearing once, so you would see only single crosses. The stems 11, 12, 13, ..., 16 group the values neatly instead.
For a data set such as 2, 2, 3, 3, 3, 4, 4, 5, a stem-and-leaf diagram with a single stem 0 would just be a row of leaves, which is the same as a line plot turned on its side. The line plot is simpler.
Also remember that the diagram is a summary of a sample. To trust conclusions, the data should be unbiased and representative, for example not just the marks of the best students.
A teacher says that a line plot is better than a stem-and-leaf diagram for the data set 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7 but a stem-and-leaf is better for 112, 125,…
A teacher says that a line plot is better than a stem-and-leaf diagram for the data set 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7 but a stem-and-leaf is better for 112, 125, 131, 134, 140, 143, 147, 152, 158, 161.
- a) Draw a suitable display for each set.
- b) Give a reason for the teacher's choices.
- c) State the median of each data set.
Back to the start: a list of 30 marks is hard to read, but in an ordered stem-and-leaf diagram the highest and lowest marks, the middle one and the busiest row are all visible at a glance.
Summary
-
A stem-and-leaf diagram splits each value into stem and leaf. Order the leaves and always give a key.
-
Because the data are ordered, you can read the mode, range and median (position $\frac{n+1}{2}$) directly. For the mean, rebuild each value, add them and divide by $n$.
-
A line plot puts a cross above each value on a number line. The tallest stack is the mode. For the mean, weight each value by its number of crosses.
-
A back-to-back diagram (Higher Level only) compares two data sets with a shared stem. Compare an average and a spread, and give a conclusion in context.
-
Use a line plot for few repeated whole numbers, and a stem-and-leaf diagram for larger or decimal values.