Mean, median and skew: choosing the center
When data has a long tail, the mean and the median stop agreeing. Which one is the center, and how does the shape tell you where each will land?
Where you are 3 in Shape of a distribution
Why this exists
Marius looked up the populations of the 15 towns in his region, to the nearest thousand people. In thousands, sorted, they are
The median is the eighth value, 5 thousand. The total is 105 thousand, so the mean is \displaystyle \frac{105}{15} = 7 thousand. Two correct calculations, two different answers, and 11 of the 15 towns are smaller than the mean.
So is a typical town home to 5 thousand people or to 7 thousand? That depends on the shape of the data and on what the number is for.
Definition
The mean is the total of the values divided by how many there are. The median is the middle value of the sorted list, or halfway between the two middle values. Both are measures of center: one number standing for the whole data set.
Choosing a center means deciding which one describes the data for the job at hand:
- the median, when you want a typical value and the data is skewed or has outliers, since it stays with the bulk of the values;
- the mean, when the total matters (sharing a cost evenly, or finding a total from a count), and when the data is roughly symmetric, so that the two nearly agree and the mean uses every value.
A center is reported with a matching spread: the median with the IQR, and the mean with the MAD, which measures distances from the mean. The shape words are those of Symmetric and skewed distributions.
Intuition
Figure 1 shows Marius’s towns. The hollow triangle marks the median and the filled one the mean.
The median only asks which value sits in the middle place. The town of 27 thousand counts the same as a town of 9 thousand would: one value above the middle.
The mean is the balance point. A value far out on a long tail acts like a weight on a long lever. The 27 sits 22 thousand to the right of the median, farther than the seven smaller towns sit to its left all together (3 + 2 + 2 + 2 + 1 + 1 + 1 = 12). To balance, the point must move right, toward the tail. Why one far value moves the mean and not the median is Resistant and non resistant measures; here the question is what a whole tail does.
Results
Symmetric data. If a distribution is exactly symmetric, its mean and median are equal. If it is roughly symmetric, they are close.
Skewed right. The mean is pulled toward the long tail, so it usually sits above the median.
Skewed left. The mean usually sits below the median.
Read backwards. A mean well above the median suggests a long right tail or some large outliers; a mean well below it suggests a long left tail or some small outliers.
The gap formula. For n values with median M, let A be the total of the distances from M of the values above it, and B the total for the values below it. If A is at least B, the mean is above the median (or equal to it) by \displaystyle \frac{A - B}{n}:
If B is larger, the mean is below the median by \displaystyle \frac{B - A}{n}:
Choosing. For a typical value of skewed data, use the median with the IQR. When a total matters, or the data is roughly symmetric, use the mean with the MAD. The total is always the mean times the count, whatever the shape.
Why it is true
The gap formula. Each value above the median is M plus its distance, each value below is M minus its distance, and a value equal to M is M plus 0. Adding all n values,
which is nM + (A - B) when A is at least B, and nM - (B - A) when B is larger. Dividing by n gives the two forms. For Marius’s towns, M = 5, the six values above give A = 1 + 1 + 3 + 5 + 10 + 22 = 42 and the seven below give B = 12, so the mean is \displaystyle 5 + \frac{42 - 12}{15} = 5 + 2 = 7, as before.
The shapes. The median splits the values into two halves of equal count. In data skewed right, the upper half holds the long tail, so its values reach far from M, while the lower half is crowded close to M. Far values make big distances, so A is usually larger than B and the mean lands above the median. Skewed left is the mirror image. “Usually”, because shape is judged by eye while the formula compares totals; Boundaries gives a case where they disagree.
Exact symmetry. If the data is symmetric about a number c, the sorted list reads the same from both ends about c, so c is the median. Each value some distance above c is matched by one the same distance below, so A = B and the mean is c as well.
Worked examples
Box office takings: skewed right
Meret listed what 9 films from one studio took at the box office, in millions of dollars: 7, 4, 12, 5, 48, 3, 9, 5, 6. Find the mean and the median, compare them, and say which describes a typical film.
SolutionSorted: 3, 4, 5, 5, 6, 7, 9, 12, 48. With nine values the median is the fifth, 6 million dollars. The total is 99, so the mean is \displaystyle \frac{99}{9} = 11 million dollars.
The values crowd between 3 and 12, and one film trails off to 48: a long right tail. The mean is above the median, here by 5 million dollars. Seven of the nine films took less than the mean, so it is not what a typical film took. The median is: half the films took 6 million dollars or less.
Fairy lights: skewed left
Milos tested 20 strings of fairy lights, each with 20 lights, and counted the lights that work on each string (Figure 2). For 8, 11, 13, 15, 16, 17, 18, 19 and 20 working lights, the numbers of strings are 1, 1, 1, 1, 2, 3, 4, 4 and 3. Find the mean and the median and compare them. Then find how many spare bulbs would replace every dead light.
Twenty values, so the median is halfway between the tenth and the eleventh. The strings with 17 or fewer working lights number 1 + 1 + 1 + 1 + 2 + 3 = 9, so the tenth to thirteenth values are all 18. The median is 18 lights.
For the mean, multiply each value by its count (Mean from a frequency table and weighted mean):
so the mean is \displaystyle \frac{338}{20} = 16.9 lights.
The values crowd from 17 to 20, near the ceiling of 20, and a few strings trail left as far as 8: skewed left. The mean sits below the median, by 1.1 lights.
For the spare bulbs the total is what counts. There are 20 \times 20 = 400 lights and 338 work, so 400 - 338 = 62 are dead. That is 20 \times (20 - 16.9) = 62: the mean gives the total. The median would give 20 \times (20 - 18) = 40, which is 22 spares short.
Film running times: roughly symmetric
Matilde timed 10 films, in minutes: 96, 104, 88, 100, 115, 98, 106, 100, 94, 102. Find the mean and the median. Does the choice of center matter here?
SolutionSorted: 88, 94, 96, 98, 100, 100, 102, 104, 106, 115. The middle two are both 100, so the median is 100 minutes. The total is 1{,}003, so the mean is \displaystyle \frac{1{,}003}{10} = 100.3 minutes.
The values spread fairly evenly on both sides of 100, reaching 12 minutes below and 15 above: roughly symmetric, and the mean is only 0.3 minutes above the median. Either center describes a typical film; the mean is the usual choice, since it uses every value and pairs with the MAD.
Sharing the bill
Marius, Matilde, Maxim, Meret and Milos go to the cinema. With tickets and snacks they spend 9, 10, 11, 12 and 33 dollars; Milos bought the large popcorn for everyone. They agree to split the total evenly. What does each pay? Which center is that, and which describes what a typical friend spent?
SolutionThe total is 75 dollars, so each pays \displaystyle \frac{75}{5} = 15 dollars. That is the mean: sharing a total evenly is exactly what the mean does. The median spend is 11 dollars, and paying it would not work: 5 \times 11 = 55, which is 20 dollars short.
As a description of a typical friend, though, 15 dollars is more than four of the five spent, and the median, 11 dollars, is close to what those four spent. Same data, two questions, two centers.
Center and spread for skewed data
Maxim’s region has 8 towns, with populations in thousands of 6, 4, 26, 3, 9, 5, 4, 7. Find the median and IQR, and the mean and MAD. Which pair should describe the towns?
SolutionSorted: 3, 4, 4, 5, 6, 7, 9, 26. The median is \displaystyle \frac{5 + 6}{2} = 5.5 thousand. The halves 3, 4, 4, 5 and 6, 7, 9, 26 give the Quartiles and the five number summary Q_1 = 4 and \displaystyle Q_3 = \frac{7 + 9}{2} = 8, so the IQR is 8 - 4 = 4 thousand.
The total is 64, so the mean is \displaystyle \frac{64}{8} = 8 thousand. The distances from 8 are 5, 4, 4, 3, 2, 1, 1, 18, which total 38, so the MAD is \displaystyle \frac{38}{8} = 4.75 thousand.
The 26 makes a long right tail. The mean is above six of the eight towns, and the city’s distance alone adds \displaystyle \frac{18}{8} = 2.25 to the MAD, though the other seven towns all lie between 3 and 9. Report the median and IQR: a typical town has about 5.5 thousand people, and the middle half of the towns lie between 4 and 8 thousand.
Making data to order
Give populations, in whole thousands of at least 1, for 7 towns with a median of 5 thousand and a mean of 8 thousand. Explain why any such data must stretch farther above the median than below it.
SolutionA mean of 8 over 7 towns needs a total of 56, and the median is the fourth value, 5. One answer: 3, 4, 5, 5, 6, 8, 25. Check: the fourth value is 5, and 3 + 4 + 5 + 5 + 6 + 8 + 25 = 56.
For any answer, the gap formula gives \displaystyle \frac{A - B}{7} = 8 - 5 = 3, so A - B = 21. The three values below the fourth lie between 1 and 5, so each is at most 4 below the median. The three above have distances totaling at least 21, so at least one is 7 or more above the median. The values reach at least 7 above the median and at most 4 below it: the start of a right tail. In the answer above, A = 1 + 3 + 20 = 24 and B = 2 + 1 = 3, and 24 - 3 = 21.
Boundaries
- “Usually” means usually. The pattern compares totals of distances, while skew is read from where the values thin out, and the two can disagree, most often with few values, many repeated values, or two clusters. Five 1s, nine 6s and one 20 are a rare exception, not the rule: they have a long tail to the right, yet the median is 6 and the mean, \displaystyle \frac{79}{15} or about 5.3, is below it. Look at the plot, not only the two numbers.
- A gap says the data leans, not why. One mistyped value can open the same gap as a real tail (Resistant and non resistant measures).
- Neither center is always right. The median cannot give a total, and the mean is a poor typical value for skewed data. A report may need both.
- Small data sets. With five or six values the shape is hard to call, and so is what the gap between the centers means.
- Two peaks. Both centers can fall in the gap between two clusters, where few values lie (Uniform and bimodal shapes).
Where this goes next
Describing a distribution puts shape, center, spread and unusual values together in one written description, with the choice made here, which center and which spread, at its middle. Comparing two distributions uses the same pairs to compare two groups. Later, Density curves: area, mean and median replace dot plots with smooth curves, and a long tail still pulls the mean toward it.
Exercises
Two centers and the shape
For each data set, find the mean and the median, and say how their order fits the shape.
- Nine towns, populations in thousands: 7, 2, 4, 3, 5, 18, 4, 6, 5.
- Seven films, box office takings in millions of dollars: 15, 22, 18, 3, 20, 19, 22.
- Ten strings of 12 fairy lights, with 12, 11, 12, 10, 4, 11, 12, 9, 11, 12 lights working.
- Nine films, running times in minutes: 118, 124, 121, 127, 115, 121, 124, 118, 121.
- Sixteen towns: 3 of 1 thousand people, 5 of 2 thousand, 4 of 3 thousand, 2 of 4 thousand, and one each of 9 and 22 thousand.
Choosing the center
- A studio’s six films took 8, 5, 11, 6, 70, 8 million dollars. (a) Which center, and what value, describes a typical film? (b) Which center times 6 gives the studio’s total takings?
- Five friends at a film festival spend 14, 16, 12, 18 and 40 dollars and split the total evenly. What does each pay? How short would they be if each paid the median?
- A guide book wants the population of a typical town in a region with one large city and many small towns. Mean or median? Explain.
- A fairy light maker knows the mean and the median number of working lights per string. To find how many working lights are in a box of 50 strings, which should it use? Explain.
- The running times of a cinema’s films are roughly symmetric. Does it matter much which center is reported? Explain.
Center and spread
- Eight towns have populations, in thousands, of 3, 5, 4, 6, 8, 7, 5, 34. Find the median and IQR, and the mean and MAD. Which pair describes these towns better?
- Eight films ran 96, 100, 98, 102, 104, 100, 98, 102 minutes. Find the mean and MAD, and the median and IQR. Which pair would you report?
- A report on the towns of Exercise 11 gives “median 5.5 thousand, MAD 6.25 thousand”. Why is that a poor pair?
From the centers back to the shape
- A data set has a mean of 4 and a median of 9. Which way does it most likely lean? What else could cause the gap?
- Twelve films took 240 million dollars in all, with a median of 11 million dollars. Find the mean. What does the comparison suggest?
- Seven towns have a median of 6 thousand. The distances above the median total 24 thousand and those below total 3 thousand. Find the mean.
- Give populations, in whole thousands, for 5 towns with a median of 4 thousand and a mean of 7 thousand.
- Give working-light counts for 5 strings of 20 lights with a median of 18 and a mean of 15.
Explaining
- Use the mean as a balance point to explain why, in data skewed right, the mean usually lies above the median.
- Explain why the mean and the median of an exactly symmetric data set are equal.
- True or false: “In data skewed right, the mean is always greater than the median.” Explain.
- True or false: “The median is always the better center, because one far value cannot move it.” Explain.
Answers
- Mean 6, median 5 thousand. Sorted: 2, 3, 4, 4, 5, 5, 6, 7, 18; total 54. One town trails off to 18, a right tail, and the mean is above the median.
- Mean 17, median 19 million dollars. Sorted: 3, 15, 18, 19, 20, 22, 22; total 119. One film at 3 makes a left tail, and the mean is below the median.
- Mean 10.4, median 11. Sorted: 4, 9, 10, 11, 11, 11, 12, 12, 12, 12; total 104. Crowded near the ceiling of 12 with a tail to 4: skewed left, mean below.
- Mean 121, median 121 minutes. Sorted: 115, 118, 118, 121, 121, 121, 124, 124, 127; total 1{,}089. The data is symmetric about 121, so the two agree.
- Mean 4, median 2.5 thousand. Total 3(1) + 5(2) + 4(3) + 2(4) + 9 + 22 = 64 over 16 towns. Running counts 3, 8, 12: the eighth value is 2 and the ninth 3. Right tail, mean above.
- (a) The median, 8 million dollars: sorted 5, 6, 8, 8, 11, 70. The 70 pulls the mean up to 18, above five of the six films. (b) The mean: 18 \times 6 = 108, the total.
- 20 dollars each, the mean of a total of 100. The median is 16, and 5 \times 16 = 80 is 20 dollars short.
- The median. The city skews the data right and pulls the mean above most towns; the median stays with the many small towns.
- The mean: the total is always the mean times 50. Working-light counts, with their ceiling, usually lean left, with the median above the mean, so the median times 50 would likely overcount.
- Little. In roughly symmetric data the two are close. The mean is the usual choice, since it uses every value and pairs with the MAD.
- Median 5.5, IQR 3; mean 9, MAD 6.25 thousand. Sorted: 3, 4, 5, 5, 6, 7, 8, 34, so Q_1 = 4.5 and Q_3 = 7.5. Total 72; distances from 9 total 50. The 34 makes a right tail and the mean is above seven of the eight towns, so the median and IQR are better.
- Mean 100, MAD 2; median 100, IQR 4 minutes. Total 800; distances from 100 total 16; halves 96, 98, 98, 100 and 100, 102, 102, 104. Symmetric about 100, so either pair works; the mean and MAD are usual.
- The MAD measures distances from the mean, 9, not from the median, and the 34 swells it. Beside the median it describes spread about a different center. Pair the median with the IQR.
- Most likely skewed left, a tail of small values pulling the mean down. A few very small outliers, or a value typed too small, could also do it; look at the data.
- 20 million dollars, since \displaystyle \frac{240}{12} = 20. The mean is far above the median, which suggests a long right tail: a few big hits.
- 9 thousand: \displaystyle 6 + \frac{24 - 3}{7} = 6 + 3 = 9.
- One answer: 2, 3, 4, 5, 21. Any list whose middle value, once sorted, is 4 and whose total is 35 works.
- One answer: 6, 14, 18, 18, 19: third value 18, total 75 = 5 \times 15, none above 20.
- The median splits the values into two halves of equal count. In data skewed right the upper half reaches far out, so the distances on the right total more than those on the left. The balance point must then sit right of the median: in the gap formula A > B, so the mean exceeds M.
- If the data is symmetric about c, the sorted list reads the same from both ends about c, so the median is c. Each value above c has a partner the same distance below, so A = B and the mean is c too.
- False: usually true, not always. Five 1s, nine 6s and one 20 have a long right tail and median 6, yet the mean is \displaystyle \frac{79}{15}, about 5.3. The five 1s give B = 25, which outweighs A = 14 from the 20, so the mean is below the median by \displaystyle \frac{25 - 14}{15} = \frac{11}{15}.
- False. For a typical value of skewed data the median is better, but only the mean gives a total (a shared bill, spare bulbs), and in roughly symmetric data the mean uses every value.