Stemplot
From Wikipedia, the free encyclopedia
In statistics, a stemplot (or stem-and-leaf plot) is a graphical display of quantitative data that is similar to a histogram and is useful in visualizing the shape of a distribution. The are generally associated with the Exploratory Data Analysis (EDA) ideas of John Tukey and the course Statistics in Society (NDST242) of the Open University, although in fact Arthur Bowley did something very similar in the early 1900's.
Unlike histograms, stemplots:
- retain the original data (at least the most important digits)
- put the data in order - thereby easing the move order-based inference and non-parametric statistics.
A basic stemplot contains two columns separated by a vertical line. The left column contains the stems and the right column contains the leaves. The ease with which histograms can now be generated on computers has meant that stemplots are less used today than in the 1980's, whe they first became widely used.
Contents |
[edit] Constructing a stemplot
To construct a stemplot, the observations must first be sorted in ascending order. Here is the sorted set of data values that will be used in the example:
54 56 57 59 63 64 66 68 68 72 72 75 76 81 84 88 106
Next, it must be determined what the stems will represent and what the leaves will represent. Typically, the leaf contains the last digit of the number and the stem contains all of the other digits. In the case of very large or very small numbers, the data values may be rounded to a particular place value (such as the hundreds place) that will be used for the leaves. The remaining digits to the left of the rounded place value are used as the stems.
In this example, the leaf represents the ones place and the stem will represent the rest of the number (tens place and higher).
The stemplot is drawn with two columns separated by a vertical line. The stems are listed to the left of the vertical line. It is important that each stem is listed only once and that no numbers are skipped, even if it means that some stems have no leaves. The leaves are listed in increasing order in a row to the right of each stem.
5 | 4 6 7 9 6 | 3 4 6 8 8 7 | 2 2 5 6 8 | 1 4 8 9 | 10 | 6
[edit] Double stemplots( stem and leaf plot)
Splitting stems and the back-to-back stemplot are two distinct types of double stemplots, which are a variation of the basic stemplot.
[edit] Splitting stems
On the data set, splitting each of the stems into two or five stems may better illustrate the shape of the distribution. When splitting stems, it is important to split all stems and to split the stems equally. When splitting each stem into two stems, one stem contains leaves from 0-4 and leaves from 5-9 are contained in the other stem. When splitting each stem into five stems, one stem contains leaves 0-1, the next 2-3, the next 4-5, the next 6-7, and the last leave 8-9. Here is an example of a split stemplot (using the same data set from the example above) in which each stem is split into two:
5 | 4 5 | 6 7 9 6 | 3 4 6 | 6 8 8 7 | 2 2 7 | 5 6 8 | 1 4 8 | 8 9 | 9 | 10 | 10 | 6
[edit] Back-to-back stemplot
Back-to-back stemplots are used to compare two distributions side-by-side. This type of double stemplot contains three columns, each separated by a vertical line. The center column contains the stems. The first and third columns each contain the leaves of a different distribution. The numbers for the leaves of the distribution in the leftmost column are aligned to the right and are listed in increasing order from right to left. Here is an example of a back-to-back stemplot comparing the distribution in the first example (Set B) to another distribution (Set A).
Set A Set B ------- ------- 6 5 3 | 4 | 8 7 6 5 | 5 | 4 6 7 9 7 3 2 | 6 | 3 4 6 8 8 4 2 | 7 | 2 2 5 6 6 | 8 | 1 4 8 | 9 | | 10 | 6