2.3.77 steam-leaf
A quantitative data set is provided in the table. Construct a stem-and-leaf diagram for the data, using one line per stem.
Choose the correct stem-and-leaf diagram.
First, we need to import the data from Excel. (For simplicity, this imports mannual by hand, we can get the same result by importing dataset from Excel)
<- c(40, 59, 45, 41, 62, 25, 43, 57, 35, 31)
data data
## [1] 40 59 45 41 62 25 43 57 35 31
We can get stem-and-leaf diagram by using stem() command.
stem(data)
##
## The decimal point is 1 digit(s) to the right of the |
##
## 2 | 5
## 3 | 15
## 4 | 0135
## 5 | 79
## 6 | 2

It is important to know how to get stem-and-leaf diagram. In this case, we rewrite each data value by split them into smaller digits.
data
## [1] 40 59 45 41 62 25 43 57 35 31
40 -> 4|0
59 -> 5|9
45 -> 4|5
41 -> 4|1
62 -> 6|2
43 -> 4|3
…
Add them together and arrange the number in increasing order, we have the final stem-and-leaf diagram and
2|5
3|1 5
4|0 1 3 5
…
Hope that helps!