1.3.4 · D3Basic Data & Probability

Worked examples — Mean, median, mode — calculation for raw and grouped data

3,884 words18 min readBack to topic

This is a deep-dive companion to Mean, median, mode — calculation for raw and grouped data. The parent note built the formulas. Here we do the harder job: we throw every kind of dataset at those formulas and watch what happens — including the awkward cases most notes skip (all-equal data, outliers, no mode, open classes, even , ties for the modal class).

Read every example twice. First guess the answer (that's what Forecast is for), then check yourself.


The scenario matrix

A "measures of centre" problem is really a small number of case classes. If you have seen one worked example from each row below, nothing on an exam can surprise you.

Cell Case class What is tricky about it Example
A Raw mean, plain nothing — the warm-up Ex 1
B Raw median, even no single middle → average two Ex 2
C Raw data with an outlier mean lies, median resists Ex 3
D Degenerate raw data (all equal / all unique) mode misbehaves Ex 4
E Grouped mean the "assume everyone sits at the midpoint" trick Ex 5
F Grouped median, first class interpolation with Ex 6
G Grouped mode, edge class modal class at the boundary Ex 7
H Real-world word problem (missing value from a known mean) run the mean formula backwards Ex 8
I Exam-style twist: change one value, watch all three move robustness comparison Ex 9
J Grouped mode tie (two classes share highest ) two modal classes → two modes Ex 10
K Open-ended class (no lower/upper bound) must impute a boundary Ex 11

Each example below is tagged with its cell letter. Together they hit every cell.

Two words we will lean on:

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

The picture above is the whole page in one image: mean is the balance point (where the seesaw of values tips level), median splits the count in half, mode is the tallest stack. Keep glancing back at it.


Cell A — Raw mean, the warm-up


Cell B — Raw median with an even count


Cell C — An outlier: mean lies, median holds


Cell D — Degenerate data: what mode does at the edges


Cell E — Grouped mean (the midpoint assumption)


Cell F — Grouped median with the first class as median class

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

The figure shows the interpolation as a straight-line ramp climbing across the median class. We enter at , we need to reach , and the crossing point projects down to on the time axis.


Cell G — Grouped mode when the modal class is on an edge


Cell H — Word problem: run the mean backwards


Cell I — The twist: perturb one value, watch all three


Cell J — Grouped mode with two classes tied for highest frequency


Cell K — Open-ended class: impute a boundary


Recall

Recall Even

raw median — what do you do? Sort, then average the two middle values at positions and .

Recall What is the difference between

and ? counts individual raw observations; is the total frequency of a grouped table. They count the same people by different routes.

Recall Which average is most robust to an outlier?

The median (and often the mode); the mean is pulled toward the outlier.

Recall In the grouped-median formula, what is

? The cumulative frequency of the class before the median class.

Recall What does

mean in the grouped formulas? The class width = upper limit minus lower limit of a class.

Recall Modal class is the first class — what is

? Zero, because there is no class before it.

Recall All values distinct — what is the mode?

No mode (not zero).

Recall Two grouped classes tie for the highest frequency — how many modes?

Two: apply the mode formula separately to each modal class (the data is bimodal).

Recall A class reads "300 and above" — what must you do first?

Impute an upper limit (usually keep the common class width), then take the midpoint.