Jugami Statistics

Jugami › Statistics and Probability › Averages: Mean, Median and Mode

Statistics · Unit 1

Averages: Mean, Median and Mode

“The average” sounds like one number. It is really several different ideas, and picking the wrong one can tell the wrong story.

In this unit you'll learn the mean, median and mode, how to use a weighted mean, how outliers and skew pull averages around, when each average misleads, and why an average alone is never the whole story.

A box plot drawn above a dot plot of twelve scores 60708090100 median mean Twelve test scores, two pictures

Nightingale's averages: the chart that changed hospitals

In the winter of 1854–55, the British army fighting in the Crimean War was losing men at a terrible rate. Florence Nightingale, who had arrived at the army hospital at Scutari in November 1854 with 38 nurses, wanted to know why. With her colleagues she gathered monthly counts of deaths and sorted them by cause: disease, wounds, or other causes.

Raw counts can fool you, because the army's size changed every month. So Nightingale used averages: the average number of soldiers in the army that month, and a rate, the deaths per 1,000 soldiers per year. A rate is a kind of mean, “deaths per soldier”, scaled up so it's easy to read. The numbers were grim. In January 1855 alone, 2,761 soldiers died of disease, 83 of wounds, and 324 of other causes, out of an army of about 32,393. That disease death rate works out to about 1,023 per 1,000 soldiers per year. In other words, if that month's pace had lasted a whole year, disease alone would have killed more men than the army had.

To make people see the pattern, Nightingale drew a rose diagram, which she called a “coxcomb”. Each month is a wedge. The area of each colored piece, measured from the center, shows the death rate for one cause. The three colored wedges all start at the center and overlap, with the smaller ones drawn on top; they are not stacked end to end, so you don't add their lengths. The blue disease wedges dwarf everything else.

What changed? A government Sanitary Commission reached the war zone in March 1855 and began cleaning up drains, water and ventilation. In her figures, disease deaths in the second year (3,319) were less than a third of the first year's (11,157). Nightingale used charts like this one in reports published in 1858 and 1859 to argue for clean, well-run hospitals.

See Nightingale's monthly numbers as a table
Monthly deaths in the British army in the East, April 1854 to March 1856, from Nightingale’s figures (HistData transcription). The last column is the disease death rate per 1,000 soldiers per year.
MonthAverage army sizeDiseaseWoundsOtherDisease rate per 1,000 per year
Apr 18548,5711051.4
May 185423,33312096.2
Jun 185428,33311064.7
Jul 185428,722359023150.0
Aug 185430,246828130328.5
Sep 185430,2907888170312.2
Oct 185430,643503132128197.0
Nov 185429,736844287106340.6
Dec 185432,7791,725114131631.5
Jan 185532,3932,761833241,022.8
Feb 185530,9192,12042361822.8
Mar 185530,1071,20532172480.3
Apr 185532,2524774857177.5
May 185535,4735084937171.8
Jun 185538,86380220931247.6
Jul 185542,64738213433107.5
Aug 185544,61448316425129.9
Sep 185547,7511892762047.5
Oct 185546,852128531832.8
Nov 185537,853178333256.4
Dec 185543,21791182825.3
Jan 185644,2124224811.4
Feb 185643,485240196.6
Mar 185646,140150353.9
Total–14,4761,7581,748–

Why do the wedges use area? If you doubled a wedge's radius, its area would be four times as big, and your eye would read it as four times as bad. Nightingale's wedges keep area proportional to the rate, so the radius grows with the square root. Try the “radius” button to see the exaggeration.

Mean, median and mode

A measure of center is one number that sums up a “typical” value.

mean x̄ = (x₁ + x₂ + … + xₙ) ÷ n

Mean as a balance point. Picture the values as equal weights on a ruler. The mean is where the ruler balances. Values far from the mean have more leverage, which is why one far-off value can move it a lot.

Mode for categories. The mode is the only one of the three that works for categorical data. You can say the most common favorite sport is soccer, but there's no “mean sport”.

Worked example: all three at once

Eight students reported how many books they read over the summer: 0, 1, 2, 2, 2, 3, 5, 9. (Made-up data.)

  1. Mean: 0 + 1 + 2 + 2 + 2 + 3 + 5 + 9 = 24, and 24 ÷ 8 = 3 books.
  2. Median: n = 8 is even, so average the 4th and 5th values: (2 + 2) ÷ 2 = 2 books.
  3. Mode: 2 appears three times, more than any other value, so the mode is 2 books.

The mean is higher than the median because of the student who read 9 books, a long tail on the right.

Weighted mean

In an ordinary mean, every value counts the same. In a weighted mean, some values count more than others.

weighted mean = (w₁x₁ + w₂x₂ + … + wₙxₙ) ÷ (w₁ + w₂ + … + wₙ)

Worked example: a course grade

Homework counts 20%, tests 50% and the final exam 30%. A student averages 90 on homework, 78 on tests and 84 on the final.

  1. Multiply each score by its weight: 0.20 × 90 = 18, 0.50 × 78 = 39, 0.30 × 84 = 25.2.
  2. Add: 18 + 39 + 25.2 = 82.2. The weights already add to 1 (100%), so there's nothing more to divide by.
  3. The grade is 82.2. The plain mean of 90, 78 and 84 would be 84, which is too high, because the weaker test scores count the most.

Worked example: the mean of means trap

Class A has 10 students with a mean score of 90. Class B has 30 students with a mean score of 70. What is the mean for all 40 students?

  1. It is not (90 + 70) ÷ 2 = 80. That would treat a class of 10 the same as a class of 30.
  2. Find the totals: 10 × 90 = 900 points and 30 × 70 = 2,100 points.
  3. All 40 students: (900 + 2,100) ÷ 40 = 3,000 ÷ 40 = 75.

