1.3.4 · D4Basic Data & Probability

Exercises — Mean, median, mode — calculation for raw and grouped data

2,958 words13 min readBack to topic

This page is a self-test ladder. Each problem states cleanly, then hides its full worked solution inside a collapsible callout so you can try first and reveal after. Work top to bottom: the difficulty climbs from "just spot the number" to "reason backwards from a mystery dataset."

Parent: Mean, median, mode — calculation for raw and grouped data. If any step feels shaky, this exercise set builds on the machinery there and on Cumulative Frequency Graphs, Frequency Distributions and Weighted Mean.

Before we start, one shared picture of what these three numbers even are on a number line — read the figure caption below carefully, everything else on this page leans on it.

Before the grouped exercises, pin down the symbols once so no formula below is "magic."


Level 1 — Recognition

Problem 1.1

Given the raw dataset , write down (a) the mode, (b) the number of observations , and (c) the sum .

Recall Solution 1.1

(a) Mode. The mode is the value appearing most frequently. Counting: once, twice, once, once. Only repeats. (b) Count. There are five numbers, so . (c) Sum. .

Problem 1.2

Sort ascending and state the median.

Recall Solution 1.2

Sort. . Position. is odd, so the median sits at position . The 3rd value is . Why position 3? Two values () lie below it and two () above — it is the balance-by-count.

Problem 1.3 (mode — the tricky edge cases)

State the mode of each raw set, and name the situation: (a) (b) (c) .

Recall Solution 1.3

The mode may not be unique — you must always report how many values share the top frequency. (a) Every value appears exactly once, no value beats the others → no mode. (b) appears twice and appears twice, tied above everything else → two modes, bimodal ( and ). (c) appears three times, beating all others → one mode, unimodal (). Rule for ties: find the highest frequency, then list every value achieving it. One value → unimodal; two → bimodal; three or more → multimodal; all values tied → no mode.


Level 2 — Application

Problem 2.1

Find the mean, median and mode of .

Recall Solution 2.1

Sort first. . Here . Mean. Sum . Then Median. Odd , position . The 4th sorted value is . Mode. appears three times (more than any other), so (unimodal).

Problem 2.2 (grouped)

For the distribution below, compute the mean using class marks.

Class Frequency
0–10 3
10–20 7
20–30 6
30–40 4
Recall Solution 2.2

Class marks : .

Class
0–10 3 5 15
10–20 7 15 105
20–30 6 25 150
30–40 4 35 140
Total

Mean. Why class marks? We can't see the raw values, so we assume every member of a class sits at its midpoint — the single least-biased guess.


Level 3 — Analysis

Problem 3.1 (outlier reasoning)

Monthly salaries (in thousands): . (a) Compute the mean and median. (b) Which better represents a "typical" salary, and why?

Recall Solution 3.1

Sort. , with . Mean. Sum , so Median. Even : average of positions and , i.e. and : (b) Interpretation. The lone is an outlier. It drags the mean up to , a value no employee is anywhere near. The median ignores that extreme and matches the cluster. So the median better represents a typical salary. (See Skewness — this is right-skew.)

Problem 3.2 (find the median class)

For the grouped data below, find the median. (Symbols are defined in the boxed definition near the top of this page.)

Class
0–10 4
10–20 6
20–30 10
30–40 5
40–50 5
Recall Solution 3.2

Cumulative frequencies (running counts): . So . Half. — the median is the th value counting from the bottom. Locate median class. The running count reaches at the end of (still ) and at the end of (). So the median class is . Identify each symbol for this class (from the definition box):

  • (lower boundary of the median class)
  • (cumulative frequency of everything before )
  • (frequency of the median class itself)
  • (class width )

Apply the interpolation — we still need values into a class holding , spread evenly over width , so we walk the fraction of the bar: Figure 2 shows this walk: because the values are assumed evenly spread, halfway in count ( of ) is halfway in distance ( of units), landing at .


Level 4 — Synthesis

Problem 4.1 (all three on one grouped table)

For the distribution below, find the mean, median and mode.

Class
0–20 6
20–40 9
40–60 15
60–80 8
80–100 2
Recall Solution 4.1

Setup. Class marks ; cumulative counts ; so .

Class
0–20 6 10 60 6
20–40 9 30 270 15
40–60 15 50 750 30
60–80 8 70 560 38
80–100 2 90 180 40
Total 40

Mean. .

Median. . First cumulative count is (class ), so median class : .

Mode. Highest in (modal class). Using the symbols from the WHY box: .

Problem 4.2 (weighted mean combine)

Class A has students with mean . Class B has students with mean . Find the mean of all students combined.

Recall Solution 4.2

This is a weighted mean (see Weighted Mean): each class mean is weighted by its size. Recover totals. ; . Combine. Why not just average and to ? Because B has more students — its deserves more pull. Averaging the means as equals would ignore the sizes.


Level 5 — Mastery

Problem 5.1 (recover a missing value)

A dataset of six numbers has mean . Find , then find the median of the completed set.

Recall Solution 5.1

Use the mean equation. gives . Numerator known part , so . Completed set. . Sort: , with (even). Median. Average of positions and : .

Problem 5.2 (recover a missing grouped frequency)

In the distribution below the median is known to be exactly . Find the missing frequency .

Class Frequency
0–10 5
10–20 8
20–30
30–40 6
40–50 3
Recall Solution 5.2

Median lies in class , so that is the median class: lower boundary , width , class frequency , and the cumulative count before it is . Total . Substitute into the median formula and solve for : Subtract from both sides: Simplify the numerator: . So Multiply both sides by : A negative frequency is impossible. This is the real answer to the stated question: there is no valid that makes the median exactly for this table. The reason is structural — with before the class and half-total , the point can only sit a small fraction into class , so the median is forced to stay near the left of and can never be pushed as far right as . Check the feasible ceiling. The largest reachable median in this class is its right edge , approached only as ; solving for the interior shows the median stays below for any positive . Hence median is unattainable, and the correct response is: no such frequency exists. Companion feasible question (to show the method when a solution does exist): if instead the target median were , then a valid positive frequency. (Both the "no solution" and this result are checked in VERIFY.)


Wrap-up

Recall Which measure, one-line reflex?

Skewed / has outliers? ::: Prefer the median (resistant), and see Skewness. Need the "most common" category? ::: Mode — and check for ties (no mode / bimodal / multimodal). Every value matters equally and no wild outliers? ::: Mean. Combining groups of different sizes? ::: Weighted mean — weight by .

Continue to Measures of Dispersion and Box Plots to describe not just the centre but the spread.