



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Stem and Leaf Diagrams (Tukey, 1977) These are useful as an alternative to histograms or frequency tables. The idea is to substi- tute digits for frequency counts used in constructing histograms and in the process convey more information. Its profile is much like that of a histogram but it shows the numerical values of all observations. To construct a stem-and-leaf diagram we first write down, to the left of a vertical line, all possible leading digits in the range of the data. Then we represent each data value by writing its trailing digit in the appropriate row to the right of the line. These digits are usually written successively (and usually contiguously) in the increasing order of magnitude. The column of digits on the left of the vertical line represents the ‘stem’ and the digits on the right the ‘leaves’ of the stem-and-leaf plot. Each data value can thus be reconstructed by combining its stem part and its leaf part. In those cases where the data values may not be adequately represented by just taking the last digit as leaves the data values must be appropriately rounded before a stem-and-leaf diagram can be constructed. Example Below are the measured manganese content (in points or .01%’s) for 20 heats of 1045 steel taken from a text by Burr.
74 79 77 81 68 79 81 76 81 80 80 78 88 83 79 91 79 75 74 73
A stem and leaf diagram for these data is:
A useful way of making a quick comparison of two data sets measured on the same scale is to make two stem and leaf diagrams back to back.
Example Below are back to back stem and leaf plots for the edge widths (in .0001 in. over .1380 in.) of two sets of 30 piston rings. (Data again from Burr.) Notice that while both data distributions appear to be symmetrical, measures of location and dispersion for the two data sets are markedly different. The center (mean) of the distribution for data set #2 lies to the right of the center for data set #1. Data set #2 also appears to have a larger spread (or variation) than data set #1.
8 0 4444333322 1 134 99887776655555 1 55556777788888 2100 2 0223334 2 56677 3 0 Data Set #1 Data Set # The stem and leaf plot has several advantages over the histogram for representing data dis- tributions. Constructing a histogram involves selecting the number of classes (or bins) and class intervals (or bin sizes) and tallying observations into these classes whereas in the stem and leaf plot the grouping is automatic after the stem is constructed. However, this may also be viewed as a disadvantage in that some stem values may not appear in the plot for data that is not present. The stem and leaf plot also has the advantage of having actual observations present in the display. Thus any further summaries or statistics may be computed without going back to the data. Further the data are already arranged in the increasing order of magnitude, enabling sampling quantiles to be read-off easily. The PROC UNIVARIATE output (see Fig.2.22) from SAS Example B7 display a stem-and-leaf plot and a box plot of the population variable of the fuel consumption data set (see Table B.1 in appendix B). Some sets of observations have a very narrow range that the stem and leaf has only 2 or 3 stems. Such a plot is not useful for studying the distribution of the data. One solution is to attempt to increase the number of stems , by dividing the data into subgroups within each original stems i.e., to use each stem value twice or more. As an example, consider the following stem a leaf plot of height in inches of students in a statistics class taken from Koopmans (1981):
5 47 6 02333444555556666677777889 7 00112223
Obviously, this does not represent a satisfactory visual display of the distribution of the data. Suppose each stem is divided into two parts: one to represent the leaves from 0 through 4 and the other for the leaves from 5 through 9. Thus we have the following stem and leaf plot:
Example For n = 5, the ordered sample is x(1), x(2),... , x(5). Then the Quantile Function for the data set is:
i 1 2 3 4 5 pi .1 .3 .5 .7. Q(pi) x(1) x(2) x(3) x(4) x(5)
Thus for a data set of 5 observations the .5 quantile is the 3rd largest observation. The above function is also called the empirical cumulative distribution function (ecdf). The corresponding graph of Q(pi) against pi is called the quantile plot or the empirical cumulative probability plot. The quantile plot exhibits many important properties of the data distribution.
Example Consider the ozone concentrations for Stamford given in Table B.2 (see Appendix B). The ecdf for this data is computed in the following table:
Quantiles of Stamford Ozone Data i Q(pi) pi 1 14. 2 14. 3 23. 4 24. 5 24. 6 24. .. .
The output from SAS Example C4 (see Fig.3.13) displays the quantile plot of the ozone data for Stamford. It shows that the median ozone concentration is about 80 ppb, that the 75th percentile is roughly 120 ppb and that the IQR is about 70 ppb. Further, local slope gives a picture of the local density; flatter the slope greater the density of points. In the above quantile plot, the graph has the greatest slope between 75 and 100 ppb indicating that the ozone concentration was between these values on a large number of days.
Box Plots (Tukey, 1977) This is a summary display of a set of data based on the quantiles Q(.25), the lower quartile, Q(.5), the median, and Q(.75), the upper quartile. These quantities are then used to construct the diagram shown below:
Upper Quartile(.75 Quantile)
Median(.5 Quantile)
Lower Quartile(.25 Quantile)
Upper Adjacent Value
Outside Values
Lower Adjacent Value
Other than the Quartiles ,the following quantities need to be computed for constructing a box plot.
As discussed earlier, Q(p) for values of p = (i − .5)/n correspond to the ordered observations for i = 1, 2 ,... , n. Note that to compute Q(p) for values of p 6 = (i − .5)/n, straight line inter- polation among values in the quantile function is used. Thus, for a p such that pi < p < pi+ where pi = (i − .5)/n and pi+1 = (i + 1 − .5)/n, Q(p) is computed as the weighted average Q(p) = (1 − f )Q(pi) + f Q(pi+1) where f = (p − pi)/(pi+1 − pi) = n(p − pi).