Three answers to where a data set sits, and the differences between them. The mean, which adds every value and divides, so that each observation pulls on it in proportion to its size; the median, which counts to the middle position and so uses only the order of the values; and the mode, the most frequent value, which can be doubled or absent and is the only one of the three defined for qualitative data. The section's real content is the choice between them: the median is generally the better measure of the centre when there are extreme values, because it is not affected by their precise numerical values, and the book's town of fifty earners makes the difference impossible to miss.
Subject: Statistics · 69 slides · symbolic lesson
Open the interactive version of this deck
Title
Statistics · Chapter 2 — Descriptive Statistics
Mean, median and mode: three answers to where the data sit, and how to choose
Objectives
A data set can hold hundreds of values. Very often you want one number that says where they sit: a typical income, a typical waiting time, a typical score. This section gives you three such numbers and, more importantly, the judgement to pick the right one.
The arithmetic in this section is easy: adding, dividing and counting. The marks are lost in the reasoning, in reporting a position instead of a value or a mean that describes nobody. Each of those slips has its own slide.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 98-103 — the section this deck covers
Warm-up
In Section 2.4 you drew a box-and-whisker plot for fifteen values, and its middle line was the median. Recall how you found it, and then try one new thing.
Discussion prompt
Example 2.25's fifteen ordered values are 10, 10, 10, 15, 35, 75, 90, 95, 100, 175, 420, 490, 515, 515, 790. Which value sits in the middle? Then add all fifteen and divide by fifteen. Which number better describes a typical value?
You have just computed both of the section's main measures of centre. Notice that they disagree by a lot. By the end of Part 3 you will be able to say exactly why, and which one to report.
Notice which number you trust more as typical. Ten of the fifteen values are 175 or less, so 223 is not where most of the data sit.
A first hint, from the box plot itself: its right whisker ran all the way out to 790 while the left one was short. The values are stretched out on the right, and the add-and-divide answer has followed them there. The middle value has not.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.4, p. 98 — Example 2.25
Section
Part 1
Concept
The centre of a data set is a way of describing its location. The book starts with fifty people and their weights, and gives two ways to name a centre for them.
The mean is the most common measure of the centre. The median is generally the better one when there are extreme values, because it is not affected by their precise numerical values. That sentence is the heart of the section, and Part 3 is devoted to it.
mean — The sum of the data values divided by the number of values. Also called the arithmetic mean or, in everyday speech, the average.
The words mean and average are used interchangeably in practice. The technical term is arithmetic mean. When a newspaper says average, it almost always means the mean, but not always, and that ambiguity is worth watching for.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 98-99 — the opening paragraph and the note on average
Concept
Here is the book's small sample of eleven values. Imagine each value as a pile of counters. The mean asks: if you pooled every counter and dealt them out evenly, how many would each value get?
\[ 1, \ 1, \ 1, \ 2, \ 2, \ 3, \ 4, \ 4, \ 4, \ 4, \ 4 \]
Pooling is adding. Dealing out evenly is dividing by how many values there are. In symbols, with the capital Greek sigma meaning add up all of these:
\[ \bar{x} = \frac{\sum x}{n} = \frac{\text{sum of the values}}{\text{number of values}} \]
Two consequences follow straight from the sharing picture. The mean always lies between the smallest and largest value, because sharing cannot make anyone richer than the richest. And the mean need not be one of the data values: an equal share of 30 among 11 is not a whole number.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the sample 1; 1; 1; 2; 2; 3; 4; 4; 4; 4; 4
Notation
Every symbol in the formula has a job. Hover over each piece before moving on: the rest of the section reuses them, and the grouped-data formula in Part 5 is the same sentence with two new letters.
Annotate
On: \( \bar{x} = \frac{\sum x}{n} \qquad \mu = \frac{\sum x}{N} \)
Read the formula aloud as a sentence: x bar equals the sum of the x values divided by how many there are. The two formulas do the same arithmetic. What differs is which data you have: a sample gets x bar, the whole population gets mu.
The letter in the denominator follows the same convention: a small n counts a sample, a capital N counts a population. When you write a mean on a test, the symbol is part of the answer. Writing mu for a sample's mean claims you measured everyone, which is almost never true.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — x̄ for the sample mean, μ for the population mean
Worked example
Find the mean of the sample 1, 1, 1, 2, 2, 3, 4, 4, 4, 4, 4. This is the first of the book's two ways: add every value, repeats included, then divide.
The plan is pool, then share. Count the values first, so you know what you will divide by, and keep every repeat in the sum: the five 4s are five separate observations.
Count the values
Why: there are eleven numbers in the list.
\[ n = 11 \]
Add the 1s and the 2s
Why: three ones and two twos.
\[ 1 + 1 + 1 + 2 + 2 = 7 \]
Add the 3 and the five 4s
Why: keep every repeat.
\[ 3 + 4 + 4 + 4 + 4 + 4 = 23 \]
Combine the two partial sums
Why: this is the whole pool.
\[ \sum x = 7 + 23 = 30 \]
Share it out
Why: divide the pool by the number of values.
\[ \bar{x} = \frac{30}{11} = 2.7272\ldots \approx 2.73 \]
In context: if these eleven values were counts of something, an equal share would be about 2.73 each. The book prints 2.7, rounded to one decimal place; 2.73 is the same number to two.
Check by multiplying back
Why: eleven equal shares of the mean must rebuild the pool.
\[ 11 \times \frac{30}{11} = 30 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the first calculation
Worked example
Now the book's second way. When values repeat, multiply each distinct value by its frequency, add those products, and divide by the total number of values.
Look at the blocks before the arithmetic. A column of five 4s is worth five times four: multiplying is just adding a whole column at once, so this route cannot give a different answer.
Figure (svg): Four columns of labelled blocks: three blocks marked 1, two marked 2, one marked 3 and five marked 4. Under each column its frequency and the product, 3 times 1 is 3, 2 times 2 is 4, 1 times 3 is 3, 5 times 4 is 20. On the right: 11 blocks in all, a total of 30, and 30 divided by 11 is about 2.73.
List the frequencies
Why: how often each distinct value occurs.
\[ f_1 = 3, \quad f_2 = 2, \quad f_3 = 1, \quad f_4 = 5 \]
Multiply each value by its frequency
Why: one product per column.
\[ 3(1) = 3, \quad 2(2) = 4, \quad 1(3) = 3, \quad 5(4) = 20 \]
Add the products
Why: the same pool as before.
\[ \sum fx = 3 + 4 + 3 + 20 = 30 \]
Add the frequencies
Why: the number of values, not the number of columns.
\[ \sum f = 3 + 2 + 1 + 5 = 11 \]
Divide
Why: pool over count.
\[ \bar{x} = \frac{\sum fx}{\sum f} = \frac{30}{11} \approx 2.73 \]
Why bother with a second method that gives the same answer? Because data often arrive already counted, as a frequency table, and then this is the only method available. With a thousand survey replies spread over five answers, you multiply five times and add, instead of adding a thousand numbers.
Check against the first method
Why: both routes must give the same pool and the same count, and they do: 30 over 11 either way.
\[ \frac{3(1) + 2(2) + 1(3) + 5(4)}{11} = \frac{1 + 1 + 1 + 2 + 2 + 3 + 4 + 4 + 4 + 4 + 4}{11} \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the second calculation, frequencies 3, 2, 1 and 5
Intuition
Sharing is one picture of the mean. Here is a second, which explains why one far-off value matters so much. Put each data value on a light beam as an equal weight.
Figure (svg): A dot plot of the eleven values 1, 1, 1, 2, 2, 3, 4, 4, 4, 4, 4 on a number line from 0 to 5: three dots stacked at 1, two at 2, one at 3 and five at 4. A yellow triangle under the line at 2.73 marks the point where the line would balance.
The beam balances at exactly one point, and that point is the mean. It is not the middle of the range, which would be 3, and it is not where most dots sit, which is 4. The three 1s out on the left have leverage, and they pull the balance point back to 2.73.
Leverage is the key word. A weight far from the pivot tips the beam more than the same weight close in. So a single value a long way out can drag the balance point a long way, which is exactly what happens to incomes in Part 3.
Check the picture against the arithmetic: 2.73 lies between the smallest value, 1, and the largest, 4, as every mean must.
Picture it
Why does the beam balance at the mean and nowhere else? Measure how far each value sits from the mean, with values on the left counting as negative and values on the right as positive. That distance is called a deviation.
Figure (svg): Four horizontal arrows starting from a dashed yellow line at the mean, 2.73. Two orange arrows point left to the values 1 and 2; two blue arrows point right to 3 and 4. Beside each arrow is its deviation times its frequency. The left pulls total minus 6.64 and the right pulls total plus 6.64.
The two 2s each sit 0.73 below the mean, the five 4s each sit 1.27 above it, and so on. Weighted by frequency, the left side adds to minus 6.64 and the right side to plus 6.64.
\[ \sum (x - \bar{x}) = -5.18 - 1.45 + 0.27 + 6.36 = 0 \]
This is true for every data set, not just this one: the deviations from the mean always add to zero. It is what balance means, and it is the reason the mean is so sensitive to a far-off value. Move one dot further out and its pull grows, so the balance point has to move to cancel it.
You will meet these deviations again in Section 2.7, where squaring them gives the standard deviation.
Concept
The same add-and-divide arithmetic gets two different symbols, depending on what you added up. The symbol tells your reader whether the number describes the data in hand or the whole group you care about.
\[ \bar{x} \text{ (sample mean)} \quad \longrightarrow \quad \text{estimates} \quad \mu \text{ (population mean)} \]
Usually the population mean is unknown. The mean weight of every adult in a country cannot be measured, so you weigh a sample and compute x bar, and use it as an estimate of mu.
A concrete case: the forty emergency-room patients on the coming slides are a sample of one week. Their mean age is x bar. The mean age of every emergency patient that hospital will ever see is mu, and this week's x bar is one estimate of it.
The book adds a condition that is easy to skim past: for the sample mean to be a good estimate of the population mean, the sample must be truly random. A sample of gym members tells you about gym members. No amount of careful arithmetic on a biased sample turns x bar into a good estimate of mu.
statistic — A number calculated from a sample, such as the sample mean, median or mode. A statistic estimates the matching number for the population, called a parameter.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 99 and 102 — x̄, μ, and the definition of a statistic
Trap
Using the frequency method on the eleven values, a first attempt divides by the number of columns:
\[ \frac{3(1) + 2(2) + 1(3) + 5(4)}{4} \]
\[ = \frac{30}{4} = 7.5 \]
Wrong. That is bigger than every value in the data.
The divisor counts observations, not distinct values. Eleven observations share the pool of 30, so divide by the sum of the frequencies.
\[ \sum f = 3 + 2 + 1 + 5 = 11 \]
\[ \bar{x} = \frac{30}{11} \approx 2.73 \]
The quick check: a mean must lie between the smallest and the largest value. An answer of 7.5 for data running from 1 to 4 cannot be right, whatever the arithmetic looked like.
The slip happens because the table has four rows, and four is the number staring at you. Write the sum of the frequencies as its own line every time; it costs one line and removes the trap.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — dividing the sum by the total number of data values
Prediction
A sample of 25 values has a mean of 40. A data-entry error is found: one value should have been 100 larger. Commit to an answer before reasoning it through.
Think in pools and shares. The correction adds 100 to the pool, and the pool is still shared among the same 25 values.
Predict first
What is the corrected mean?
Correct: 44
Why: The pool was 25 times 40, which is 1000. The correction makes it 1100, and 1100 shared among 25 is 44. Equivalently, the extra 100 is shared out, adding 100 over 25, which is 4, to every share.
\[ \frac{25(40) + 100}{25} = \frac{1100}{25} = 44 \qquad \text{or} \qquad 40 + \frac{100}{25} = 44 \]
The shortcut generalises: change one value by an amount d, and the mean changes by d divided by n. In a large sample one change barely moves the mean; in a small one it moves it a lot. And notice that the median might not move at all, which Part 3 makes precise.
Fill the middle
A sample has the value 2 three times, the value 5 twice, and the value 9 once. Fill in the products, the pool and the mean, using the frequency method from the blocks slide.
Fill in the blanks
\bar6 = \frac106 = \frac25 + 4.17 + 9}___} = \frac___}___ \approx ___
Why: Three twos make 6 and two fives make 10, so the pool is 6 plus 10 plus 9, which is 25. There are 3 plus 2 plus 1, six values, and 25 over 6 is about 4.17.
Check the size of your answer before moving on. The mean, about 4.17, lies between 2 and 9 as it must. It sits nearer 2 than 9 because half the values are 2s, and the single 9 has only one sixth of the weight.
If you divided by 3, the number of distinct values, you got 8.33, close to the largest value. That is the trap from two slides back, and the between-the-extremes check catches it every time.
Section
Part 2
Concept
The median is the middle of the data once the values are in order. Half the values lie at or below it and half at or above it. The book writes it with a capital M.
median — The number that separates the ordered data into two equal halves. With an odd number of values it is the middle value; with an even number it is the average of the two middle values.
Two things make the median different from the mean. First, you must order the data before you can find it; the middle of a list in the order it was written means nothing. Second, it uses only the order of the values, not their sizes.
\[ 1, \ 2, \ 3 \;\Rightarrow\; M = 2 \qquad 1, \ 2, \ 3000 \;\Rightarrow\; M = 2 \]
That second point is the important one. The median of 1, 2, 3 is 2, and so is the median of 1, 2, 3000. The largest value can grow without limit and the median will not notice, because it is still the largest, and still on the same side of the middle.
Compare the means of those two lists: 2 for the first and 1001 for the second. One value changed, and the mean moved by almost a thousand while the median did not move at all. Keep that pair of lists in mind; Part 3 is this example at the scale of a whole town.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 98-99 — the median and the letter M
Concept
Finding the middle of a short list is easy by eye. For forty or a hundred values you want a rule, and the book gives one: the location of the median in the ordered list.
\[ \text{location of the median} = \frac{n + 1}{2} \]
Figure (svg): Two rows of numbered boxes standing for ordered positions. The top row has 7 boxes and box 4 is highlighted yellow, with three boxes either side. The bottom row has 8 boxes; boxes 4 and 5 are highlighted, and an arrow points at the gap between them, labelled position 4.5.
With 7 values the location is 4: one middle value, three on each side. With 8 values the location is 4.5, which is not a whole number. That half means halfway between the 4th and 5th values, so you average those two.
\[ n = 97: \quad \frac{97 + 1}{2} = 49 \qquad n = 100: \quad \frac{100 + 1}{2} = 50.5 \]
These are the book's two examples. With 97 values the median is the 49th value. With 100 values it is midway between the 50th and 51st. Why n plus 1 and not n? Positions run from 1 to n, and their midpoint is 1 plus n over 2.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the location (n + 1)/2, with n = 97 and n = 100
Notation
The location formula is short, and it is misread more often than any other line in the section. Hover over each piece.
Annotate
On: \( \text{location} = \frac{n + 1}{2} \qquad M = \text{the value at that location} \)
The book puts it bluntly: the location of the median and the value of the median are not the same. The location for 40 values is 20.5, a place in a list. The median of forty ages is an age. The next two slides show both for the same forty patients.
One more reading tip. The formula gives a location only after the data are sorted, smallest to largest. Sorted the other way round you would reach the same middle, but a list in recorded order has no middle worth finding.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the location and the value are not the same
Worked example
A hospital administrator records the ages, in years, of forty patients visiting the emergency room over one week. The data are already sorted from smallest to largest. Calculate the mean.
Forty numbers is too many to add in one line without slipping. The plan is to add them in four rows of ten, check each row, and then combine: the same pool, built in pieces you can verify.
The book's own line groups the repeats instead, writing 8 times 2 for the two 8s and 44 times 2 for the two 44s: the frequency method again. Either grouping gives the same pool; choose whichever lets you check your work.
Count the values
Why: four rows of ten.
\[ n = 40 \]
Row one: the ten youngest
Why: 3 up to 15.
\[ 3 + 4 + 8 + 8 + 10 + 11 + 12 + 13 + 14 + 15 = 98 \]
Row two
Why: 15 up to 24.
\[ 15 + 16 + 16 + 17 + 17 + 18 + 21 + 22 + 22 + 24 = 188 \]
Row three
Why: 24 up to 32.
\[ 24 + 25 + 26 + 26 + 27 + 27 + 29 + 29 + 31 + 32 = 276 \]
Row four: the ten oldest
Why: 33 up to 47.
\[ 33 + 33 + 34 + 34 + 35 + 37 + 40 + 44 + 44 + 47 = 381 \]
Combine the rows
Why: the whole pool.
\[ \sum x = 98 + 188 + 276 + 381 = 943 \]
Divide by the count
Why: share the pool among forty patients.
\[ \bar{x} = \frac{943}{40} = 23.575 \approx 23.6 \text{ years} \]
Why one decimal place? The ages are whole numbers, and the usual rounding rule reports a mean to one more decimal place than the data. In context: the mean age of this week's emergency patients is about 23.6 years.
Check against the calculator
Why: the book's 1-Var Stats output gives the same mean, and 40 equal shares rebuild the pool.
\[ 40 \times 23.575 = 943 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 99-100 — Example 2.26 and the TI-83 output
Worked example
For the same forty emergency-room ages, find the median, M. The data are sorted, so the only work is to find the right position and read the value there.
Two separate questions: where in the list is the middle, and what age sits there? Answer them in that order, and keep the two answers apart.
Locate the median
Why: use the location formula with n = 40.
\[ \frac{n + 1}{2} = \frac{40 + 1}{2} = 20.5 \]
Read the location
Why: 20.5 means halfway between the 20th and 21st ordered values.
\[ x_{(20)} = 24, \qquad x_{(21)} = 24 \]
Average the two middle values
Why: both are 24.
\[ M = \frac{24 + 24}{2} = 24 \text{ years} \]
Figure (svg): A dot plot of forty patient ages from 3 to 47 years. Most dots sit between 10 and 35, at most two per age. A pink dashed line marks the mean at 23.6 and a yellow dashed line marks the median at 24; the two 24s are yellow.
In context: half of this week's emergency patients were 24 or younger, and half were 24 or older. The mean, 23.6, is almost the same, because the ages trail off about equally on both sides; neither end has a long tail to pull the mean away.
Check the split
Why: count the values on either side of position 20.5: twenty at positions 1 to 20 and twenty at positions 21 to 40, so M really does cut the list in half.
\[ 20 + 20 = 40 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 99-100 — Example 2.26: M = (24 + 24)/2 = 24
Picture it
Here are all forty ages laid out in order, one box per patient. Look at the two numbers the median calculation produced and ask what each one is a number of.
Figure (svg): Forty small boxes in a row holding the forty ordered ages, with position numbers 1, 10, 20, 21, 30 and 40 above them. Boxes 20 and 21 both hold 24 and are highlighted. An arrow points up to the gap between them, labelled location 20.5, and below it: value there, 24 years.
The location, 20.5, is measured in places along the list. It has no units and it does not depend on the ages at all: any forty values, sorted, have their median at location 20.5.
The median, 24, is measured in years. It is what you find when you go to that place and look. Change the ages and the median changes; change the number of patients and the location changes.
A habit that prevents the commonest error in this part: write the word location next to the first number and the units next to the second. A median with no units should make you suspicious.
Trap
For the forty emergency-room ages, a first attempt writes:
\[ M = \frac{40 + 1}{2} \]
\[ M = 20.5 \text{ years} \]
Wrong. 20.5 is a position, not an age.
The formula gives where to look. Go to positions 20 and 21 and read the ages there.
\[ \text{location} = 20.5 \]
\[ M = \frac{24 + 24}{2} = 24 \text{ years} \]
The sense check: 20.5 years lies between the 16th and 17th ages, 18 and 21, so only sixteen patients are younger. That is far from half of forty.
The two numbers are close here only by coincidence. For forty incomes, the location would still be 20.5 and the median might be 45,000 dollars.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the location of the median and the value of the median are not the same
Worked example
Thirty-nine patients' waits on a transplant list, in months, ordered from smallest to largest, run from 3 to 24. Calculate the mean and the median. The book prints no answer.
Same two jobs as Example 2.26. This time n is odd, so expect the location to be a whole number and the median to be one actual wait.
Count the values
Why: n is odd.
\[ n = 39 \]
Add every wait
Why: added in node and by rows; repeats included, such as five 10s and four 24s.
\[ \sum x = 544 \]
Divide for the mean
Why: share the pool among 39 patients.
\[ \bar{x} = \frac{544}{39} = 13.948\ldots \approx 13.9 \text{ months} \]
Locate the median
Why: odd n gives a whole-number location.
\[ \frac{39 + 1}{2} = 20 \]
Read the 20th wait
Why: count 20 places into the ordered list.
\[ M = x_{(20)} = 13 \text{ months} \]
Figure (svg): A dot plot of 39 waiting times from 3 to 24 months. Tall stacks at 7, 10 and 24 months. A yellow dashed line at 13 marks the median, the 20th value; a pink dashed line at 13.95 marks the mean.
In context: the typical patient waits about 13 months, half wait 13 months or less, and the mean wait is a little longer, almost 14. The four patients at 24 months and the cluster at 19 to 23 pull the mean slightly to the right of the median.
Check the split
Why: nineteen waits lie below 13 and nineteen above, with the 13 itself in the middle.
\[ 19 + 1 + 19 = 39 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — Try It 2.26
Step zero
Example 2.24 in Section 2.4 gave twenty test scores for a day class, in the order they were recorded: 99, 56, 78, 55.5, 32, 90, 80, 81, 56, 59, 45, 77, 84.5, 84, 70, 72, 68, 32, 79, 90.
Discussion prompt
You are asked for the median. What must you do before using the location formula, and what is the median once you have?
This is the move most often skipped, because the emergency-room data arrived already sorted and made the step invisible. Real data rarely do. Sorting first is step zero of every median.
The answer agrees with the five-number summary the book printed in Section 2.4, where the day class's median was 74.5: the middle line of its box plot.
Notice too that 74.5 is not a score anyone earned. With an even number of values the median is the average of two neighbours, so it can fall between the data, just as the mean usually does. Here ten students scored 72 or less and ten scored 77 or more.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.4, p. 97 — Example 2.24, M = 74.5
Matching
The location depends only on how many values there are. Match each sample size to where its median is found in the ordered list. Work out (n + 1)/2 for each, and decide whether it lands on a value or between two.
Match the pairs
Why: Add one and halve. An odd count gives a whole number, so the median is one value: 49th, 20th, 8th. An even count gives a half, so the median is the average of two neighbouring values: 50.5 and 20.5.
Notice that 39 and 40 give very different-looking locations, 20 and 20.5, for samples of nearly the same size. One extra value turns a single middle value into a pair. In both cases the median has the same number of values on each side.
Check any match by counting the sides. For 97 values, the 49th has 48 values before it and 48 after. For 100 values, the gap between the 50th and 51st has 50 values on each side. If the two sides are not equal, the location is wrong.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 99 — the location for n = 97 and n = 100
Error analysis
A student finds the median of the day class's twenty scores straight from the list as recorded, without sorting it. The location is right, and the answer is badly wrong.
Annotate
On: \( \frac{20 + 1}{2} = 10.5 \quad \Rightarrow \quad M = \frac{59 + 45}{2} = 52 \)
The error hides because every number in it is a real score and the arithmetic is right. The check that exposes it is the definition itself: count how many values lie below your median. If it is not about half, the median is wrong.
Here 32, 32, 45 and 55.5 are the only scores below 52: four out of twenty, a fifth of the class rather than half.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.4, p. 97 — Example 2.24's day-class scores
Section
Part 3
Prediction
In a small town of 50 people, one person earns 5,000,000 dollars a year and the other 49 each earn 30,000. Before any arithmetic, decide which number you would call the typical income here.
Predict first
Which measure better describes the centre of these incomes?
Correct: The median
Why: Forty-nine of the fifty incomes are 30,000, so the middle value is 30,000. The mean adds the five million into the pool and shares it out, landing at an income nobody in the town has.
Most people's instinct says 30,000, and the instinct is right. Hold on to the reason you gave, whether it was that most people earn it, or that the millionaire is unusual. The next slide puts numbers on both measures, and the slide after that turns your reason into a rule.
Be wary of the option saying no centre can be computed. Both measures can always be computed for numerical data; an outlier changes which one is worth reporting, not whether the arithmetic works.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — Example 2.27
Worked example
For the town of 50 people, one earning 5,000,000 and 49 earning 30,000 each, compute the mean and the median, and decide which is the better measure of the centre.
The frequency method fits perfectly: there are only two distinct values. For the median, n is even, so find the location first and then read off the two middle incomes.
Pool the 49 ordinary incomes
Why: value times frequency.
\[ 49(30{,}000) = 1{,}470{,}000 \]
Add the one large income
Why: the whole pool.
\[ \sum x = 5{,}000{,}000 + 1{,}470{,}000 = 6{,}470{,}000 \]
Share among fifty
Why: divide by the number of people.
\[ \bar{x} = \frac{6{,}470{,}000}{50} = 129{,}400 \]
Locate the median
Why: n = 50.
\[ \frac{50 + 1}{2} = 25.5 \]
Read the 25th and 26th incomes
Why: positions 1 to 49 all hold 30,000.
\[ M = \frac{30{,}000 + 30{,}000}{2} = 30{,}000 \]
Figure (svg): Two number lines. The top one runs from 0 to 5 million dollars: a tall thin bar of 49 people sits against zero at 30,000, and one dot sits alone at 5,000,000. The bottom one zooms into 0 to 200,000 dollars: the bar of 49 at 30,000 with the median line on it, and a pink dashed line at 129,400 labelled the mean, with nobody near it.
In context: the median says a typical resident earns 30,000 dollars, which describes 49 of the 50 people exactly. The mean says 129,400, more than four times what anyone but one person earns. The book's verdict: the median is the better measure of the centre, because 5,000,000 is an outlier.
Check the mean by its total
Why: fifty shares of the mean must rebuild the town's whole income.
\[ 50 \times 129{,}400 = 6{,}470{,}000 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — Example 2.27
Concept
Here is a test you can apply to any reported mean: count how many values lie on each side of it. For the town, the answer is striking.
\[ \text{incomes above } 129{,}400: \quad 1 \qquad \text{incomes below: } 49 \]
Forty-nine of fifty people earn less than the mean. Only one earns more. So the mean is not typical in any sense: it is not what most people earn, and it is not in the middle of the people. It is a balance point dragged into empty space.
Compare the median. By definition, at least half the people are at or below it and at least half at or above it. That is what you usually want from the word typical.
The mean is not useless here, though. It answers a different question: how much would each person get if the town's total income were shared equally? That is a real question, for a tax planner say, and only the mean answers it. The trouble is reporting it as if it described a typical resident.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — Example 2.27: the 30,000 gives a better sense of the middle
Picture it
Now suppose the millionaire's income doubles to 10,000,000 while everyone else stays at 30,000. Recompute both measures and compare.
\[ \bar{x} = \frac{10{,}000{,}000 + 49(30{,}000)}{50} = \frac{11{,}470{,}000}{50} = 229{,}400 \]
\[ M = 30{,}000 \quad \text{(positions 25 and 26 still hold 30,000)} \]
Figure (svg): A bar chart in thousands of dollars with two groups. Top earner at 5 million: mean bar 129.4, median bar 30. Top earner at 10 million: mean bar 229.4, median bar 30. The median bars are the same height.
The mean rose by exactly 100,000, which is the extra five million shared among fifty people. The median did not move at all. Nothing about any typical resident's life changed, and only the median reports that honestly.
You can predict the jump without recomputing anything: by the shortcut from Part 1, raising one value by five million raises the mean by five million divided by fifty.
\[ \frac{5{,}000{,}000}{50} = 100{,}000 \qquad 129{,}400 + 100{,}000 = 229{,}400 \]
This is the book's sentence made concrete: the median is not affected by the precise numerical value of the outlier. The millionaire could earn a billion and the median would still be 30,000, because the top value would still be on the top side of the middle.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 98 — the median is not affected by the precise values of outliers
Tweak it
Here is the town's mean as a function of the top earner's income, x, in thousands of dollars, with everyone else at 30 thousand. The parameter n is the town's size. The median stays at 30 for every setting.
Parameter explorer
With n at 50, read the mean when x is 5000 and when x is 10000. Then slide n up to 200 and read the mean at x = 5000 again. What does a bigger town do to the outlier's effect?
\[ \bar{x} = \frac{(n-1)(30) + x}{n} \text{ thousand}, \quad n = {n} \]
What to notice: the graph is a straight line. Every extra thousand dollars at the top adds one nth of a thousand to the mean, so in a town of 50 the mean climbs by 20 dollars for every 1000 the millionaire gains. Make the town ten people and it climbs by 100.
The median line, if it were drawn, would be flat at 30 for every x and every n of at least three. That flat line is resistance: the median ignores how far out the extreme value is.
Worked example
In a sample of 60 households, one house is worth 2,500,000 dollars, 29 houses are worth 280,000, and the other 30 are worth 315,000. Which is the better measure of the centre: the mean or the median? The book prints no answer.
Three distinct values, so the frequency method again. Before computing, check the frequencies: 1 plus 29 plus 30 must be 60.
Check the count
Why: every house accounted for.
\[ 1 + 29 + 30 = 60 \]
Pool the values
Why: value times frequency, then add.
\[ \sum x = 2{,}500{,}000 + 29(280{,}000) + 30(315{,}000) \]
Evaluate the products
Why: 29 times 280,000 and 30 times 315,000.
\[ \sum x = 2{,}500{,}000 + 8{,}120{,}000 + 9{,}450{,}000 = 20{,}070{,}000 \]
Share among sixty
Why: the mean.
\[ \bar{x} = \frac{20{,}070{,}000}{60} = 334{,}500 \]
Locate the median
Why: n = 60.
\[ \frac{60 + 1}{2} = 30.5 \]
Read positions 30 and 31
Why: positions 1 to 29 hold 280,000, so 30 to 59 hold 315,000.
\[ M = \frac{315{,}000 + 315{,}000}{2} = 315{,}000 \]
Figure (svg): A number line from 260,000 to 360,000 dollars, then a break, then 2,500,000. A bar of 29 homes stands at 280,000 and a bar of 30 homes at 315,000; one dot sits at 2,500,000. A yellow dashed line marks the median at 315,000 and a pink one marks the mean at 334,500, to the right of every ordinary home.
In context: the median says a typical home is worth 315,000 dollars, the value of the largest group. The mean, 334,500, is higher than every one of the 59 ordinary homes. The median is the better measure of the centre.
Check by removing the mansion
Why: if the mean is being dragged by one house, dropping it should move the mean a lot and the median not at all. The 30th of 59 values is still 315,000.
\[ \frac{20{,}070{,}000 - 2{,}500{,}000}{59} \approx 297{,}797, \qquad M = 315{,}000 \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — Try It 2.27
Counterexample
It is tempting to turn this part into a rule: if the data have extreme values, the mean and median will differ. Test the rule before you trust it.
Discussion prompt
Build a set of five values that includes values far from the rest, yet has its mean exactly equal to its median. What has to be true about the extreme values?
So the real rule is about shape, not about extreme values as such. An outlier on one side, or a long tail stretching one way, pulls the mean toward it and away from the median. Extremes balanced on both sides do not.
That is why the next section, 2.6, is about skewness: the direction of the tail tells you which way the mean has been pulled. For now, the safe habit is to compute both and look at the data before choosing.
Ranking
You have now met five data sets with both measures computed. Divide each mean by its median: a ratio near one means the two agree, and a large ratio means something has dragged the mean away. Rank them from least pulled to most pulled.
Put in order
Order the five data sets from the smallest mean-to-median ratio to the largest.
Why: The ratios are about 0.98, 1.01, 1.06, 2.35 and 4.31. The ages and the exam scores have no long tail, so their means and medians nearly agree. One mansion lifts the homes' mean by six percent; the long right whisker more than doubles Example 2.25's; and the millionaire makes the town's mean more than four times its median.
\[ \frac{23.575}{24} \approx 0.98, \quad \frac{73}{72} \approx 1.01, \quad \frac{334{,}500}{315{,}000} \approx 1.06 \]
\[ \frac{223}{95} \approx 2.35, \quad \frac{129{,}400}{30{,}000} \approx 4.31 \]
Why a ratio and not a difference? The data sets are in different units, years, points and dollars, so a difference of 19,500 dollars cannot be compared with a difference of one point. Dividing removes the units and measures the pull as a proportion of the typical value.
Notice the one ratio below one. The emergency-room mean sits just under its median, so if anything those ages trail off slightly more on the young side. Section 2.6 names this: the direction the mean has been pulled is the direction of the skew.
Trap
Asked for the town's total income, a first attempt reasons that the median is the better centre, so:
\[ 50 \times 30{,}000 \]
\[ = 1{,}500{,}000 \]
Wrong. That leaves out almost five million dollars.
The median describes a typical person. It does not carry the total, because it ignores how large the largest value is. A total needs the mean, since the mean is the total shared out.
\[ 50 \times 129{,}400 = 6{,}470{,}000 \]
Better for typical does not mean better for everything. Ask what the number will be used for: describing a typical member calls for the median; budgets, totals and fair shares call for the mean.
Many careful reports give both, the median for the typical case and the mean for the total, and say which is which.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — Example 2.27
Real world
Official statistics on household income and house prices are usually reported as medians. Sports salaries and company pay are often reported as means. The choice is rarely an accident.
Discussion prompt
A report says that the average salary at a company of 200 people rose by 8 percent this year, while the median salary did not change. What most likely happened, and would most employees feel better off?
Whenever you read an average, ask two questions. Which measure is it? And does the data have a long tail on one side? Incomes, house prices and waiting times almost always have a long right tail, so their means sit above what a typical person sees.
The homework asks you to find a real figure reported as an average and decide which measure it is. Look for the words median or mean in the small print; if neither appears, the writer probably means the mean, and you should ask what a long tail would do to it.
OpenStax Introductory Business Statistics 2e, §2.3 Measures of the Center of the Data §2.3 Measures of the Center of the Data — the same ideas in business contexts
Section
Part 4
Concept
The third measure of centre is the simplest: the value that occurs most often. Unlike the mean and the median, it does not need any arithmetic at all, only counting.
mode — The most frequent value in a data set. There can be more than one mode, as long as those values share the same, highest, frequency.
If two values tie for the highest frequency, both are modes and the data set is called bimodal. If every value occurs exactly once, every value ties, and the mode is not a useful summary; many texts say such data have no mode.
\[ \text{bimodal: } 430, 430, 480, 480, 495 \quad \Rightarrow \quad \text{modes } 430 \text{ and } 480 \]
Unlike the mean, the mode is always one of the data values; unlike the median, it does not need the data in order. That is why it alone survives for categories, as a slide later in this part shows.
The mode answers a different question from the other two. The mean asks what an equal share is; the median asks what the middle value is; the mode asks what happens most often. Which question you are asking decides which measure you want.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 100 — the mode and bimodal data
Worked example
Statistics exam scores for 20 students are 50, 53, 59, 59, 63, 63, 72, 72, 72, 72, 72, 76, 78, 81, 83, 84, 84, 84, 90, 93. Find the mode.
The scores are already in order, so equal values sit side by side. Count the length of each run of repeats and pick the longest.
List the repeated scores
Why: every other score occurs once.
\[ 59: 2, \quad 63: 2, \quad 72: 5, \quad 84: 3 \]
Pick the highest frequency
Why: five beats three and two.
\[ \text{Mode} = 72 \quad (\text{five times}) \]
Figure (svg): A dot plot of twenty exam scores from 50 to 93. The tallest stack, five yellow dots, is at 72. A stack of three sits at 84 and stacks of two at 59 and 63. A pink dashed line marks the mean at 73.
Compare with the median
Why: n = 20, location 10.5, and the 10th and 11th scores are both 72.
\[ M = \frac{72 + 72}{2} = 72 \]
In context: the most common score in this class was 72, and it is also the middle score. The three measures agree closely here, because the scores pile up near the middle with no long tail on one side.
Check the frequencies add up
Why: all twenty scores must be counted: eight scores that occur once, plus the four runs.
\[ 8 + 2 + 2 + 5 + 3 = 20 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 100-101 — Example 2.28
Estimation
Look back at the dot plot of the twenty exam scores. The mode and the median are both 72. Before adding anything, estimate where the balance point lies.
Use the beam picture from Part 1. Ask whether the dots on the left of 72 sit further out, or more of them, than the dots on the right. The balance point moves toward whichever side has more leverage.
Predict first
Roughly where is the mean of the twenty exam scores?
Correct: About 73, just above 72
Why: The scores below 72 stretch down to 50 and the scores above stretch up to 93, a similar spread on each side, so the balance point should land very near the middle. The sum is 1460, and 1460 over 20 is 73.
\[ \bar{x} = \frac{1460}{20} = 73 \]
The mean lands one point above the median. Six scores sit below 72 and nine above, and the high scores, 84 to 93, pull slightly more than the low ones. Being able to estimate a mean from a picture is a useful check on any calculation: a computed mean far from your estimate means a slip somewhere.
Exactly 72 would be a coincidence. The three measures agree only when the data are perfectly balanced around one peak, which real data almost never are.
Worked example
The numbers of books checked out by 25 students are 0, 0, 0, 1, 2, 3, 3, 4, 4, 5, 5, 7, 7, 7, 7, 8, 8, 8, 9, 10, 10, 11, 11, 12, 12. Find the mode. The book prints no answer.
Same method: the data are ordered, so count each run of equal values. With this many repeats it is worth writing the frequencies out rather than trusting your eye.
Count the runs of three or more
Why: the only serious candidates.
\[ 0: 3, \quad 7: 4, \quad 8: 3 \]
Check the rest
Why: every other value occurs once or twice.
\[ 3, 4, 5, 10, 11, 12: \text{ twice each}; \quad 1, 2, 9: \text{ once} \]
Pick the highest frequency
Why: four beats three.
\[ \text{Mode} = 7 \text{ books} \]
Figure (svg): A dot plot of 25 students' numbers of library books, 0 to 12. The tallest stack, four yellow dots, is at 7. Stacks of three sit at 0 and 8. Nothing at 6.
In context: the most common number of books checked out was seven. Three students borrowed nothing, and three borrowed eight, so the mode won by a single student. A mode decided by one observation is fragile: one more student with no books would make the data bimodal.
Check every student is counted
Why: frequencies must add to 25.
\[ 3 + 1 + 1 + 2 + 2 + 2 + 4 + 3 + 1 + 2 + 2 + 2 = 25 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — Try It 2.28
Worked example
Five real estate exam scores are 430, 430, 480, 480, 495. Five credit scores are 680, 680, 700, 720, 720. Find the modes of each, and compare them with the mean and median.
When two values tie for the highest frequency, report both. Then compute the other two measures to see how a bimodal shape relates to the centre.
Real estate: count repeats
Why: 430 twice, 480 twice, 495 once.
\[ \text{modes: } 430 \text{ and } 480 \quad (\text{bimodal}) \]
Real estate: mean and median
Why: five values, location 3.
\[ \bar{x} = \frac{2315}{5} = 463, \qquad M = 480 \]
Credit scores: count repeats
Why: 680 twice, 720 twice, 700 once.
\[ \text{modes: } 680 \text{ and } 720 \quad (\text{bimodal}) \]
Credit scores: mean and median
Why: symmetric data.
\[ \bar{x} = \frac{3500}{5} = 700, \qquad M = 700 \]
Figure (svg): Two small dot plots. Left: real estate exam scores 430, 430, 480, 480, 495, with yellow stacks of two at 430 and 480. Right: credit scores 680, 680, 700, 720, 720, with yellow stacks of two at 680 and 720.
For the real estate scores the three measures pull apart: modes 430 and 480, median 480, mean 463. The two low scores of 430 drag the mean below the median, but not as far as the lower mode. Five values is a small sample, so no measure is very stable here.
In context: for the credit scores, the mean and median, 700, sit between the two modes, and only one person actually scored 700. Bimodal data often mean two different groups mixed together, and then a single centre can describe neither group.
Check the sums
Why: add the five values directly.
\[ 430 + 430 + 480 + 480 + 495 = 2315, \quad 680 + 680 + 700 + 720 + 720 = 3500 \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — Example 2.29 and Try It 2.29
Concept
The book's note: the mode can be calculated for qualitative data as well as quantitative data. Take nine colours: red, red, red, green, green, yellow, purple, black, blue.
Figure (svg): A bar chart of nine colours: red 3, green 2, and yellow, purple, black and blue 1 each. Each bar is drawn in its own colour. The red bar is tallest, labelled mode: red.
You can count colours, so you can find the most frequent one: red, three times. That is the mode.
You cannot add red to green, so there is no mean colour. And colours have no natural order, so there is no middle colour either and no median. For categorical data the mode is the only one of the three measures that exists at all.
This links back to Section 1.2, where you sorted variables into qualitative and quantitative. That classification now decides which measures of centre are even allowed: all three for numbers, only the mode for categories.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — the note on qualitative data
Concept
When is the mode the best measure of the centre? The book's example: a weight-loss programme advertises a mean loss of six pounds in the first week. The mode might show that most people lose two pounds, making the programme less appealing.
The book gives no data, so here are twenty invented clients chosen to match that sentence: eight lost 2 pounds, a few lost almost nothing, and a few lost a great deal.
Figure (svg): A dot plot of twenty invented clients' first-week weight loss from 0 to 20 pounds. A tall yellow stack of eight dots at 2 pounds, a scatter of single dots out to 20. A pink dashed line marks the mean at 6 pounds.
\[ \bar{x} = \frac{120}{20} = 6, \qquad M = \frac{2 + 3}{2} = 2.5, \qquad \text{mode} = 2 \]
All three numbers are true. But a prospective client asking what will probably happen to me is asking a mode question, and the answer is two pounds. The mean of six is propped up by four clients who lost twelve to twenty pounds.
So when the question is about the most likely single outcome, or the most common category, or the size to stock most of, the mode is the honest answer.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — the weight-loss programme
Trap
For Example 2.28's exam scores, a first attempt finds the longest run of repeats and writes:
\[ \text{72 occurs 5 times} \]
\[ \text{Mode} = 5 \]
Wrong. Five is a frequency, not a score.
The mode is a data value: the score that occurs most often. Its frequency is how you find it, not what you report.
\[ \text{Mode} = 72 \]
The units check catches it: the mode of exam scores is a score, between 50 and 93 here. No student scored 5. With categorical data the slip is even more obvious, since the mode of colours must be a colour.
A complete answer gives both: the mode is 72, which occurs five times.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — Example 2.28: Mode = 72
Socratic
Annual earnings of 301 workers at a factory: the mode is 25,000 dollars and occurs 150 times; the median is 50,000; the mean is 47,500. The book asks which is the best measure of the centre and prints no answer.
Discussion prompt
What does the median tell you about the 151 workers who do not earn 25,000? And given that, which single number would you report, if you had to choose one?
This is the bimodal lesson again in a new form. When data come from two different groups, any single centre misleads someone. The best report names the groups.
Notice how much you learned from three numbers without seeing any data. The median pinned down where the low-paid group ends; the mean then fixed the upper group's average. Reading measures of centre against each other is a skill in its own right.
Notice also that the mean, 47,500, is below the median here, the reverse of the town. The large group at the bottom pulls the balance point down, while the median sits on the first worker of the upper group.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — Try It 2.29
Sorting
Each question below is best answered by one measure. Sort them. Ask first whether the data are categories or numbers, then whether the question is about a typical value, a total or fair share, or the most common outcome.
Sort into buckets
Sort each question by the measure of centre that answers it best.
Notice that the shoe question has numerical data and still wants the mode. A mean shoe size of 9.37 is not a size anyone can buy. The choice of measure follows the question being asked, not only the type of data.
The rainfall question shows the other side: daily rainfall has a long tail, with many dry days and a few storms, but a total needs the mean anyway.
Section
Part 5
Worked example
Thirty randomly selected students were asked how many movies they watched the previous week. The relative frequencies were 5/30 for 0 movies, 15/30 for 1, 6/30 for 2, 3/30 for 3 and 1/30 for 4. Find the mean, median and mode.
A relative frequency is a frequency divided by n, so the division is already done. Multiply each value by its relative frequency and add: that is the frequency method with the dividing built in.
Check the relative frequencies
Why: they must add to one, every student counted once.
\[ \frac{5 + 15 + 6 + 3 + 1}{30} = \frac{30}{30} = 1 \]
Weight each value by its relative frequency
Why: value times share.
\[ \bar{x} = 0\left(\tfrac{5}{30}\right) + 1\left(\tfrac{15}{30}\right) + 2\left(\tfrac{6}{30}\right) + 3\left(\tfrac{3}{30}\right) + 4\left(\tfrac{1}{30}\right) \]
Add the numerators
Why: all over 30.
\[ \bar{x} = \frac{0 + 15 + 12 + 9 + 4}{30} = \frac{40}{30} \approx 1.33 \text{ movies} \]
Locate the median
Why: n = 30, location 15.5; the 0s fill positions 1 to 5 and the 1s fill 6 to 20.
\[ M = \frac{1 + 1}{2} = 1, \qquad \text{mode} = 1 \]
Figure (svg): A bar chart of relative frequencies for the number of movies watched by thirty students: 0 movies 5/30, 1 movie 15/30, 2 movies 6/30, 3 movies 3/30, 4 movies 1/30. A yellow marker under the axis at 1.33 marks the mean.
In context: these students watched about 1.33 movies each on average; the typical and the most common student watched one. The mean sits to the right of the median and mode because a few students watched three or four.
Check with plain frequencies
Why: convert back to counts: 5 students times 0, 15 times 1, 6 times 2, 3 times 3, 1 times 4.
\[ \frac{5(0) + 15(1) + 6(2) + 3(3) + 1(4)}{30} = \frac{40}{30} \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 101-102 — Table 2.25
Concept
The movie table came from one sample of thirty students. The book uses it to introduce an idea that the whole second half of the course depends on.
Take another random sample of thirty students and you will get a slightly different table and a slightly different mean, perhaps 1.2 or 1.5. The sample mean is a statistic: a number calculated from a sample, which changes from sample to sample.
sampling distribution — The distribution of a statistic, such as the sample mean, over a great many samples of the same size. Think of it as a relative frequency table of the statistic itself.
Let the number of samples become very large, the book says 300 million or more, and the relative frequency table of the sample means becomes a relative frequency distribution. That is the sampling distribution.
Keep the two levels apart. The movie table describes thirty students, one sample. A sampling distribution describes the sample means of millions of such samples. The first is data; the second is a picture of how a statistic behaves.
Why should you care now? Because it is how statisticians judge whether one sample's mean is trustworthy. If the sample means from many samples crowd tightly around mu, one sample's x bar is a good estimate. Chapter 7 measures exactly how tightly.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 102 — sampling distributions and statistics
Concept
Sometimes you never see the individual values. A report gives only intervals and how many values fell in each, like a histogram's bars. Then you cannot compute the exact mean, because you do not know what to add up.
What you can do is estimate. Assume every value in an interval sits at that interval's midpoint, halfway between its boundaries:
\[ m = \frac{\text{lower boundary} + \text{upper boundary}}{2} \]
Each midpoint then stands in for every value in its interval, so the frequency method applies with m in place of x. Here is Professor Blount's last statistics test, nineteen scores in eight intervals.
Figure (svg): A histogram of nineteen test scores in eight intervals from 50 to 98.5: heights 1, 0, 4, 4, 2, 3, 4, 1. A yellow dot sits at the middle of the top of each bar, the midpoint that stands in for every score in that bar. A pink dashed line marks the estimated mean, 76.86.
Look at the yellow dots: each sits at the centre of its bar, holding the whole bar's weight. The estimate is good when values inside each interval are spread fairly evenly around its midpoint, which is often roughly true and never guaranteed.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 102 — calculating the mean of grouped frequency tables
Notation
The grouped formula is the frequency formula from Part 1 with one change: the midpoint m replaces the exact value x. Hover over each piece.
Annotate
On: \( \text{Mean of frequency table} = \frac{\sum fm}{\sum f} \)
Read it as before: estimated pool over count. Everything you learned about the frequency method carries over, including its main trap, dividing by the number of rows instead of the number of values. The result is an estimate, so say so when you report it.
Compare the three versions side by side. Raw data: the sum of x over n. A frequency table: the sum of f times x over the sum of f. Grouped data: the sum of f times m over the sum of f. Only the third is approximate, and only because m is a stand-in for values you were never shown.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 102 — Mean of Frequency Table = Σfm / Σf
Worked example
A frequency table shows Professor Blount's last statistics test: intervals 50 to 56.5, 56.5 to 62.5, and so on up to 92.5 to 98.5, with 1, 0, 4, 4, 2, 3, 4 and 1 students. Find the best estimate of the class mean.
Three stages: midpoints, then products, then divide. The first interval is 6.5 wide and the rest are 6, so compute every midpoint from its own boundaries rather than adding 6 each time.
First midpoint
Why: the odd-width interval.
\[ \frac{50 + 56.5}{2} = 53.25 \]
The other midpoints
Why: each interval is 6 wide, so they step by 6.
\[ 59.5, \ 65.5, \ 71.5, \ 77.5, \ 83.5, \ 89.5, \ 95.5 \]
Multiply each midpoint by its frequency
Why: frequencies 1, 0, 4, 4, 2, 3, 4, 1.
\[ 53.25 + 0 + 262 + 286 + 155 + 250.5 + 358 + 95.5 \]
Add the products
Why: the estimated pool of all nineteen scores.
\[ \sum fm = 1460.25 \]
Add the frequencies
Why: the number of students.
\[ \sum f = 1 + 0 + 4 + 4 + 2 + 3 + 4 + 1 = 19 \]
Divide
Why: estimated pool over count.
\[ \frac{\sum fm}{\sum f} = \frac{1460.25}{19} = 76.855\ldots \approx 76.86 \]
In context: the best estimate of the class's mean score is about 76.9. The book writes this as mu, treating Blount's class as the whole population of interest; if the class were a sample of all his students, x bar would be the right symbol.
Check the estimate's size
Why: it must lie between the first midpoint and the last, and near where most bars are.
\[ 53.25 < 76.86 < 95.5 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 102-103 — Example 2.30, Tables 2.26 and 2.27
Intuition
The grouped mean rests on an assumption. How much could it be wrong by? You can find out exactly, by pushing the assumption to its two extremes.
Lowest possible: every student scored at the bottom of their interval. Replace each midpoint with the lower boundary:
\[ 1(50) + 4(62.5) + 4(68.5) + 2(74.5) + 3(80.5) + 4(86.5) + 1(92.5) = 1403 \]
\[ \frac{1403}{19} \approx 73.84 \]
Highest possible: every student scored at the top of their interval:
\[ 1(56.5) + 4(68.5) + 4(74.5) + 2(80.5) + 3(86.5) + 4(92.5) + 1(98.5) = 1517.5 \]
\[ \frac{1517.5}{19} \approx 79.87 \]
Figure (svg): A number line from 72 to 82. A blue band runs from 73.84 to 79.87, labelled lowest possible and highest possible mean. A pink dashed line inside it at 76.86 marks the midpoint estimate.
Both bounds use the same frequencies and the same divisor, 19. The only change is which point in each interval stands in for its values. The interval widths, 6 or 6.5 points, set how far apart the two bounds can be.
So the true mean is somewhere between about 73.8 and 79.9, and the midpoint estimate, 76.86, sits in the middle of that band. Wider intervals make a wider band. That is the price of grouping: you trade detail for a compact table, and the mean you get back is only as precise as the intervals allow.
Worked example
A researcher studying video games and memory recall recorded weekly gaming hours for teenagers: 0 to 3.5 hours, 3 teens; 3.5 to 7.5, 7; 7.5 to 11.5, 12; 11.5 to 15.5, 7; 15.5 to 19.5, 9. Find the best estimate of the mean. The book prints no answer.
Same three stages. Watch the first interval again: it is 3.5 hours wide while the others are 4, so its midpoint is not where the pattern of the others would put it.
Midpoints
Why: halfway between each pair of boundaries.
\[ 1.75, \ 5.5, \ 9.5, \ 13.5, \ 17.5 \]
Products
Why: frequencies 3, 7, 12, 7, 9.
\[ 3(1.75) + 7(5.5) + 12(9.5) + 7(13.5) + 9(17.5) \]
Evaluate each product
Why: one at a time.
\[ 5.25 + 38.5 + 114 + 94.5 + 157.5 \]
Add them
Why: the estimated total hours.
\[ \sum fm = 409.75 \]
Count the teenagers
Why: add the frequencies.
\[ \sum f = 3 + 7 + 12 + 7 + 9 = 38 \]
Divide
Why: estimated total over count.
\[ \frac{409.75}{38} = 10.782\ldots \approx 10.78 \text{ hours} \]
Figure (svg): A histogram of 38 teenagers' weekly hours of video games in five intervals: 0 to 3.5 has 3, 3.5 to 7.5 has 7, 7.5 to 11.5 has 12, 11.5 to 15.5 has 7 and 15.5 to 19.5 has 9. Yellow dots mark the midpoints 1.75, 5.5, 9.5, 13.5 and 17.5. A pink dashed line marks the estimated mean, 10.78 hours.
In context: the best estimate is that these teenagers spend about 10.8 hours a week on video games. The nine teens in the top interval pull the estimate a little above the middle interval's midpoint of 9.5.
Check against the bars
Why: the estimate must sit inside the tallest middle region and between the first and last midpoints.
\[ 1.75 < 10.78 < 17.5, \quad 7.5 < 10.78 < 11.5 \quad \checkmark \]
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 103-104 — Try It 2.30, Table 2.28
Trap
For Blount's test, a first attempt divides the products by the number of rows in the table:
\[ \frac{1460.25}{8} \]
\[ = 182.5 \]
Wrong. No score on the test was above 98.5.
The divisor is how many values were pooled: nineteen students, the sum of the frequencies. Eight is how many rows the table happened to have.
\[ \frac{1460.25}{19} \approx 76.86 \]
The same between-the-extremes check from Part 1 catches it at once: a mean must lie inside the data's range, here 50 to 98.5. An average of the eight midpoints, ignoring frequencies, is also wrong, since it gives the empty interval as much weight as a full one.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 103 — Example 2.30
Concept
The book closes its discussion of the mean with a law that justifies using x bar at all. Here it is in the book's words, with a picture of it happening.
The Law of Large Numbers says that if you take samples of larger and larger size from any population, then the mean of the sample is very likely to get closer and closer to mu.
Figure (svg): Three running means of simulated fair-die rolls, plotted against the number of rolls on a scale from 1 to 1,000 that stretches the early rolls. Early on the three curves swing between about 1.5 and 5.5; by 1,000 rolls they sit at 3.40, 3.50, 3.36, all close to the dashed line at 3.5.
Each curve is one long run of rolls of a fair die, whose population mean is 3.5. After a handful of rolls the running means are all over the place. After a thousand rolls the three runs sit at 3.40, 3.50, 3.36, all within about a tenth of 3.5.
This is why bigger samples are worth paying for. A sample of ten can land far from the truth by bad luck; a sample of a thousand very rarely does. The law does not say how big is big enough. Chapter 7 answers that, by measuring how fast the wandering shrinks.
Two words in the law matter. Very likely: a large sample is not guaranteed to be close, only almost certain to be. And the sample must be random, the condition from Part 1. A huge biased sample closes in on the wrong number.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, p. 101 — the Law of Large Numbers and the mean
Prediction
A fair die is rolled ten times and, by luck, the ten rolls average 5. It is then rolled another 1,000 times. Commit to an answer about what happens next.
Predict first
What happens to the running mean over the next thousand rolls?
Correct: It drifts toward 3.5, because the new rolls swamp the first ten
Why: The die has no memory, so the next thousand rolls average about 3.5 on their own. The ten early rolls are not cancelled out; they are diluted. The running mean comes out near 3.51.
\[ \frac{10(5) + 1000(3.5)}{1010} = \frac{3550}{1010} \approx 3.51 \]
The belief that low rolls become due is the gambler's fallacy. The Law of Large Numbers does not work by correcting the past; it works by drowning it. Ten unusual rolls stay in the pool for ever, but a thousand ordinary ones make them almost irrelevant to the mean.
That is the same arithmetic as the town of fifty and the slider: one value's effect on the mean shrinks as n grows, because each value's share of the pool shrinks.
Section
Part 6
Pattern
Every question in this section ran through the same short sequence of decisions. The arithmetic is the easy part; the choices come first.
Figure (svg): A flow diagram. Start: are the data categories or numbers? Categories lead to a box: mode only. Numbers lead to a question: is there an extreme value or a long tail? Yes leads to: report the median. No leads to: the mean, with the median close to it. A side box says: asking what happens most often? the mode.
Use the diagram as a checklist. The first branch, categories or numbers, removes two measures at once for qualitative data. The second branch, the shape, is the one most often skipped: look at a dot plot or histogram before choosing.
Most wrong answers in this section are right calculations of the wrong thing: a location reported as a median, a frequency reported as a mode, a divisor that counts rows instead of values. Each has a one-line check, and the list puts each check where it belongs.
When in doubt, compute all three and compare them. If the mean and median nearly agree, either will do and the mean is conventional. If they disagree a lot, the disagreement itself is information: something is pulling the mean, and your report should say what.
Comparison
Fill in the blanks. Each row is a property; each column a measure. Several cells are worth arguing about before you type.
Comparison matrix
| property | mean | median | mode |
|---|---|---|---|
| how to find it | add, divide by n | sort, go to (n + 1)/2 | most frequent |
| moved by one extreme value? | yes | no | no |
| works for categories? | no | no | yes |
| always one of the data values? | no | no (n even) | yes |
| town of fifty | 129,400 | 30000 | 30,000 |
Read the table by rows. The mean is the only measure that uses every value's size, which is why it carries totals, and also why one extreme value can drag it anywhere. The median and mode only use order and counts, which makes them resistant.
Resistant is the technical word for a measure that an extreme value cannot drag far. The median and mode are resistant; the mean is not. Resistance is a strength when there are outliers and a weakness when you need the size of every value to count, as in a total.
The always-a-data-value row is subtle. The mode always is one. The median is one when n is odd, and may not be when n is even. The mean usually is not, as the eleven values' 2.73 showed.
Check
Use the frequency method, and check that your answer lies between the smallest and largest values.
Before choosing, write the pool and the count separately. Most wrong options come from one of those two being wrong.
Check your understanding
A sample has the value 1 twice, the value 3 five times, and the value 6 three times. What is the sample mean?
Answer: A
Why: The pool is 2 times 1 plus 5 times 3 plus 3 times 6, which is 2 plus 15 plus 18, or 35. There are 2 plus 5 plus 3, ten values, so the mean is 35 over 10, which is 3.5.
In context: an equal share of the pool is 3.5. The answer lies between 1 and 6, and a little above 3 because the three 6s outweigh the two 1s. The divide-by-distinct-values option fails the between-the-extremes check at once.
The unweighted option is the subtler slip, because 3.33 looks perfectly plausible. It treats the three distinct values as if each occurred once. Only writing the frequencies into the sum protects you from it.
Notice also that the median of these ten values is 3, the same as the mode: position 5.5 sits inside the run of five 3s. Three different answers to where the centre is, all defensible, which is why the question must name the measure.
Check
Separate the location from the value before you answer.
Compute (n + 1)/2, then decide whether that is a single position or halfway between two.
Check your understanding
A sorted list holds 50 values. Which statement about its median is correct?
Answer: C
Why: The location is 50 plus 1 over 2, which is 25.5. A location ending in a half means halfway between two positions, so the median is the average of the 25th and 26th ordered values.
In context: whatever the 50 values measure, the median is in those units and sits between the two middle values. If the 25th and 26th values happen to be equal, the median equals both of them, as with the two 24s in the emergency room.
Each wrong option is a real slip. Reporting 25.5 confuses where with what. Choosing the 25th or the 26th value alone forgets that an even count has no single middle; count the values on each side of your choice and the imbalance shows at once.
Check
Look for the shape of the data before choosing.
Ask what a typical value is meant to describe, and whether any value is far from the rest.
Check your understanding
A city reports house sale prices for the year. Most homes sold for between 200,000 and 400,000 dollars, but a few estates sold for over 20 million. Which measure best describes a typical sale price?
Answer: A
Why: A few sales far above the rest form a long right tail. The mean shares those huge prices out across every sale and lands above most homes. The median depends only on order, so the estates cannot move it.
In context: report the median sale price, and if anyone needs the city's total sales, use the mean times the number of sales. This is why official house-price figures are almost always medians.
The midpoint-of-the-extremes option deserves a word, because it sounds like a centre. Halfway between the cheapest and dearest sale depends on only two houses, and here one of them is a 20-million-dollar estate, so the midpoint would be around ten million: a price almost nobody paid.
Explain it to yourself
This is the homework's transfer question, and a good test of whether the difference between the mean and the median has landed.
Discussion prompt
Explain, to someone who has not studied statistics, why a rise in mean income with an unchanged median does not mean most people are better off.
Before writing, decide what each measure would show if every worker got the same raise of 1,000 dollars: both the mean and the median would rise by 1,000. An unchanged median rules that story out.
A strong answer uses two pictures: the median as a person in the middle of a queue, the mean as a pool shared out. A very strong one adds the town of fifty, where doubling one income raised the mean by 100,000 and left the median at 30,000.
If your explanation used the word average, check which average you meant each time. Being precise about that word is half the skill this section teaches.
Exit ticket
Six people's commutes, in minutes, are 12, 15, 15, 18, 22 and 60. Find all three measures of centre, and say which you would report as a typical commute.
Discussion prompt
Find the mean, the median and the mode of the six commute times, and choose which one to report as typical, with a reason.
If you reported 3.5 minutes as the median, you reported the location: go to positions 3 and 4 and read 15 and 18. If you divided the sum by something other than 6, re-count the values. The mode, 15, is real but based on just two people.
Sort first, even though this list happens to be in order already: with six values the location is 3.5, so the median is halfway between the third and fourth commutes.
Count how many commutes exceed the mean, the test from Part 3: only one of six does. A mean that only one value beats is not describing the typical case.
Recap
A measure of centre is one number that says where the data sit. There are three, they answer different questions, and choosing between them is the real skill of this section.
| measure | how to find it | use it when |
|---|---|---|
| mean x̄ (sample), μ (population) | Σx/n; by frequency Σfx/Σf | the data are roughly symmetric, or you need a total or fair share |
| median M | sort; location (n + 1)/2; read the value | there are extreme values or a long tail |
| mode | the most frequent value; can be bimodal | the data are categories, or you want the most common outcome |
| grouped mean | Σfm/Σf with m the midpoints | only intervals are known; it is an estimate |
| Law of Large Numbers | x̄ gets closer to μ as n grows | the sample is random |
Three checks catch most errors: a mean must lie between the smallest and largest values; a median must have half the data on each side and be reported in units, not as a position; a mode must be a data value, not its frequency.
Next, Section 2.6 connects the three measures to the shape of a distribution: when the data are skewed, the mean is pulled toward the tail, and the order of mean, median and mode tells you which way. The Introductory Business Statistics text covers this section's material in its own §2.3.
OpenStax Introductory Statistics 2e, §2.5 Measures of the Center of the Data §2.5, pp. 98-104 — the whole section
OpenStax Introductory Business Statistics 2e, §2.3 Measures of the Center of the Data §2.3 Measures of the Center of the Data — the same measures in business contexts
Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.