




















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!





















3.1 Numerical summary values for quantitative data
For many purposes a few well–chosen numerical summary values (statistics) will suffice as a description of the distribution of a quantitative variable. A statistic is a numerical characteristic of a sample. More formally, a statistic is a numerical quantity computed from the values of a variable, or variables, corresponding to the units in a sample. Thus a statistic serves to quantify some interesting aspect of the distribution of a variable in a sample. Summary statistics are particularly useful for comparing and contrasting the distribution of a variable for two different samples. If we plan to use a small number of summary statistics to characterize a distribution or to compare two distributions, then we first need to decide which aspects of the distribution are of primary interest. If the distributions of interest are essentially mound shaped with a single peak (unimodal), then there are three aspects of the distribution which are often of primary interest. The first aspect of the distribution is its location on the number line. Generally, when speaking of the location of a distribution we are referring to the location of the “center” of the distribution. The location of the center of a symmetric, mound shaped distribution is clearly the point of symmetry. There is some ambiguity in specifying the location of the center of an asymmetric, mound shaped distribution and we shall see that there are at least two standard ways to quantify location in this context. The second aspect of the distribution is the amount of variability or dispersion in the distribution. Roughly speaking, we would say that a distribution exhibits low variability if the observed values tend to be close together on the number line and exhibits high variability if the observed values tend to be more spread out in some sense. The third aspect is the shape of the distribution and in particular the degree of skewness in the distribution. As a starting point consider the minimum (smallest observed value) and maximum (largest observed value) as statistics. We know that all of the data values lie between the minimum and the maximum, therefore, the minimum and the maximum provide a crude quantification of location and variability. In particular, we know that all of the values of the variable are restricted to the interval from the minimum to the maximum; however, the minimum and the maximum alone tell us nothing about how the data values are distributed within this interval. If the distribution is reasonably symmetric and mound shaped, then the midrange, defined as the average of the minimum and the maximum, may provide a suitable quantification of the location of the center of the distribution. The median and mean, which are defined below, are generally better measures of the center of a distribution.
The range, defined as the distance from the minimum to the maximum can be used to quantify the amount of variability in the distribution. Note that the range is the positive number obtained by subtracting the minimum from the maximum. When comparing two distributions the distribution with the larger range will generally have more variability than the distribution with the smaller range; however, the range is very sensitive to extreme observations so that one or a few unusually large or small values can lead to a very large range. We will now consider an approach to the quantification of the shape, location, and variability of a distribution based on the division of the histogram of the distribution into sections of equal area. This is equivalent to dividing the data into groups, each containing the same number of values. We will first use a division of the histogram into halves. We will then use a division of the histogram into fourths. The median is used to quantify the location of the center of the distribution. In terms of area, the median is the number (point on the number line) with the property that the area in the histogram to the left of the median is equal to the area to the right of the median. Here and in the sequel we will use a lower case n to denote the sample size, i.e., n will denote the number of units in the sample. In terms of the n observations, the median is the number with the property that at least n/2 of the observed values are less than or equal to the median and at least n/2 of the observed values are greater than or equal to the median. A simple procedure for finding the median, which is easily generalized to fractions other that 1/2, is outlined below.
We can use the distance between the minimum and the median and the distance between the median and the maximum to quantify the amount of skewness in the distri- bution. The distance between the minimum and the median is the range of the lower (left) half of the distribution, and the distance between the median and the maximum is the range of the upper (right) half of the distribution. If the distribution is symmetric, then
The method for finding the median given above is readily modified for finding the first and third quartiles. For Q 1 , we simply replace n/2 by n/4 and replace the words ‘the median’ by Q 1. To find Q 3 , use exactly the same method but count down from the largest value instead of counting up from the smallest value. Some calculators and computer programs use variations of the methods given above for finding Q 1 and Q 3. These variations may give slightly different values for Q 1 and Q 3. Example. Weed seeds (revisited). Since 98/4 = 24.5, the quartiles Q 1 and Q 3 for this example are the observations located at position 25 counting up for Q 1 and counting down for Q 3. Referring to Table 6 of Chapter 2 we find that Q 1 = 0 and Q 3 = 2. Notice that the range of the lower three–fourths of this distribution, Q 3 – minimum, is 2 while the range of the upper fourth, maximum – Q 3 is 5. This indicates that 75% (a large proportion) of the batches of grass have relatively few weed seeds, and the skewness in this distribution is due to the high amount of variability among the numbers of weed seeds in the 25% of the batches with between 2 and 7 weed seeds. Previously we introduced the range as a measure of variability. An alternative measure of variability is provided by the interquartile range. The interquartile range (IQR) is the distance between the first quartile Q 1 and the third quartile Q 3 , i.e., the interquartile range is the positive number obtained by subtracting Q 1 from Q 3. Notice that the interquartile range is the range of the middle half of the distribution. The interquartile range is less sensitive to the presence of a few extreme observations in the data than is the range. For example, if there are one or two unusually large or unusually small values, then these values may have the effect of making the range much larger than it would be if these unusual values were not present. In such a situation, we might argue that the range is too large to be deemed an appropriate overall measure of the variability of the distribution. The interquartile range is not affected by a few unusual values, since it only depends on the middle half of the data. We could use the range of a larger part of the middle of the distribution, say the middle 75% or 90%, as a compromise between the range and the interquartile range. The five summary statistics: the minimum (min), the first quartile (Q 1 ), the median (med), the third quartile (Q 3 ), and the maximum (max), constitute the five number summary of the distribution. Each of these five statistics provides a quantification of a particular aspect of the distribution. They quantify where the distribution begins, where the first quarter of the distribution ends, and so on. Furthermore, the distances between these five statistics can be used to quantify the shape (skewness) of the distribution. The four distances: (Q 1 – min), (med – Q 1 ), (Q 3 – med), and (max – Q 3 ), are the ranges of the first, second, third, and fourth quarters of the distribution, respectively. These distances can be used to quantify the amount of variability in the corresponding parts of the distribution. Comparisons of appropriate pairs of these distances provide
indications of certain aspects of the shape of the distribution. The relationship between (med – Q 1 ) and (Q 3 – med) can be used to quantify the shape (skewness) of the middle half of the distribution. Since (Q 1 – min) and (max – Q 3 ) are the lengths of the tails (lower and upper fourths) of the distribution, the relationship between these numbers can be used to quantify skewness in the tails of the distribution. Example. Cholesterol levels in Guatemalans. This example is taken from Devore and Peck, Statistics, 3 ed., (1997), Duxbury, p. 23. The original source is “The Blood Viscosity of Various Socioeconomic Groups in Guatemala” in The American Journal of Clinical Nutrition, Nov., 1964, 303–307. The Institute of Nutrition of Central America and Panama measured the serum total cholesterol levels for a group of 49 adult, low– income rural Guatemalans and for a group of 45 adult, high–income urban Guatemalans. The serum total cholesterol levels (in mg/dL) are provided in Table 1 and stem and leaf histograms are given in Figure 1.
Table 1. Guatemalan cholesterol data. Rural group cholesterol levels (in mg/dL). 95 108 108 114 115 124 129 129 131 131 135 136 136 139 140 142 142 143 143 144 144 145 146 148 152 152 155 157 158 158 162 165 166 171 172 173 174 175 180 181 189 192 194 197 204 220 223 226 231 Urban group cholesterol levels (in mg/dL). 133 134 155 170 175 179 181 184 188 189 190 196 197 199 200 200 201 201 204 205 205 205 206 214 217 222 222 227 227 228 234 234 236 239 241 242 244 249 252 273 279 284 284 284 330
Before we compute any summary statistics consider the stem and leaf histograms in Figure 1. Based on these histograms we can see that both of these cholesterol level distributions are basically mound shaped with some skewness to the right. In the rural group there are four individuals with somewhat high cholesterol levels (220 or more); there is a gap of 16 separating the cholesterol levels of these individuals from the rest of the rural group. It is this group of four observations which causes the rural distribution to appear skewed to the right. The urban group has similar slightly unusual groups of cholesterol levels; one group having somewhat low levels and one having somewhat high levels. There is one unusually large value (330) in the urban group that we might consider an outlier, since there is a gap of 46 between 330 and the next largest value. (An outlier is an observation that is widely separated from the majority of a distribution.) We will need to
and the entire urban group, are outlined below. For the rural group there are n = 49 observations so that (1) 49/2 = 24.5, thus the median 152 is obs. no. 25, corresponding to the first 2 leaf in the 15 stem. (2) 49/4 = 12.25, thus the first and third quartiles are Q 1 = 136, the 13th^ observation counting up, corresponding to the second 6 leaf in the 13 stem, and Q 3 = 174, the 13 th^ observation counting down, corresponding to the second 4 leaf in the 17 stem. For the urban group there are n = 45 observations so that (1) 45/2 = 22.5, thus the median 206 is obs. no. 23, corresponding to the 6 leaf in the 20 stem. (2) 45/4 = 11.25, thus the first and third quartiles are Q 1 = 196, the 12th^ observation counting up, corresponding to the 6 leaf in the 19 stem, and Q 3 = 239, the 12th observation counting down, corresponding to the 9 leaf in the 23 stem.
Table 2. Five number summaries with distances. Rural group. (mg/dL) n= min: (^95) Q Q 1 : 136 1 −^ min:^41 med - min: 57 med: 152 med -^ Q^1 :^16 Q 3 − med: 22 Q 3 : (^174) max - Q max - med: 79 max: 231 3 :^57 Urban group (all). (mg/dL) n= min: 133 Q Q^1 −^ min:^63 1 :^196 med - Q 1 : 10 med - min:^73 med: (^206) Q Q 3 : 239 3 −^ med:^33 max - med: 124 max: 330 max -^ Q^3 :^91 Urban group (omit 330). (mg/dL) n= min: (^133) Q Q 1 : 193 1 −^ min:^60 med - min: 72. med: 205.5 med -^ Q^1 :^ 12. Q Q^3 −^ med:^32 3 :^ 237.5^ max - Q 3 : 46.5 max - med:^ 78. max: 284
Before we continue with our discussion of this example we will introduce a simple graphical display corresponding to the information in Table 2. We can use the five number summary values to form a simple graphical representation of a distribution known as a
box plot or a box and whiskers plot. A box plot does not convey as much information as a stem and leaf histogram but it does give a useful graphical impression of the shape of the distribution as well as its location and variability. Simple box plots for the Guatemalan cholesterol example are provided in Figure 2. Figure 2. Box plots for cholesterol level. Rural
Urban (all)
Urban (omit 330)
Notice that each box plot has five vertical marks indicating the locations of the five number summary values. The box which extends from the first quartile to the third quar- tile and is divided into two parts by the median gives an impression of the distribution of the values in the middle half of the distribution. In particular, a glance at this box indicates whether the middle half of the distribution is skewed or symmetric and indi- cates the magnitude of the interquartile range (the length of the box). The line segments (whiskers) which extend from the ends of the box to the extreme values (the minimum and the maximum) give an impression of the distribution of the values in the tails of the distribution. The relative lengths of the whiskers indicate the contribution of the tails of the distribution to the symmetry or skewness of the distribution. Returning to the cholesterol example first consider the shapes of the cholesterol dis- tributions. We can use the distances, based on the five number summary, given in Table 2 to quantify the degree of skewness in these distributions. Comparing the distances for the rural group we find that max – med = 79 > 57 = med – min, Q 3 – med = 22 > 16 = med – Q 1 , and Max – Q 3 = 57 > 41 = Q 1 – min. All of these comparisons support our contention that the cholesterol distribution for the rural group is skewed right. For the urban group, including the outlier, we have max – med = 124 > 73 = med – min, Q 3
free to choose a letter with mnemonic value instead of the generic letter X; however, you should not use S or Z as these letters are reserved for special uses. If X denotes the variable of interest, then we will use X to denote the mean of the distribution of X. If we used a different letter, say Y , to denote the variable, then we would use Y to denote the corresponding mean. We will use function notation to denote the other statistics we defined above. That is, if X denotes the variable, then min(X), Q 1 (X), med(X), Q 3 (X), max(X), range(X), and IQR(X) denote the minimum, the first quartile, the median, the third quartile, the maximum, the range, and the interquartile range, respectively. You should read these symbols as follows: read min(X) as the minimum of X, Q 1 (X) as the first quartile of X, and so on. Recall that the median is the number (point on the number line) with the property that the area in the histogram to the left of the median is equal to the area to the right of the median. The mean is the number (point on the number line) where the histogram would balance. To understand what we mean by the balance point, imagine the histogram as being cut out of a piece of cardboard. The mean is located at the point along the number line side of this cutout where the histogram cutout would balance. These geo- metric characterizations of the mean and the median imply that when the distribution is symmetric the mean will be equal to the median. Furthermore, if the distribution is skewed to the right, then the mean (the balance point) will be larger than the median (to the right of the median). Similarly, if the distribution is skewed to the left, then the mean (the balance point) will be smaller than the median (to the left of the median). The primary use of the mean, like the median, is to quantify the location of the center of a distribution and to compare the locations (centers) of two distributions. Since both the mean and the median can be used to quantify the location of the center of a distribution, it seems reasonable to ask which is more appropriate. If the distribution is approximately symmetric, then the mean and the median will be approximately equal. On the other hand, if the distribution is not symmetric, then the median is likely to provide a better indication of the center of the distribution. For example, if the distribution is strongly skewed to the right, then the mean may be much larger than the median and the mean may not be a good indication of the center of the distribution. For a specific problem it is a good idea to mark the locations of the mean and the median on a histogram of the distribution and consider which seems more reasonable as an indicator of the center of the distribution. If the mean X is deemed suitable as a measure of the center of the distribution of X, then the deviations (X − X) of the observed values of X from their mean X contain information about the amount of variability in the distribution. If there is little variability (the observed values of X are close together and they are close to the mean X), then the deviations (X − X) will tend to be small in magnitude (absolute value). On the other
hand, if there is a lot of variability (at least some of the observed values of X are far apart and they are not all close to the mean X), then the deviations (X −X) will tend to be large in magnitude. It is this observation which suggests that a summary statistic based on the distances between each of the observed values of the variable and their mean can be used to measure the variability in the distribution. The standard deviation is one such statistic. The standard deviation is the square root of the “average” of the squared deviations of the observed values of the variable from their mean. A formula for the standard deviation is given below; however, you should not use this formula to compute the standard deviation. Instead you should use a calculator or a computer to compute the standard deviation. In symbols, the standard deviation of the distribution of the variable X, denoted by SX (read this as S sub X), is
SX =
n − 1
In this formula the capital Greek letter sigma, Σ, represents the statement “the sum of ”, and (X −X)^2 denotes the square of the distance from the observed value X to the mean X. Therefore, the expression under the square root sign in the formula is the “average” of the squared deviations of the observed values of the variable from their mean as mentioned above. The reason for the square root is so that the standard deviation of X and the variable X are in the same units of measurement. The standard deviation is positive, unless there is no variability at all in the data. That is, unless all of the observations are exactly the same, the standard deviation is a positive number. The standard deviation is a very widely used measure of variability. Unfortunately, the standard deviation does not have a simple, direct interpretation. The important thing to remember is that larger values of the standard deviation indicate that there is more variability in the data. A closely related measure of variability is the variance which is simply the square of the standard deviation, i.e., the variance of the distribution of X is S^2 X =
(X − X)^2 /(n − 1). There are quotation marks around the word average in the definition of the standard deviation because we divided by n − 1 even though there are n squared deviations in the average. The reason for this is that, in a sense, there are only n − 1 individual pieces of information contained in the collection of n deviations from the mean. It is readily verified that the sum of the deviations from the mean (not the sum of their squares) is equal to zero, i.e., Σ(X − X) = 0. This is the algebraic version of the fact that the mean is the balance point of the distribution. Because of this fact, if we know the values of any n − 1 of the deviations, then we can determine the value of the remaining deviation. This is the sense in which there are only n − 1 individual pieces of information contained in the collection of n deviations from the mean; and is the reason that we divide by n − 1.
Table 4. Model year 2000 subcompact car EPA mileage values.
city denotes city mileage in miles per gallon hiwy denotes highway mileage in miles per gallon trans denotes transmission type (automatic or manual) and number of gears displ denotes engine displacement in liters cyl denotes number of cylinders drv denotes front, rear, or all wheel drive
manufacturer model city hiwy trans displ cyl drv Acura Integra 25 31 (M5) 1.8 4 F Acura Integra(DOHC/VTEC) 25 30 (M5) 1.8 4 F Bentley Azure 11 16 (A4) 6.8 8 R Bentley Continental SC 11 16 (A4) 6.8 8 R Bentley Continental T 11 16 (A4) 6.8 8 R BMW 323CI 20 29 (M5) 2.5 6 R BMW 328CI 21 29 (M5) 2.8 6 R Chevrolet Camaro 19 30 (M5) 3.8 6 R Chevrolet Camaro 18 27 (M6) 5.7 8 R Chevrolet Cavalier 24 34 (M5) 2.2 4 F Chevrolet Cavalier 23 33 (M5) 2.4 4 F Chevrolet Metro 39 46 (M5) 1 3 F Chevrolet Metro 36 42 (M5) 1.3 4 F Ferrari Ferrari 456 MGT/MGTA 10 16 (M6) 5.5 12 R Ford Escort ZX2 25 33 (M5) 2 4 F Ford Mustang 20 29 (M5) 3.8 6 R Ford Mustang 17 25 (M5) 4.6 8 R Ford Mustang(4 Valve) 17 24 (M5) 4.6 8 R Honda Civic 32 37 (M5) 1.6 4 F Honda Civic(VTEC) 30 35 (M5) 1.6 4 F Honda Civic(DOHC/VTEC) 26 31 (M5) 1.6 4 F Honda Prelude 22 27 (M5) 2.2 4 F Hyundai Tiburon 23 32 (M5) 2 4 F Jaguar XK8 18 25 (A5) 4 8 R Jaguar XKR 16 23 (A5) 4 8 R Lexus SC 300/SC 400 19 23 (A4) 3 6 R Lexus SC 300/SC 400 18 25 (A5) 4 8 R Mercedes–Benz CLK320 21 29 (A5) 3.2 6 R Mercedes–Benz CLK430 18 25 (A5) 4.3 8 R Mitsubishi Eclipse 23 31 (M5) 2.4 4 F Mitsubishi Eclipse 20 28 (M5) 3 6 F Mitsubishi Mirage 33 40 (M5) 1.5 4 F Mitsubishi Mirage 28 36 (M5) 1.8 4 F
This table is continued on the next page.
Table 4. Model year 2000 subcompact car EPA mileage values (continued from the preceding page). manufacturer model city hiwy trans displ cyl drv Pontiac Firebird/TransAm 19 30 (M5) 3.8 6 R Pontiac Firebird/TransAm 18 27 (M6) 5.7 8 R Pontiac Sunfire 24 34 (M5) 2.2 4 F Pontiac Sunfire 23 33 (M5) 2.4 4 F Rolls–Royce Corniche 11 16 (A4) 6.8 8 R Saab Saab 9-3 Conv. 22 29 (M5) 2 4 F Saab Saab 9-3 Viggen Conv. 20 29 (M5) 2.3 4 F Saturn SC 28 40 (M5) 1.9 4 F Saturn SC(DOHC) 27 38 (M5) 1.9 4 F Subaru Impreza AWD 23 29 (M5) 2.2 4 A Subaru Impreza AWD 21 28 (M5) 2.5 4 A Suzuki Esteem 30 37 (M5) 1.6 4 F Suzuki Esteem 28 35 (M5) 1.8 4 F Suzuki Swift 36 42 (M5) 1.3 4 F Toyota Solara Conv. 23 30 (A4) 2.2 4 F Toyota Solara Conv. 19 26 (A4) 3 6 F Toyota Celica 28 34 (M5) 1.8 4 F Toyota Celica 23 32 (M6) 1.8 4 F Volkswagen Cabrio 24 31 (M5) 2 4 F Volkswagen New Beetle 25 31 (M5) 1.8 4 F Volkswagen New Beetle 24 31 (M5) 2 4 F Volvo C70 Conv. 20 26 (M5) 2.3 5 F Volvo C70 Conv. 19 26 (A4) 2.4 5 F
The stem and leaf histograms of Figure 3 summarize the distributions of the EPA city and highway gas mileage values for the n = 56 model year 2000 subcompact car models. Notice that each of these distributions includes five unusually low mileage values. Five car models have city mileage values of 10 or 11 mpg and five car models have highway mileage values of 16 mpg. It turns out that the five car models with the lowest city mileage values are also the five car models with the lowest highway mileage values. In both distributions there is a large separation between the five low mileage values and the mileage values of the 51 other subcompact car models. Before we proceed with our examination of this example we need to look at the original data, including all relevant information about the car models, to see why these five car models have such low mileage values.
20’s and lower 30’s. As we would expect, the highway mileage distribution is located higher on the number line than is the city mileage distribution indicating that these subcompact cars tend to get higher mileage on the highway than they do in the city.
Table 5. Subcompact car EPA mileage summary statistics, excluding the five unusual car models. statistic city highway n 51 51 min 16 23 Q 1 19 27 med 23 30 Q 3 26 34 max 39 46 range 23 23 IQR 7 7 Q 1 − min 3 4 med −Q 1 4 3 Q 3 − med 3 4 max −Q 3 13 12 mean 23.53 31. std dev 5.27 5.
We will now quantify and expand on our observations about the subcompact car mileage distributions. Relevant summary statistics are given in Table 5. In the discussion below, we will use C to denote the city mileage of a subcompact car model and H to denote the highway mileage of a subcompact car model. First consider the shapes of the subcompact car mileage distributions. For the city mileage distribution we see that: max(C) − med(C) = 16 > 7 = med(C) − min(C), max(C) − Q 3 (C) = 13 > 3 = Q 1 (C) − min(C), and C = 23. 53 > 23 = med(C). All of these comparisons support our contention that the city mileage distribution is skewed to the right. Notice that Q 3 (C)−med(C) = 3 which is approximately equal to med(C)−Q 1 (C) = 4; this suggests that the middle half of this distribution is reasonably symmetric. For the highway mileage distribution we see that: max(H) − med(H) = 16 > 7 = med(H) − min(H), max(H) − Q 3 (H) = 12 > 4 = Q 1 (H) − min(H), and H = 31. 12 > 30 = med(H). All of these comparisons support our contention that the highway mileage distribution is skewed to the right. Notice that Q 3 (H) − med(H) = 4 which is approximately equal to med(H) − Q 1 (H) = 3; this suggests that the middle half of this distribution is also reasonably symmetric.
Next consider the locations of the subcompact car mileage distributions. The median city mileage med(C) = 23 is less than the median highway mileage med(H) = 30 and the mean city mileage C = 23.53 is less than the mean highway mileage H = 31.12. Both of these comparisons support our contention that the city mileages of subcompact cars tend to be lower than the highway mileages of subcompact cars. Notice that there is some overlap of the city mileages and the highway mileages indicating that some subcompact cars have city mileage values that are higher than the highway mileage values of some subcompact cars and vice versa. Finally consider the variability in these subcompact car mileage distributions. The facts that: range(C) = 23 = range(H), IQrange(C) = 7 = IQrange(H), and SC = 5. 27 is approximately equal to SH = 5.18, all support the contention that the variability in subcompact car city mileage values is about the same as the variability in subcompact car highway mileage values. In our comparison of the city and highway mileages for subcompact cars, we ignored the fact that we actually have pairs of city and highway mileage values for each of the 51 car models. If we want to know how the highway mileage of a subcompact car model relates to its city mileage, then we need to base our comparison on the paired city and highway mileages. One way to do this is to consider the difference between the highway mileage and the city mileage for a car model. For each car model we will determine this difference value by subtracting its city mileage value from its highway mileage value. The highway minus city mileage differences for the n = 51 subcompact car models are given in Table 6. The 51 difference values in Table 6 are listed (reading across a row and then going to the next row) in the same order as the 51 city and highway mileage values are listed in Table 4, skipping the five unusual car models. A stem and leaf histogram for these differences is given in Figure 4 and the difference summary statistics are given in Table 7. In the discussion below, we will use D to denote the difference D = H − C between the highway mileage of a subcompact car model and its city mileage. From the stem and leaf histogram the shape of the subcompact car mileage difference distribution appears to be mound shaped and slightly skewed to the right. The facts: max(D) − med(D) = 5 > 3 = med(D) − min(D), max(D) − Q 3 (D) = 3 > 2 = Q 1 (D) − min(D), Q 3 (D) − med(D) = 2 > 1 = med(D) − Q 1 (D), and D = 7. 59 > 7 = med(D), all support our contention that the mileage difference distribution is slightly skewed to the right. This distribution has a single peak (mode) at 7 indicating that for these subcompact car models it is most common for the highway mileage value to exceed the city mileage value by 7 mpg. For the majority of these subcompact car models the mileage difference is fairly close to 7 mpg. However, there are a few car models for which this mileage difference is a good bit larger. For example, the car model with the largest highway minus city mileage difference is the Saturn SC model without DOHC for which the mileage difference is 12 mpg.
3.2 Modified box plots 53
In this example, the difference between the highway and city mileage means, H − C =
3.2 Modified box plots.
In this section we will consider a modified box plot designed to provide more informa- tion about the tails of the distribution. In the modified box plot a more complex method, which provides an indication of extreme observations, is used to construct the whiskers. The simple box plot defined in Section 3.1 has a box, which extends from the first quartile Q 1 to the third quartile Q 3 divided into two parts by a line at the median, representing the middle of the distribution, and two whiskers, extending from the ends of the box to the most extreme values (the minimum and the maximum), representing the tails of the distribution. Observations located near the ends of a distribution are said to be extreme. The whiskers in a simple box plot indicate the range of the lower and upper tails and the locations of the most extreme values but do not provide details about the behavior of observations near the extremes of the distribution. An extreme observation which is widely separated from the majority of the observations is said to be an outlier. Outliers deserve special consideration, since they may represent interesting exceptional cases or they may represent errors made in recording the data. Note that, depending on the spacing of the observations, extreme observations may or may not be considered outliers. Outliers are easy to spot in a stem and leaf histogram but not in a simple box plot. Before we can construct a modified box plot we need to quantify what we mean by an extreme observation. We will use multiples of the interquartile range (IQR) to distinguish between two types of extreme observations. First notice that the IQR is the range of the middle half of the data and the length of the box in the box plot. An observation which is much more than the IQR below the first quartile Q 1 or much more than the IQR above the third quartile Q 3 might reasonably be classified as an extreme observation. We will classify observations which are more than 1. 5 × IQR but less than 3 × IQR below the first quartile or above the third quartile as somewhat extreme. That is, an observation between Q 1 − 3 × IQR and Q 1 − 1. 5 × IQR or between Q 3 + 1. 5 × IQR and Q 3 + 3 × IQR is said to be
54 3.3 Numerical measures of relative position
somewhat extreme. We will classify observations which are more than 3 × IQR below the first quartile or above the third quartile as very extreme. That is, an observation below Q 1 − 3 × IQR or above Q 3 + 3 × IQR is said to be very extreme. The quantities Q 1 − 1. 5 × IQR and Q 3 + 1. 5 × IQR are known as the lower and upper inner fences, and the quantities Q 1 − 3 × IQR and Q 3 + 3 × IQR are known as the lower and upper outer fences. To construct a modified box plot we first find the five number summary values and the lower and upper fences. To construct the upper whisker we first draw a line from the upper end of the box, Q 3 , extending to the largest observation which is less than the upper inner fence Q 3 + 1. 5 × IQR. We then indicate observations beyond the upper inner fence using two symbols; one symbol, such as a 0, is used for observations between the upper inner fence and the upper outer fence and another symbol, such as a *, is used for observations beyond the upper outer fence. The lower whisker is constructed in an analogous fashion. Consider the urban cholesterol level distribution for the Guatemalan cholesterol ex- ample. In this example we have Q 1 = 196, Q 3 = 239, IQR = 43, 1. 5 × IQR = 64.5, and 3 × IQR = 129. The inner fences are 196 − 64 .5 = 131.5 and 239 + 64.5 = 303.5. There are no observed cholesterol levels below the lower inner fence but there is one observed cholesterol level, 330 mg/dL, above the upper inner fence. The largest cholesterol level between Q 3 and the upper inner fence is 284 mg/dL. The outer fences are 67 and 368. There are no observed cholesterol levels outside the outer fences. The modified box plot for this cholesterol level distribution is given in Figure 5. In this example we would say that the one cholesterol level (330) marked as somewhat extreme is an outlier, since it is fairly widely separated from the other values.
Figure 5. Modified box plot for (all) urban cholesterol levels.
0 133 196 206 239 284 330
3.3 Numerical measures of relative position
There are many situations when we might wish to quantify the position of a particular value of a variable relative to a sample of values. For example, when presented with the results of a standardized test, we would like to know where our score stands relative to the scores of everyone else who took the test. We will discuss two different ways to quantify the relative position of a particular value of a variable. The first measure of the relative position of a particular value X is the percentile rank of X which quantifies the location of X in an ordered listing of all of the values in the sample. The percentile rank of a particular value X is the percentage of the values in