3 Summary Statistics in Excel

3.4 Where’s the Center of Quantitative Data?

Goals:
Learn to create a histogram from a frequency distribution;
Know the different measurements of center: Mean, Median, and Mode;
Know how each of the different measurements of center are affected
by perturbations in data.

The reason for studying data is to gather information. Typically, we first try to summarize what the data is telling us. There are several ways of summarizing data. In this section, we will study study the summary statistics that measure the location of what one would call the center of the data.

3.4.1 Measures of Center

The Mean

The most common measurement of center of data is called the mean.

Definition (Mean).

Given a sample of n data values, x1,x2,,xn, the sample mean, denoted by x¯ (or sometimes called the sample average) is

x¯=x1+x2++xnn=1ni=1nxi.

If our data set consists of the whole population, we calculate the mean in the same manner and denote the population mean by the Greek letter μ.

So what does the mean really tell us? The best way to explain the mean is to picture a teeter-totter with our data arranged from lowest to highest on it. The mean is the location of the fulcrum, i.e., the location where the data would balance. Let’s see some examples involving the calculation of the mean.

Example 3.4.1.

Assuming your population consists of all the numbers within the range [0,60].

  • (a)

    Let’s predict the population mean, μ, of the data.

    Since the mean acts as the balancing location of the data, we an predict that the mean of the range of values [0,60] would be μ=30.

  • (b)

    Let’s construct a random sample of 10 data values from the population. Can you determine what is x¯?

    Using =𝚁𝙰𝙽𝙳(), we can create a random sample of values between [0,60]. Recall that =𝚁𝙰𝙽𝙳() only generates a random number between [0,1]. Algebraically manipulating the command, we have

    =𝟼𝟶*𝚁𝙰𝙽𝙳().

    Enter this command on a new sheet in Excel within cell 𝙰𝟷.

    Figure 3.46:

    Auto-fill 9 more cells in the column just below cell 𝙰𝟷. In cell 𝙲𝟷 type: Sample Mean:. Then, in cell 𝙳𝟷 type the expression:

    =𝚂𝚄𝙼(𝙰𝟷:𝙰𝟷𝟶)/𝟷𝟶
    Figure 3.47:

    So in Figure 3.47, you can see that we obtained x¯=36.0572125. Do you obtain the same answer?

  • (c)

    Construct a random sample of 20 data values from the population and find x¯. How does it relate to μ? Auto-fill 10 more entries in the first column. Then adjust the expression in cell 𝙳𝟷 to include the new entries in column 𝙰 by typing

    =𝚂𝚄𝙼(𝙰𝟷:𝙰𝟸𝟶)/20.
    Figure 3.48:

    Notice that in Figure 3.48, x¯=31.5694659. If we were to press F9 on the keyboard, the random sample will change. Doing this, one can see that the sample means seems to be jumping round our predicted population mean. Is this a coincidence?

In the previous example, there is no coincidence that the mean of the sample is jumping around μ=30. Ideally, we would love to know what the mean of the population, μ, is. We learned that obtaining the entire population can be rather difficult. So, x¯ is sometimes the best we have to approximate μ.

The mean is sensitive to extreme values in the data. Going back to the teeter-totter metaphor for the mean, data values that are much much larger or much much smaller than the rest of the data will cause the mean to tend towards the extreme values. In this case, does the mean accurately portray the location of the center of the data? Let’s observe this phenomena.

Example 3.4.2.

Create a sample of data that includes nine random values between [0,1] and a tenth value of 100. Compute the sample mean of the data. What do you observe happening?

On a new sheet in Excel, we have generated our data and computed the sample mean.1111The average is computed with the Excel command 𝙰𝚅𝙴𝚁𝙰𝙶𝙴(). We will encounter this command in later examples. Figure 3.49 demonstrates this.

Figure 3.49:

As one can see, the sample mean tends towards the value 100. However, the majority of the data is between [0,1].

In statistics, we often give the name outlier to the data value 100 as seen in the previous example.

Definition (Outlier).

A data value that tends to be an extreme in relation to other data values within the sample.

Outliers can and do happen in data. They are often the cause of outside forces such as errors in studies or rare situations. With some justification and intense analysis, some outliers can be removed from data since they can affect values such as the mean of the data.

The Median

Another common measurement of center of data is called the median.

Definition (Median).

Given a sample of n data values, x1,x2,,xn, arranged in order from lowest to highest in value, the median is the data value that designates the location of where 50% of the data are below it. If the data set consists of an odd number of values, then the median is the middle value. If the data set consists of an even number of values, then the median is the average of the middle two values.

Example 3.4.3.

Let’s find the median of the following random samples, generated by Excel.

  • (a)

    An odd number of data values

    0.65 0.88 0.33
    0.66 0.93 0.58
    0.33 0.82 0.04

    Arrange the data in order from lowest to highest by using the sort feature in Excel. Since there are an odd number of data values, then choose the middle number. In this case, the fifth data value is the median of the data. That is: 0.65.

    Figure 3.50:
  • (b)

    An even number of data values

    0.65 0.37 0.66 0.29 0.25
    0.64 0.68 0.52 0.18 0.85

    Arranging the data from lowest to highest by using the sort feature in Excel in cells 𝙰𝟷 through 𝙰𝟷𝟶. Since there are an even number of values, then we need to find the two middle values of the data. In this case, the fifth and sixth data values are the middle values. We then find the average of these values to find the median of the sample.

    Use the shortcut command to find the average of data values by typing:

    =𝙰𝚅𝙴𝚁𝙰𝙶𝙴(𝙰𝟻:𝙰𝟼)

    The answer to this, 0.58, is the median of the sample as seen in Figure 3.51.1212As we saw with the mean, there is a shortcut for finding the median of a data set. In Excel, this involves the command 𝙼𝙴𝙳𝙸𝙰𝙽().

    Figure 3.51:

