Читать книгу Statistics and Probability with Applications for Engineers and Scientists Using MINITAB, R and JMP - Bhisham C. Gupta, Irwin Guttman - Страница 62
MINITAB
Оглавление1 Enter the data in column C1.
2 From the Menu bar, select Graph Stem‐and‐leaf. This prompts the following dialog box to appear on the screen. In this dialog box,
3 Enter C1 in the box under Graph variables.
4 Enter the desired increment in the box next to Increment. For example, in Figures 2.4.13 and 2.4.14, we used increments of 10 and 5, respectively.
5 Click OK. The stem‐and‐leaf plot will appear in the Session window.
USING R
We can use the built in ‘stem()’ function in R to generate stem‐and‐leaf plots. The extra argument ‘scale’ can be used to define the length of the stem. The task can be completed by running the following R code in R Console window.
SpareParts = c(73,70,68,79,84,85,77,75,61,69,74,80,83,82,86,87,78,81, 68,71,74,73,69,68,87,85,86,87,89, 90,92,71,93,67,66,65,68,73,72,83, 76,74,89,86,91,92,65,64,62,67,63,69,73,69,71,76,77,84,83,85,81,87, 93,92,81,80,70,63,65,62,69,74,76,83,85,91,89,90,85,82) #To plot stem‐and‐leaf plot stem(SpareParts, scale = 1) #R output
The decimal point is 1 digit(s) to the right of the | | ||
6 | | | 122334 |
6 | | | 555677888899999 |
7 | | | 00111233334444 |
7 | | | 56667789 |
8 | | | 0011122333344 |
8 | | | 555556667777999 |
9 | | | 001122233 |