Descriptive Statistics

Once data has been collected and categorized, visualizations and fundamental calculations help describe the data. The visualization approaches (such as bar charts, histograms, and box plots) and calculations (such as mean, median, and standard deviation) introduced here will be revisited and implemented using Python.

Skewness and the Mean, Median, and Mode

Consider the following data set:

4, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 9, 10

This data set can be represented by the following histogram. Each interval has width 1, and each value is located in the middle of an interval.

This histogram matches the supplied data. It consists of 7 adjacent bars with the x-axis split into intervals of 1 from 4 to

Figure 2.18

The histogram displays a symmetrical distribution of data. A distribution is symmetrical if a vertical line can be drawn at some point in the histogram such that the shape to the left and the right of the vertical line are mirror images of each other. The mean, the median, and the mode are each seven for these data. In a perfectly symmetrical distribution, the mean and the median are the same. This example has one mode (unimodal), and the mode is the same as the mean and median. In a symmetrical distribution that has two modes (bimodal), the two modes would be different from the mean and median.

The histogram for the data: 4, 5, 6, 6, 6, 7, 7, 7, 7, 8 is not symmetrical. The right-hand side seems chopped off compared to the left-hand side. A distribution of this type is called skewed to the left because it is pulled out to the left. A skewed left distribution has more high values.

This histogram matches the supplied data. It consists of 5 adjacent bars with the x-axis split into intervals of 1 from 4 to

Figure 2.19

The mean is 6.3, the median is 6.5, and the mode is seven. Notice that the mean is less than the median, and they are both less than the mode. The mean and the median both reflect the skewing, but the mean reflects it more so. The mean is pulled toward the tail in a skewed distribution.

The histogram for the data: 6, 7, 7, 7, 7, 8, 8, 8, 9, 10 is also not symmetrical. It is skewed to the right. A skewed right distribution has more low values.

This histogram matches the supplied data. It consists of 5 adjacent bars with the x-axis split into intervals of 1 from 6 to

Figure 2.20

The mean is 7.7, the median is 7.5, and the mode is seven. Of the three statistics, the mean is the largest, while the mode is the smallest. Again, the mean reflects the skewing the most.

To summarize, generally if the distribution of data is skewed to the left, the mean is less than the median, which is often less than the mode. If the distribution of data is skewed to the right, the mode is often less than the median, which is less than the mean.

Skewness and symmetry become important when we discuss probability distributions in later chapters.


Example 2.32

Statistics are used to compare and sometimes identify authors. The following lists show a simple random sample that compares the letter counts for three authors.

Terry: 7, 9, 3, 3, 3, 4, 1, 3, 2, 2

Davis: 3, 3, 3, 4, 1, 4, 3, 2, 3, 1

Maris: 2, 3, 4, 4, 4, 6, 6, 6, 8, 3

  1. Make a dot plot for the three authors and compare the shapes.
  2. Calculate the mean for each.
  3. Calculate the median for each.
  4. Describe any pattern you notice between the shape and the measures of center.


Solution
  1.         This dot plot matches the supplied data for Terry. The plot uses a number line from 1 to 10. It shows one x over 1, two x
    Figure 2.21 Terry's distribution has a right (positive) skew.


  2.     This dot plot matches the supplied data for Davi. The plot uses a number line from 1 to 10. It shows two x's over 1, one
    Figure 2.22 Davis's distribution has a left (negative) skew.

  3.     This dot plot matches the supplied data for Mari. The plot uses a number line from 1 to 10. It shows one x over 2, two x'
    Figure 2.23 Maris's distribution is symmetrically shaped.

  4. Terry's mean is 3.7, Davis's mean is 2.7, and Maris's mean is 4.6.

  5. Terry's median is 3, Davis's median is 3, and Maris's median is four. It would be helpful to manually calculate these descriptive statistics, using the given data sets and then compare to the graphs.

  6. It appears that the median is always closest to the high point (the mode), while the mean tends to be farther out on the tail. In a symmetrical distribution, the mean and the median are both centrally located close to the high point of the distribution.


Try It 2.32

Discuss the mean, median, and mode for each of the following problems. Is there a pattern between the shape and measure of the center?

a.

This dot plot matches the supplied data. The plot uses a number line from 0 to 14. It shows two x's over 0, four x's over 1,


Figure 2.24

b.

The Ages at Which Former U.S. Presidents Died
4 6 9
5 3 6 7 7 7 8
6 0 0 3 3 4 4 5 6 7 7 7 8
7 0 1 1 2 3 4 7 8 8 9
8 0 1 3 5 8
9 0 0 3 3
Key: 8|0 means 80.

Table 2.30

c.
This is a histogram titled Hours Spent Playing Video Games on Weekends. The x-axis shows the number of hours spent playing vi
Figure 2.25