Login
📚 Online Statistics Education
Chapters ▾
⇩ Download ▾

3.8 Mean and Median Demo

This section is an interactive demonstration. The live simulation runs on the original site: open the demonstration at onlinestatbook.com.

Learning Objectives

  1. Understand how the mean and median change with different distributions.

Instructions
This demonstration shows how the relative size of the mean and the median depends on the skew of the distribution. The demonstration begins by showing a histogram of a symmetric distribution (no skew). The mean and median are both 5.0. The mean is shown on the histogram as a small blue line; the median is shown as a small purple line. The standard deviation is 1.81. A red line extends one sd in each direction from the mean. The standard deviation is calculated assuming the data portrayed in the graph represent the entire population. You can change the values of the data set by "painting" the histogram with the mouse. Change the distribution in various ways and note how the skew affects whether the mean is bigger than the median or vice versa.

Illustrated Instructions
The simulation starts out with a symmetrical distribution. As can be seen seen in the screenshot below the mean and median are equal and there is 0 skew.
Screenshot of the mean and median simulation at its starting symmetric distribution: N = 34, mean 5.00, median 5.00, sd 1.81, skew 0.00. The histogram is a symmetric mound over 1 to 9 peaking at 8 cases at the value 5, with a fulcrum under 5 and a red bar marking the middle half of the data from about 3.5 to 7.
The distribution can be changed "painting" it with the mouse. Below is an example of a negatively skewed distribution. Note that the mean and median are no longer equal to each other. Trying painting several different types of distributions to see how mean and median values are affected relative to each other.
Screenshot of the same simulation after the distribution has been dragged into a negatively skewed shape: N = 49, mean 6.88, median 7.00, sd 2.44, skew -0.48. The bars climb from 1 case at the value 1 to 9 cases at 10, and the mean marker now sits to the left of the median marker over the fulcrum — the long left tail pulls the mean down.

"Paint" the distributon with the mouse and observe the effects. The mean and median are shown to the left and also as small vertical bars below the X-axis. The mean is in blue and the median is in pink.

Adapted from Online Statistics Education: A Multimedia Course of Study (onlinestatbook.com), Project Leader: David M. Lane, Rice University. Developed with NSF support. The original work is in the public domain; it is cited here at the authors' request. Changes were made: reformatted as an accessible XYZ web edition with native MathML. License: Public-Domain.