The median is more resistant to extreme values. If in part (b) of the previous example we replace 0.85 and replace with any value between 0.65 and larger, then the median is unaffected. However, as one can see, the median could be affected if the order of the data is changed by adding more data values or removing data values.

The Mode

Definition (Mode).

The mode of a data set is the value that occurs most often. If there is no such value, then we say that the data set has no mode.

This summary statistic is easy to recognize. But Excel will compute it rather quickly by invoking the command

𝙼𝙾𝙳𝙴().

Note that if #𝙽/𝙰 appears, it means that there is no mode.

Example 3.4.4.

Let’s generate a sample of 20 integers between [1,3] and find the mode using the shortcut command.

Figure 3.52 shows a sample obtained by using the 𝚁𝙰𝙽𝙱𝙴𝚃𝚆𝙴𝙴𝙽(𝟷,𝟹) command.

Figure 3.52:

In cell 𝙰𝟸𝟸, type Mode:. Then type the command in cell 𝙱𝟸𝟸

=𝙼𝙾𝙳𝙴(𝙰𝟷:𝙰𝟸𝟶).
Figure 3.53:

Upon hitting enter, we obtain the mode of 𝟸.

3.4.2 Symmetric and Skewed Distributions

We learned that the histogram can be used to recognize shape and patterns in the data. One particular characteristic we look for is symmetry.

Definition (Symmetric Distribution).

Frequency distribution whose histogram exhibits similar shape to the right and left of the mean and median. For symmetric distributions, the mean and the median coincide. If there is only one mode, then it too will coincide with the mean and median.

The two most familiar symmetric distributions that we will encounter look like those in Figure 3.54. In fact, the Figure a is a referred to as the bell-shaped distribution. The mean, median, and mode all coincide. This distribution will be studied further later.

Figure b seems to look rectangular. Each of the outcomes are equally likelihood to occur according to the graph. This distribution is referred to as uniform. The mean and median coincide, but there is not just one mode. Can you see why?

(a) Bell-Shaped
(b) Uniform
Figure 3.54: Symmetric Distributions

In reality, the samples taken will almost never exhibit a perfect symmetry. Instead, we have to use our best judgment and argue that the distribution is symmetric. For example, we saw an approximate bell-shaped image in Figure 3.26. However, one could argue that the histogram in Figure 3.26 is not symmetric and instead is skewed.

Definition (Skewed Distribution).

Frequency distribution whose histogram is non-symmetric with a fat, short-tail along with a skinny, elongated tail. Skewed Left implies the skinny, elongated tail is on the left and the mean is less than the median. Skewed Right implies the skinny, elongated tail is on the right and the mean is greater than the median.

If we claim that Figure 3.26 is not symmetric, but skewed, we can see that there’s a slight, elongated left-tail. Thus, the mean is less than the median for that distribution. Below are a few additional histograms that portray skewed left, skewed right, and approximately symmetric distributions.

(a) Skewed Left
(b) Skewed Right
(c) Approx. Symmetric
Figure 3.55: Examples of Skew and Symmetric Distributions
Concepts Check: 1. Find the mean, median, and mode of the following data: 2 3 4 2 4 1 3 2 4 3 1 2 4 4 1 4 1 3 4 2 Answer: Mean =2.65, Median =3, Mode =4 2. Is the following histogram displaying a distribution that is skewed or symmetric? Answer: Skewed Right

3.4.3 Exercises

  1. 1.

    Answer each of the following statements as True or False.

    1. (a)

      The average and the mean are two different calculations.

    2. (b)

      The shortcut command for finding the mean in Excel is 𝙼𝙴𝙰𝙽().

    3. (c)

      The median is extremely sensitive to outliers.

    4. (d)

      The mean and the median are not equal in a symmetric distribution.

    5. (e)

      It is possible to have no mode.

  2. 2.

    Without using the command 𝙰𝚅𝙴𝚁𝙰𝙶𝙴, create a spreadsheet that will compute the sample mean of 7 data given. Use it to quickly compute the sample means of the following data.

    1. (a)

      3, 2, 1, 3, 1, 3, 3

    2. (b)

      4, 2, 1, 3, 3, 3, 4

    3. (c)

      6.5, 12.4, 11.9, 16.7, 14.8, 6.8, 14.2

    4. (d)

      40.4, 80.8, 43.0, 44.4, 51.2, 96.4, 53.4

  3. 3.

    Using 𝚁𝙰𝙽𝙳(), generate a sample of 100 data values from [60,70]. Compute the sample mean and median. What do you expect the population mean and median to be?

  4. 4.

    Using 𝚁𝙰𝙽𝙳𝙱𝙴𝚃𝚆𝙴𝙴𝙽(), generate a sample of 100 data values from [20,35]. Compute the sample mean, median, and mode. What do you expect the population mean, median and mode to be?

  5. 5.

    Using 𝙽𝙾𝚁𝙼.𝙸𝙽𝚅(𝚁𝙰𝙽𝙳(),𝟹𝟶,3.6), generate 200 data values, construct a histogram. Describe where the sample mean and median are located. Is the distribution symmetric or skewed?

  6. 6.

    Perform the following: generate a random sample of 10 data values using the command 𝚁𝙰𝙽𝙳(). Then, calculate the sample mean, x¯, of the 10 data values. Store this value in a separate column. Repeat the process by generating a different set of 10 data values, and computing the sample mean, x¯. (Note that the new sample mean may be different.) Keep repeating this process until 30 sample means are collected. Construct a histogram of the 30 sample means collected. Describe the distribution by stating the shape, symmetry, mean, median and mode.