D. Statistical Analysis · One-Variable Data AnalysisMeasures of Central Tendency: Mean, Median, Mode and Weighted Mean
D1.1About 70 minutes
Learning goals- I can use sigma notation and the symbols μ, x̄, N and n for means of populations and samples.
- I can calculate the mean, median and mode from raw data and from a frequency table.
- I can calculate a weighted mean and explain when a weighted mean is needed.
- I can estimate the mean and median of grouped data, and explain why they are only estimates.
Words to know
population mean μ
The mean of every member of a population: μ = Σx ÷ N, where N is the population size. μ is the Greek letter mu.
sample mean x̄
The mean of a sample: x̄ = Σx ÷ n, where n is the sample size. Read x̄ as "x-bar".
Σ (sigma notation)
Σx means "add up all the values of x". Σ is the capital Greek letter sigma.
weighted mean
A mean in which each value is multiplied by a weight that shows its importance: Σ(wx) ÷ Σw.
median
The middle value of ordered data (or the mean of the two middle values). It is at position (n + 1) ÷ 2.
mode
The most frequent value or category. A data set can have no mode, one mode or several.
resistant measure
A statistic that is not changed much by a few extreme values. The median is resistant; the mean is not.
What is a "typical" value?
Your final mark in this course is not the simple average of every test and assignment. Some pieces count more than others. A sports reporter's "average" goals per game, a real estate board's "average" house price and your course mark all use different measures of centre, and choosing the right one is part of doing statistics honestly.
Remember from Grade 9: the mean adds the values and divides by how many there are, the median is the middle of the ordered data, and the mode is the most frequent value. An outlier pulls the mean but barely moves the median. In this lesson you will add the notation of statistics, means from frequency tables and grouped data, and the weighted mean.
Notation you will see everywhere
Statisticians use different symbols depending on whether the data is a whole population or a sample from it. (The unit Organization of Data for Analysis explains populations and samples.)
- Population: N values, mean μ = Σx ÷ N.
- Sample: n values, mean x̄ = Σx ÷ n.
The calculation is the same; the symbol tells the reader what kind of data you have. Σ means "sum of": if x = 2, 3, 3, 7, 10, then Σx = 25 and x̄ = 25 ÷ 5 = 5.
The median is at position (n + 1) ÷ 2 in the ordered data. For n = 30 that is position 15.5, meaning halfway between the 15th and 16th values.
If each value were a 1 kg mass on a weightless beam, the beam would balance at the mean. The deviations from the mean always add to 0.The mean from a frequency table
When a value x occurs f times, it contributes f·x to the sum. So
x̄ = Σ(f·x) ÷ Σf = Σ(f·x) ÷ n
The median is found by counting through the cumulative frequencies to position (n + 1) ÷ 2, and the mode is the value with the greatest frequency.
Worked exampleExample 1: Mean, median and mode from a frequency table
In lesson 1, 30 students reported household sizes: 1 person (f = 1), 2 (4), 3 (7), 4 (10), 5 (5), 6 (2), 7 (1). Find the mean, median and mode.
- Mean: Σ(f·x) = 1·1 + 2·4 + 3·7 + 4·10 + 5·5 + 6·2 + 7·1 = 1 + 8 + 21 + 40 + 25 + 12 + 7 = 114. x̄ = 114 ÷ 30 = 3.8.
- Median: position (30 + 1) ÷ 2 = 15.5, so average the 15th and 16th values. Cumulative frequencies: 1, 5, 12, 22, ... The 13th to 22nd values are all 4, so both the 15th and 16th values are 4. Median = 4.
- Mode: 4 has the greatest frequency (10). Mode = 4.
Mean 3.8 people, median 4, mode 4. The mean is a little below the median, but the distribution is roughly symmetric: with discrete data that has only a few values, the median moves in whole steps, so a small gap like this says little about skew.
Weighted means
A weighted mean gives some values more influence than others:
weighted mean = Σ(w·x) ÷ Σw
If the weights are percents that add to 100%, Σw = 1 and you just add the products. You also need a weighted mean to combine the means of groups of different sizes: weight each group mean by its group size.
Worked exampleExample 2: A course mark
Suppose a course outline gives these weights: term tests 35%, assignments 20%, culminating project 15%, final exam 30%. A student has 78% on tests, 88% on assignments, 92% on the project and 70% on the exam. Find the final mark, and compare it with the simple mean of the four marks.
- Multiply each mark by its weight: 0.35 × 78 = 27.3; 0.20 × 88 = 17.6; 0.15 × 92 = 13.8; 0.30 × 70 = 21.0.
- Add: 27.3 + 17.6 + 13.8 + 21.0 = 79.7. (Σw = 1, so no division is needed.)
- Simple mean: (78 + 88 + 92 + 70) ÷ 4 = 328 ÷ 4 = 82.
Final mark 79.7%. It is lower than the simple mean (82%) because the lowest mark, the exam, carries a heavy weight (30%).
Worked exampleExample 3: Combining two classes
Period 1 has 30 students with a mean test mark of 72%. Period 3 has 20 students with a mean of 80%. Find the mean for all 50 students.
- Total marks in period 1: 30 × 72 = 2 160. Period 3: 20 × 80 = 1 600.
- Combined mean = (2 160 + 1 600) ÷ 50 = 3 760 ÷ 50 = 75.2%.
- This is a weighted mean of 72 and 80 with weights 30 and 20. Note that it is not (72 + 80) ÷ 2 = 76.
75.2%. The larger class pulls the combined mean toward its own mean.
Grouped data: estimates only
If you only have a grouped table, you no longer know the exact values. Assume every value in a class sits at the class midpoint m:
estimated mean = Σ(f·m) ÷ n
To estimate the median, find the median class (the class containing position n ÷ 2) and interpolate:
median ≈ L + ((n ÷ 2 − F) ÷ f) × w
where L is the lower boundary of the median class, F is the cumulative frequency before that class, f is the frequency of the median class, and w is the class width. This is exactly what you did by eye on an ogive in lesson 3. The modal class is the class with the highest frequency.
Worked exampleExample 4: Estimating from grouped data
The pumpkin masses from lesson 1 are grouped as [3, 5): 2, [5, 7): 5, [7, 9): 8, [9, 11): 5, [11, 13): 2, [13, 15): 2. Estimate the mean and median, and compare with the exact values from the raw data (mean 8.39 kg, median 8.2 kg).
- Midpoints: 4, 6, 8, 10, 12, 14.
- Σ(f·m) = 2·4 + 5·6 + 8·8 + 5·10 + 2·12 + 2·14 = 8 + 30 + 64 + 50 + 24 + 28 = 204. Estimated mean = 204 ÷ 24 = 8.5 kg.
- Median class: n ÷ 2 = 12. Cumulative frequencies are 2, 7, 15, ..., so the 12th value is in [7, 9). L = 7, F = 7, f = 8, w = 2.
- Median ≈ 7 + ((12 − 7) ÷ 8) × 2 = 7 + 1.25 = 8.25 kg.
- Compare: the estimates (8.5 and 8.25) are close to the exact values (8.39 and 8.2) but not equal, because grouping hides where the values really are inside each class.
Estimated mean 8.5 kg, estimated median 8.25 kg, modal class [7, 9).
To estimate the mean from grouped data, each class's frequency is multiplied by its midpoint: for example, the 8 pumpkins in [7, 9) are treated as 8 pumpkins of exactly 8 kg.Technology
Spreadsheet functions: =AVERAGE(A2:A101), =MEDIAN(A2:A101), =MODE.SNGL(A2:A101) (or =MODE in Google Sheets). For a frequency table with values in A2:A8 and frequencies in B2:B8, the mean is =SUMPRODUCT(A2:A8,B2:B8)/SUM(B2:B8). The same formula gives a weighted mean with weights in column B. On a graphing calculator, enter values in L1 and frequencies (or weights) in L2, then run 1-Var Stats L1, L2.
Just for funMost people have more than the average number of legs. (A few people have fewer than two, so the mean is a tiny bit below 2, while almost everyone has exactly 2.) It is a classic reminder that a mean can be pulled away from the typical value.
Hands-on activityThe weighted grocery basket
You need: a recent grocery receipt (or a flyer), a calculator, paper and a pencil.
- Choose 5 items you bought, with different quantities (for example 3 kg of apples, 1 kg of cheese, 2 L of milk...). Record the price per unit and the number of units.
- Find the simple mean of the 5 unit prices.
- Find the weighted mean unit price, using the number of units as the weight: Σ(units × unit price) ÷ Σunits.
- Which is the better description of "what you paid per unit, on average"? Explain.
What to look for: the weighted mean equals your total spending on the 5 items divided by the total number of units, so it is the true average price per unit you paid. It is pulled toward the prices of the items you bought most of. (Mixing kilograms and litres is fine for practice, but a careful report would keep units that match.)
Your turn
1Find x̄ for 12, 15, 15, 18, 20, 22.
Σx = 102, n = 6, x̄ = 102 ÷ 6 = 17.
2Find the median and mode of 12, 15, 15, 18, 20, 22.
Median: position 3.5, so (15 + 18) ÷ 2 = 16.5. Mode: 15.
3A frequency table has values 0, 1, 2, 3 with frequencies 5, 9, 4, 2. Find the mean.
Σ(f·x) = 0 + 9 + 8 + 6 = 23, n = 20, mean = 1.15.
4For the table in the previous question, find the median.
Position (20 + 1) ÷ 2 = 10.5. Cumulative frequencies 5, 14, ... The 10th and 11th values are both 1, so the median is 1.
5A student scored 65% on a test worth 40% of the mark and 85% on a project worth 60%. Find the weighted mean.
0.40 × 65 + 0.60 × 85 = 26 + 51 = 77%.
6Class A (25 students) has mean 70; Class B (15 students) has mean 62. Find the combined mean.
(25 × 70 + 15 × 62) ÷ 40 = (1 750 + 930) ÷ 40 = 2 680 ÷ 40 = 67.
7A grouped table has classes [10, 20), [20, 30), [30, 40) with frequencies 3, 5, 2. Estimate the mean.
Midpoints 15, 25, 35. (45 + 125 + 70) ÷ 10 = 240 ÷ 10 = 24.
More practice: warm-up
1Which symbol stands for the mean of a population?
The sum of all the x-values.
3Find the mean of 4, 8, 9.
4At what position is the median of 41 ordered values?
(41 + 1) ÷ 2 = 21st value.
5Find the mode of 3, 5, 5, 6, 6, 6, 9.
More practice: on your own
1The mean of 8 numbers is 14. Seven of the numbers add to 95. Find the eighth number.
Total = 8 × 14 = 112, so the eighth number is 112 − 95 = 17.
2A grouped table has classes [0, 5), [5, 10), [10, 15), [15, 20) with frequencies 6, 10, 3, 1. Estimate the median.
n ÷ 2 = 10. Cumulative frequencies 6, 16, ..., so the median class is [5, 10): L = 5, F = 6, f = 10, w = 5. Median ≈ 5 + ((10 − 6) ÷ 10) × 5 = 7.
3A student needs at least 80% in a course where the term is worth 70% and the final exam 30%. Her term mark is 83%. What exam mark does she need?
0.7(83) + 0.3x ≥ 80 → 58.1 + 0.3x ≥ 80 → 0.3x ≥ 21.9 → x ≥ 73%.
4Eight values have mean 50. A ninth value of 95 is added. Find the new mean and explain why the median would probably change less.
New total = 400 + 95 = 495, new mean = 495 ÷ 9 = 55. The median moves from halfway between the 4th and 5th values to the 5th value, so it moves by at most half the gap between those two middle values, no matter how large the new value is. The mean is not resistant: the single value 95 raised it by 5.
5Explain why the median of grouped data can only be estimated.
Grouping records only how many values are in each class, not where they are inside it. The interpolation formula assumes the values are spread evenly through the median class, which may not be true.
Challenge
1Prove that Σ(x − x̄) = 0 for any data set of n values.
Σ(x − x̄) = Σx − Σx̄ = Σx − n·x̄. Since x̄ = Σx ÷ n, n·x̄ = Σx. So Σ(x − x̄) = Σx − Σx = 0. ∎
2A company has 40 employees: 30 earn $45 000, 8 earn $70 000 and 2 earn $250 000. Find the mean and median salary. Which would the company quote to attract applicants, and which would the employees quote when asking for a raise?
Mean = (30 × 45 000 + 8 × 70 000 + 2 × 250 000) ÷ 40 = (1 350 000 + 560 000 + 500 000) ÷ 40 = 2 410 000 ÷ 40 = $60 250. Median = average of the 20th and 21st salaries, both $45 000, so $45 000. The company would quote the higher mean; employees would quote the median, which describes a typical worker.
3The mean of a data set of 10 values is 12. When one value is removed, the mean of the remaining 9 values is 11. What value was removed?
Original total 120; new total 9 × 11 = 99. The removed value is 120 − 99 = 21.
Check your understandingQuiz
1. Which formula gives the mean of a frequency table?
2. A test is worth 25% and an exam 75%. A student scores 90 on the test and 70 on the exam. What is the weighted mean?
3. Twenty students averaged 60 and thirty students averaged 70. What is the mean of all fifty?
4. Which measure of centre is resistant to outliers?
6. A grouped table has n = 60 and median class [40, 50), with 20 values before that class and 12 values in it. Estimate the median.
For parents and teachersBig idea (D1.1): the mean, median and mode measure centre in different ways. The weighted mean is used whenever values have different importance or come from groups of different sizes. With grouped data, every answer is an estimate.
How to help: Work out your teen's current mark together from the course outline's weights; it is the most motivating weighted mean there is. Ask: "Which assessment would raise your mark the most if you improved it by 5%?" (the one with the largest weight).
Common difficulties:
- Averaging two group means without weighting by group size.
- Dividing by the number of rows of a frequency table instead of by n = Σf.
- Using the class boundary instead of the midpoint in grouped estimates.
- Forgetting that the median of an even-sized data set is the mean of the two middle values.