Grade by Grade
D. Statistical Analysis · One-Variable Data Analysis

Measures 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.

The mean is the balance point: 2, 3, 3, 7, 100123456789101112mean = 5deviations −3, −2, −2deviations +2, +5Sum of deviations: (−3) + (−2) + (−2) + 2 + 5 = 0
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 example

Example 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.

  1. 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.
  2. 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.
  3. 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 example

Example 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.

  1. 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.
  2. Add: 27.3 + 17.6 + 13.8 + 21.0 = 79.7. (Σw = 1, so no division is needed.)
  3. 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 example

Example 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.

  1. Total marks in period 1: 30 × 72 = 2 160. Period 3: 20 × 80 = 1 600.
  2. Combined mean = (2 160 + 1 600) ÷ 50 = 3 760 ÷ 50 = 75.2%.
  3. 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 example

Example 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).

  1. Midpoints: 4, 6, 8, 10, 12, 14.
  2. Σ(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.
  3. 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.
  4. Median ≈ 7 + ((12 − 7) ÷ 8) × 2 = 7 + 1.25 = 8.25 kg.
  5. 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).

Grouped data: each class is treated as if all its values sit at the midpoint35791113150246810mass of pumpkin (kg)frequency4 × 26 × 58 × 810 × 512 × 214 × 2
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 fun

Most 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 activity

The weighted grocery basket

You need: a recent grocery receipt (or a flyer), a calculator, paper and a pencil.

  1. 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.
  2. Find the simple mean of the 5 unit prices.
  3. Find the weighted mean unit price, using the number of units as the weight: Σ(units × unit price) ÷ Σunits.
  4. 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

1

Find x̄ for 12, 15, 15, 18, 20, 22.

2

Find the median and mode of 12, 15, 15, 18, 20, 22.

3

A frequency table has values 0, 1, 2, 3 with frequencies 5, 9, 4, 2. Find the mean.

4

For the table in the previous question, find the median.

5

A student scored 65% on a test worth 40% of the mark and 85% on a project worth 60%. Find the weighted mean.

6

Class A (25 students) has mean 70; Class B (15 students) has mean 62. Find the combined mean.

7

A grouped table has classes [10, 20), [20, 30), [30, 40) with frequencies 3, 5, 2. Estimate the mean.

More practice: warm-up

1

Which symbol stands for the mean of a population?

2

What does Σx mean?

3

Find the mean of 4, 8, 9.

4

At what position is the median of 41 ordered values?

5

Find the mode of 3, 5, 5, 6, 6, 6, 9.

More practice: on your own

1

The mean of 8 numbers is 14. Seven of the numbers add to 95. Find the eighth number.

2

A grouped table has classes [0, 5), [5, 10), [10, 15), [15, 20) with frequencies 6, 10, 3, 1. Estimate the median.

3

A 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?

4

Eight values have mean 50. A ninth value of 95 is added. Find the new mean and explain why the median would probably change less.

5

Explain why the median of grouped data can only be estimated.

Challenge

1

Prove that Σ(x − x̄) = 0 for any data set of n values.

2

A 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?

3

The 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?

Check your understanding

Quiz

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?

5.

The symbol x̄ represents

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 teachers

Big 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.