Comparison of Mean, Median, and Mode

Home

Java Applet Interactive histogram with mean, median and mode


Frequency Distributions

Recall also that in our general notation, we have a data set with n points arranged in a frequency distribution with k classes. The class mark of the i'th class is denoted xi; the frequency of the i'th class is denoted fi and the relative frequency of th i'th class is denoted pi = fi / n.

Measures of Center

The purpose of this section is a comparison of three measures of the center of a distribution.

First, recall that the mean is the weighted average of the class marks, with the relative frequencies as the weight factors:

Next, recall that the median is the value that is half way through the ordered data set. Specifically, if n is odd then the median is xj where j is the smallest integer satisfying

If n is even the median is (xj + xl)/2 where j and l are the smallest integers satisfying

Finally, a mode is any class mark whose class has maximum frequency (or equivalently, maximum relative frequency). Recall also that we can think of the relative frequency distribution as the probability distribution of a random variable X that gives the mark of the class containing a randomly chosen value from the data set. With this interpretation, the mode of the frequency distribution is the same as the mode of X.

The Applet

As before, you can construct a frequency distribution and histogram for a continuous variable x by clicking on the horizontal axis from 0.1 to 5.0. You can select class width 0.1 with 50 classes, or width 0.2 with 25 classes, or width 0.5 with 10 classes, or width 1.0 with 5 classes, or width 5.0 with 1 class. The three measures of center are shown below the x-axis: the mean is shown in red, the median in blue, and the mode in green. These parameters are also recorded numerically in the second table. Measures of center are not very useful when they are not unique, so in this applet we will record the mode only when it is unique.

Exercises

Simulation Exercise 1. In the applet, set the class width to 0.1 and construct a frequency distribution with at least 6 classes and at least 10 values. Compute the min, max, mean and standard deviation by hand, and verify that you get the same results as the applet.

Simulation Exercise 2. In the applet, set the class width to 0.1 and construct a distribution with at least 30 values of each of the types indicated below. Then increase the class width to each of the other four values. As you perform these operations, note the positions of the mean, median, and mode (when it is unique).

  1. A uniform distribution.
  2. A symmetric, unimodal distribution.
  3. A unimodal distribution that is skewed right.
  4. A unimodal distribution that is skewed left.
  5. A symmetric bimodal distribution.
  6. A U-distribution.

Mathematical Exercise 3. Try to characterize the distributions in which the mean, median and (unique) mode are the same.

Simulation Exercise 4. In each case below, try to construct a distribution for which the measures of center are ordered as indicated. Are any of these orderings impossible?

  1. mean < median < mode
  2. mean < mode < median
  3. median < mean < mode
  4. median < mode < mean
  5. mode < mean < median
  6. mode < median < mean

Simulation Exercise 5. Based on your experiments in Exercises 2 and 4, (and additional experiments if necessary), answer the following questions:

  1. Which measure of center is most sensitive to changes in the data set?
  2. Which measure of center is least sensitive to changes in the data set?
  3. Which measure of center changes smoothly when additional points are added?
  4. Which measures of center can change abruptly when additional points are added?

Simulation Exercise 6. Try to construct a distribution in which

  1. The mean and median are as far apart as possible.
  2. The mean and mode are as far apart as possible.
  3. The median and mode are as far apart as possible.

Descriptive Statistics

PreviousNext