This is a weighted mean of 90 and 70 with weights 10 and 30. Whenever you combine averages from groups of different sizes, weight them by the group sizes. (Made-up data.)

Outliers and skew

An outlier is a value far from the rest. A distribution is skewed when one tail stretches out farther than the other. Both pull the mean toward them, while the median hardly moves.

Worked example: one big salary

Five people at a small shop earn (in thousands of dollars) 40, 45, 50, 55, 60. The mean is 250 ÷ 5 = 50 and the median is 50.

Now the owner, who earns 1,000, joins the list: 40, 45, 50, 55, 60, 1000.

  1. Mean: (250 + 1000) ÷ 6 = 1250 ÷ 6 ≈ 208.3 thousand.
  2. Median: the two middle values are 50 and 55, so the median is (50 + 55) ÷ 2 = 52.5 thousand.

One extreme value dragged the mean far up, but the median barely moved. We say the median is resistant to outliers and the mean is not. (These numbers are made up for practice.)

Three distribution shapes: skewed left with the mean left of the median, symmetric with mean equal to median, skewed right with the mean right of the median Skewed leftSymmetricSkewed right blue line = medianrose line = mean
The mean is pulled toward the long tail. In a symmetric shape, the mean and median are equal.

When you describe a distribution, use SOCS: Shape, Outliers, Center, Spread, always in context. For example: “The waiting times are skewed right with one outlier at 45 minutes; the median is 6 minutes and the IQR is 5 minutes.”

Rule of thumb: for skewed data or data with outliers, report the median and IQR. For roughly symmetric data without outliers, the mean and standard deviation work well.

When averages mislead

The mean misleads when the data are skewed or have outliers. A few huge incomes can make the mean income higher than what most people earn. That's why news reports on incomes and house prices usually give the median.

The median misleads when the size of the extremes matters. If you're budgeting for a whole group, the total cost is n × mean, not n × median. The median also ignores everything except the middle: 1, 2, 3, 4, 100 and 1, 2, 3, 4, 5 have the same median, 3.

The mode misleads with numbers that rarely repeat. In 12, 15, 17, 40, 40, the mode is 40, which is not typical at all. With many different values there may be no mode, or several.

Any average misleads without a sense of spread. Two classes can both average 75 on a test, one with every score between 70 and 80 and one with half the class failing. “The river is 3 feet deep on average” doesn't mean you can wade across.

A good habit: when someone says “the average”, ask which average, of whom, and how spread out the values are.

A first look at spread

An average tells you the center. Spread tells you how much the values vary around it. The data 70, 70, 70 and 50, 70, 90 both have mean and median 70, but they are very different.

Worked example: is it really an outlier? The 1.5 × IQR rule

Data (n = 9): 3, 5, 7, 8, 12, 13, 14, 18, 21.

  1. The median is the 5th value: 12.
  2. Lower half 3, 5, 7, 8 → Q1 = (5 + 7) ÷ 2 = 6. Upper half 13, 14, 18, 21 → Q3 = (14 + 18) ÷ 2 = 16.
  3. IQR = 16 − 6 = 10.
  4. Outlier fences: Q1 − 1.5 × IQR = 6 − 15 = −9 and Q3 + 1.5 × IQR = 16 + 15 = 31. Nothing is below −9 or above 31, so there are no outliers.

You'll learn to compute a standard deviation by hand in a later unit. For now, think of it as roughly “how far a typical value is from the mean”. The explorer below calculates it for you.

Explorer: dot plot and box plot

Common mistakes

Forgetting to sort before finding the median. The median of 9, 2, 7 is 7 (sorted: 2, 7, 9), not 2.

Expecting the median to be a data value. For 3, 5, 8, 10 the median is (5 + 8) ÷ 2 = 6.5, which isn't in the list.

Averaging averages from different-sized groups. Weight each group's mean by its size, as in the Class A and Class B example.

Dropping zeros. A zero is a real value. The mean of 0, 4, 8 is 12 ÷ 3 = 4, not 12 ÷ 2 = 6.

Practice

People behind the ideas

1820 Florence Nightingale is born in Florence, Italy, on 12 May.

1854 She arrives at Scutari on 4 November with 38 nurses.

1855 The Sanitary Commission arrives in March; disease deaths fall sharply over the following year.

1858 Her “Notes on Matters Affecting the Health, Efficiency and Hospital Administration of the British Army” includes her mortality diagrams.

1858 She becomes the first woman member of the Statistical Society of London (now the Royal Statistical Society).

1859 Her “A Contribution to the Sanitary History of the British Army during the Late War with Russia” is published, also illustrated with tables and diagrams.

1874 She becomes an honorary member of the American Statistical Association.

1907 She becomes the first woman appointed to the Order of Merit.

1910 She dies in London on 13 August.

Quiz

Seven questions. Pick an answer for each, then check.

1. What is the mode of 4, 7, 7, 2, 9, 7, 2?

2. What is the median of 12, 5, 9, 20?

3. One very large outlier is added to a data set. Which summary changes the least?

4. Tests count 60% of a grade and homework 40%. A student has 80 on tests and 95 on homework. What is the grade?

5. A class of 20 has a mean score of 80 and a class of 5 has a mean of 60. What is the mean of all 25 students?

6. A data set is strongly skewed to the right (a long tail of large values). What usually happens?

7. Why did Nightingale compare death rates per 1,000 soldiers instead of raw counts of deaths?

Talk about it

Sources

Credits: all diagrams are original SVG drawn for Jugami. The interactive rose is redrawn from the HistData numbers, not copied from Nightingale's printed plate. Practice data sets and worked-example numbers are made up unless a source is given.