StATS: What is a stem and leaf diagram? (October 11, 2002)

A stem and leaf diagram provides a visual summary of your data. This diagram provides a partial sorting of the data and allows you to detect the distributional pattern of the data.

There are three steps for drawing a tem and leaf diagram.

  1. Split the data into two pieces, stem and leaf.
  2. Arrange the stems from low to high.
  3. Attach each leaf to the appropriate stem.

It's easiest to understand these steps through an example. Let’s construct a stem and leaf diagram for the following data: PImax (cm H2O) for 25 patients with cystic fibrosis.

80, 85, 110, 95, 95, 100, 45, 95, 130, 75, 80, 70, 80, 100, 120, 110, 125, 75, 100, 40, 75, 110, 150, 75, 95

  1. Split the data into two pieces, stem and leaf. Here the leaf would be the single rightmost digit and the stem would be the leftmost one or two digits.
  2. Arrange the stems from low to high. Here the stems range from 4 to 15.
  3. Attach each leaf to the appropriate stem.
    80 -- Attach the 0 leaf to the 8 stem,
    85 -- Attach the 5 leaf to the 8 stem,
    110 -- Attach the 0 leaf to the 11 stem,...
    as so forth.

This is what you get when you are done.

04 50
05
06
07 50555
08 0500
09 5555
10 000
11 000
12 05
13 0
14
15 0

Notice that the stem and leaf diagram is also a sideways histogram.

The stem and leaf is also useful because it partially sorts the data. In this example, the third smallest PImax score is 75

Second example

Here is data set consisting of LDL (Low Density Lipoprotein) values (mmol/l) of 14 subjects on an oat bran diet:

3.84, 5.57, 5.85, 4.80, 3.68, 2.96, 4.41, 3.72, 3.49, 3.84, 5.26, 3.73, 1.84, 4.14

Let the first digit be the stem and the last two digits be the leaf. We could have made a different choic: letting the first two digits be the stem and the last digit be the leaf. Don't agonize over the choice, but it's good to have not too many and not too few stems.

When you arrange the leaves on the appropriate stems you get the following diagram.

1 84
2 96
3 84,68,72,49,84,73
4 80,41,14
5 57,85,26

Again, this is a partial sort of the data. The third smallest LDL value is 3.49.

Splitting stems

Sometimes you may have too few (or too many) stems to get a good picture of your data. When this happens, considering splitting the stems. Here is an example.

The stem and leaf diagram for the LDL data has only five stems. We can get a slightly different perspective by doubling the number of stems. We do this by splitting each stem in two. Put small leaves (00-49) on the first stem and large leaves (50-99) on the second stem. This is what you get.

1
1 84
2
2 96
3 49
3 84,68,72,84,73
4 41,14
4 80
5 26
5 57,85

Another option is to split the stems into five. Attach leaves 00-19 to the first stem, 20-39 to the second stem, 40-59 to the third stem, etc. Here is an example.

0
0
0 45,40
0 75,70,75,75,75
0 80,85,95,95,95,80,80,95
1 10,00,00,10,00,10
1 30,20,25
1 50
1
1

Splitting the stems into two or five pieces is optional. It just gives you extra choices for displaying your data.

A stem and leaf diagram in SPSS

To create a stem-and-leaf diagram in SPSS, select ANALYZE | DESCRIPTIVES | EXPLORE from the SPSS menu. Here is an example of the output.

Normal Oral Temperature Stem-and-Leaf Plot

Frequency Stem & Leaf

2.00 Extremes (=<96.4)
4.00 96 . 7789
13.00 97 . 0111222344444
21.00 97 . 556666777888888899999
38.00 98 . 00000000000111222222222233333444444444
33.00 98 . 555666666666677777777888888888899
15.00 99 . 000001112223344
2.00 99 . 59
1.00 100 . 0
1.00 Extremes (>=100.8)

Stem width: 1.0 Each leaf: 1 case(s)

Notice that SPSS tells you how many leaves are on each stem.

This page was written by Steve Simon while working at Children's Mercy Hospital. Although I do not hold the copyright for this material, I am reproducing it here as a service, as it is no longer available on the Children's Mercy Hospital website. Need more information? I have a page with general help resources. You can also browse for pages similar to this one at Category: Definitions, Category: Descriptive statistics.