OttoLearnOttoLearn

L-DS-3: Central Tendency Measures

Module 1 · Descriptive Statistics

Introduction

▾

In its 2021 Market Watch report, the Toronto Regional Real Estate Board reported an average GTA home sale price of CAD 1,095,475 — just under CAD 1.1 million. That figure is the total value of the year’s reported GTA sales divided by the number of sales.

The mean alone does not tell us the median sale price, how many homes sold below CAD 1 million, or whether a small number of luxury properties pulled the figure upward. We would need the transaction distribution to answer those questions. A headline can therefore report a technically correct mean while still leaving the reader without enough evidence to know what a typical sale looked like.

This is the central tension in this lesson: we want to summarize an entire dataset with a single number that represents the “typical” value. Three measures compete for that role — the mean, the median, and the mode — and each tells a different story. Choosing the wrong one is one of the most common errors in data analysis, in journalism, and in everyday decision-making. In L-DS-2 you described a histogram’s shape in words; here you will name that shape and use it as evidence for choosing the centre.

By the end of this lesson, you’ll know how to choose an appropriate measure, why the measures can diverge, and how distribution shape contributes evidence to that decision.

Learning outcomes

After this lesson, you will be able to:

  • Compute the sample mean using the summation formula
  • Find the median for both odd- and even- datasets
  • Identify the mode(s) of a dataset and explain why the mean is sensitive to outliers while the median is resistant
  • Select the most appropriate measure of central tendency based on the distribution’s shape and skewness

Prerequisites

▾

This lesson builds on L-DS-2 (Data Visualization). The most important idea you’ll need is reading a histogram’s shape — because the shape of a histogram is what guides your choice of measure. Let’s do a quick refresher.

From L-DS-2: Distribution Shape

What you will use from earlier
  • From L-DS-2: Histogram Shapes. You described where the values cluster and whether a few unusually high or low values stretch out one side. That stretched-out side is called the tail. In C5 of this lesson, a shape gets its name from its longer tail: that is skew. (You will need this to select the correct measure of central tendency for a given dataset).
  • From L-DS-1: Variable Types. Quantitative variables record meaningful numbers; qualitative variables record categories. (You will need this to know when arithmetic is meaningful and when only the mode applies).
  • From basic math: Summation (). means “add up all values”. (You will need this to compute the sample mean).
  • From basic math: Locating the middle. If , the middle is position . (You will need this to locate the median).

Prerequisite self-check

Retrieval checkpoint · from L-DS-2

Before continuing, test your foundational knowledge from L-DS-2.

Choose one

A frequency table records the number of hours 30 students spent on homework last week: 0–2 h (4 students), 3–5 h (11 students), 6–8 h (9 students), 9–11 h (5 students), 12+ h (1 student).

Which is the modal class — the class with the highest frequency?

Check your comfort level with the remaining foundations:

Bridge to today
In L-DS-2

In L-DS-2, we drew pictures of data distributions.

Today

In L-DS-3, we are going to summarize those entire pictures into a single “typical” number, and we will see how the shape of the picture dictates which number we should use.

Core Concepts

▾
Your route through the ideas
  • C1 — Sample mean: Compute the balance point from every value.
  • C2 — Median: Sort, locate the middle, and use resistance to extremes.
  • C3 — Outlier sensitivity: Predict how an extreme value moves the mean and compare it with the median.
  • C4 — Mode: Identify the most frequent value or category.
  • C5 — Skewness and selection: Use distribution shape to choose a defensible centre.

Move through the concepts in order: compute the mean → locate the median → compare their response to extremes → identify the mode → choose a defensible centre.

C1 — The Sample Mean

The mean is the most familiar measure of centre — it’s what most people mean when they say “the average.” Intuitively, it’s the value each observation would take if we redistributed the total evenly across all observations.

Sample Mean

The sample mean (read “x-bar”) is the arithmetic average of observations:

where denotes the -th observation and is the sample size.

Properties:
  • Uses every value in the dataset
  • Is the algebraic centre of mass: (deviations cancel exactly)
  • Minimises the sum of squared deviations

Notation note: is the sample mean. The population mean uses the Greek letter (mu). Most datasets in this lesson are samples, so we write . When the data cover a whole population, such as every employee of a company, the same calculation is written (as in L-DS-1).

Unpacking: Think of placing equal weights on a number line — one weight per data value. The mean is exactly the balance point. If you place one of those equal weights far to the right, its longer lever arm shifts the balance point right.

“The mean is always a data value.” Not so. The mean of is — not a value in the dataset. The mean is a calculated summary, not necessarily an observation. You can have 2.4 children on average even though no individual family has 2.4 children.

The Balance Scale — Find the Mean by Balancing the Beam

The visualization below makes the balance-point property concrete. Each blue weight is one data value resting on a plank. Drag the fulcrum (▲) until the beam is perfectly level — you’ll discover it balances at exactly one place: the mean. Notice the “net turning effect” reading hits zero precisely when the beam is level. Drag the weights to change the data and the balance point moves with them.

Figure 1: Interactive balance scale. Drag the fulcrum to balance the beam. It levels out only when the fulcrum sits exactly at the mean (x̄) — the point where the turning effects on both sides cancel to zero.

C2 — The Median

The median is the middle value of a sorted dataset. Because it depends on position rather than every magnitude, changing a value that remains at an extreme often leaves the median unchanged.

Median

The median is the value that divides a sorted dataset into two equal halves.

Algorithm:
  1. Sort the data in ascending order.
  2. Count observations.
  3. If is odd: the median is the value at position .
  4. If is even: the median is the average of the values at positions and .

The median is resistant to outliers: changing the most extreme value (without crossing the median) does not change the median at all.

Unpacking: Seven recent home sales in a neighbourhood, in thousands of dollars, were and . First sort:

(odd) → median is at position → Median = 320 (thousands).

The median says CAD 320K, close to what a typical buyer paid. In C3 you will see that the mean of the same seven prices is about CAD 538K.

The Sort Animator — See Why Sorting is Non-Negotiable

Work through the four steps below. Toggle between odd- and even- datasets to see how the median algorithm changes.

Figure 2: Median sort animator. Step through raw data → sorted → middle position found → median identified. The #1 median error — skipping the sort — becomes visible in Step 1 vs Step 2.

“You can find the median without sorting first.” This is the #1 median error. The median is defined as the middle of the sorted list. Finding the middle value of the unsorted list gives a wrong answer. Always sort before locating the median position.


C3 — Mean Sensitivity to Outliers

Now that the median is defined, we can compare how the two centres respond to the same extreme value. The mean is pulled toward every outlier in the dataset, proportionally to how extreme that outlier is. The median depends mainly on ordered position, so changing a value that remains in the tail often leaves it unchanged.

Illustration: Return to the seven home sales from C2, in thousands of dollars:

The first six are clustered around CAD 320K. The seventh is a luxury penthouse at CAD 1.85M.

The mean says the “average” home costs CAD 538K — but six of the seven homes sold for under CAD 350K. The mean misrepresents what a typical buyer actually paid, while the median remains CAD 320K.

The Outlier Puller — See It Happen

The visualization below makes this concrete. Drag the orange outlier dot left and right. Watch how the mean (orange line) chases the outlier while the median (blue line) changes only when the middle position changes.

Figure 3: Interactive outlier puller. Drag the outlier to see how mean and median respond differently. The mean is pulled toward the outlier; the median is resistant.

“A larger dataset protects the mean from outliers.” Only partially. With values and one extreme outlier, the mean is less distorted than with — but a sufficiently extreme outlier still pulls the mean away from the bulk of the data. The median is resistant for a different reason: changing a value that remains in the tail does not change the middle position or positions. Moving observations across the centre can change it, so resistance is not immunity.


C4 — The Mode

Under this course’s convention, the mode is the value (or values) that stand out by appearing more frequently than the remaining values. It is the only measure of centre that works for nominal categories such as colours or political parties. Ordinal categories have a meaningful order, so they may also support a median; the mode remains valid for both nominal and ordinal data.

Mode

The mode of a dataset is the value (or values) that stand out by occurring more frequently than the remaining values.

  • Unimodal: exactly one value has a higher frequency than every other value
  • Bimodal: exactly two values tie for the highest frequency and outrank at least one other distinct value
  • Multimodal: more than two values tie for the highest frequency and outrank at least one other distinct value
  • No mode (this course’s convention): at least two distinct values are present, every distinct value appears equally often, and none stands out

The mode is the only measure of central tendency applicable to nominal data. For ordinal data, both the mode and median can be meaningful because the categories have an order.

Convention note: Some formal definitions call every value a tied mode when all frequencies are equal. Introductory courses often report “no mode” because no value is more frequent than another. This course uses that introductory convention when at least two distinct values tie. A constant dataset such as is unimodal: its sole distinct value is the mode.

Under this convention, has no mode because both distinct values have the same frequency. By contrast, is bimodal because 1 and 2 tie for the highest frequency and both outrank 3.

Example: Shoe sizes in a sample of 12 customers: .

  • Size 8 appears 4 times; size 9 appears 4 times; size 7 appears twice; sizes 10 and 11 appear once each.
  • Mode = 8 and 9 (bimodal). A shoe store should stock both sizes most heavily.
Example

Mode for qualitative data: A survey of 200 students asks their favourite social media platform: Instagram (88), TikTok (71), YouTube (31), X (10). Mode = Instagram — it occurs most frequently. No mean or median is possible here because platform names are not numbers.

“Ordinal categories can only have a mode.” Ordinal categories are labels with a meaningful order, such as “low / medium / high.” You still cannot compute their mean without a justified numerical scale, but you can identify both a mode and a median category. Only nominal categories rule out the median.

The Frequency Chart Builder — See the Mode Emerge

Click Build frequency chart to watch the bars grow from the raw data. Toggle to the bimodal example to see what happens when two values tie.

Figure 4: Interactive frequency chart builder. Build the chart to reveal the mode. The bimodal case often signals two distinct sub-groups in the data.

C5 — Skewness and Measure Selection

The three measures — mean, median, mode — coincide in a perfectly symmetric unimodal distribution. In many smooth unimodal distributions they separate as skew grows, and the direction of that separation provides a useful clue about shape.

Skewness and Central Tendency

For a unimodal distribution:

ShapeTypical relationshipUse
SymmetricMean ≈ Median ≈ ModeEither mean or median
Right-skewed (longer right tail)Mode < Median < MeanMedian
Left-skewed (longer left tail)Mean < Median < ModeMedian

Heuristic: The mean is pulled toward extreme magnitudes in the tail. In the common right-skewed pattern the mean exceeds the median; in the common left-skewed pattern the mean falls below the median. For clearly skewed data, the resistant median often better represents the “typical” value.

Note: This ordering is a useful heuristic for many unimodal continuous distributions, not a mathematical law — some irregular distributions can violate it. Use it as a guide, not a guarantee.

Three Canonical Shapes — See the Ordering Directly

The visualization below illustrates the common pattern in three deliberately constructed shapes. Switch tabs to compare how the tail moves the mean relative to the median in these examples.

Figure 5: Schematic canonical shapes illustrating a common unimodal ordering. The marker order is a heuristic, not a universal law.

Why the mean is pulled toward the tail: Outliers and extreme values cluster in the tail. Because the mean uses every value’s magnitude, those extreme values drag it in the tail’s direction. The median is resistant: changing an extreme magnitude does not change it unless the ordering of the middle position(s) changes.

Decision rule

The practical decision rule

  • Distribution approximately symmetric, no extreme outliers → use the mean (it incorporates every magnitude and is efficient for many symmetric models)
  • Distribution skewed or has outliers → use the median (it’s resistant)
  • Data is qualitative (categories) → use the mode (only option)

“The mean is always the best average because it uses all the data.” Using all values is only an advantage when those values all legitimately represent the typical phenomenon. When one value is CAD 1.85M in a neighbourhood of CAD 320K homes, including it fully misleads the summary. The mean’s strength (sensitivity to all values) becomes a weakness when outliers are present.

The Income Histogram — Mean vs. Median as the Right Tail Grows

The slider below adds high earners one at a time. In this disclosed constructed dataset, the mean (orange) drifts right while the median (blue) stays fixed because the middle observation positions do not change. That sensitivity is why reports of skewed income data generally use the median for a typical value.

Figure 6: Mean–median tracker computed from a disclosed constructed dataset. Displayed values are rounded to the nearest CAD 0.1K. Add high earners with the slider: the mean moves right while the unchanged middle positions keep the median anchored.

Worked Examples

▾

Let’s walk through four examples with fading scaffolds. Example 1 shows the entire expert model. Example 2 asks for a prediction, Example 3 leaves a consequential tally to you, and Example 4 asks you to diagnose an analyst’s decision.

Example 1: Computing the Sample Mean using the Summation Formula

Example 1 of 4 · Fully worked

Scenario: A statistics instructor records the number of hours seven students spent studying for a midterm exam:

4, 7, 3, 9, 5, 6, 8

Find the sample mean .

Notice: The values run from 3 to 9 with no extreme observation, so a mean near the middle of that range should be plausible.

Choose: The question asks for the arithmetic balance point, so use the sample-mean formula.

Interpret: On average, the students in this sample studied 6 hours. The result is a whole number here by coincidence; a mean does not have to be an observed value or an integer.

Check: The sorted list is symmetric around 6, so the result agrees with the distribution’s shape.

Algebraic centre property

The deviations are .


Example 2: Finding the Median for Odd and Even Sample Sizes

Example 2 of 4 · Partly guided

Seven patients’ resting heart rates (bpm) are . An eighth patient with a heart rate of 66 bpm may be added.

Your task: Sort the seven observations and report the median’s position and value. Then add the eighth observation, sort again, and predict both the two middle positions and the new median.

Try it on your own first, then open the answer. Even a rough try shows you what you already understand.

Show Solution

Odd case — sort first:

Even case — add 66 and sort again:

The choice is positional: because the list is unsorted, sorting is the first non-negotiable move. The even-case median, 73 bpm, need not appear in the data.


Example 3: Detecting a Bimodal Distribution

Example 3 of 4 · Less guided

Scenario: A clothing retailer records the shoe size purchased by each of 15 customers:

9, 8, 10, 8, 9, 11, 8, 7, 9, 10, 8, 9, 8, 10, 9

Your task: Build a frequency tally for sizes 7 through 11. Then classify the distribution as unimodal, bimodal, multimodal, or having no mode, and identify the mode or modes.

Try it on your own first, then open the answer.

Show Solution
SizeCount
71
85
95
103
111

The highest frequency is 5, shared by sizes 8 and 9.

Conclusion: The distribution is bimodal, with modes 8 and 9. The retailer should stock both sizes heavily. The tie is also a reason to investigate whether the data combine two customer groups.


Example 4: Diagnose a Misleading Salary Summary

Example 4 of 4 · On your own

An analyst studies these eight salaries:

They report:

“The typical employee earns CAD 82.5K because the mean uses every salary. Six of eight employees earn below this value, so the mean is still representative.”

Your task: Diagnose the analyst’s claim. Verify the reported mean, compute the median, check how many salaries fall below the mean, and decide which measure better represents a typical employee. Justify your choice using the distribution’s shape.

Try it on your own first, then open the answer.

Show Solution

Notice: CAD 310K is separated sharply from the other seven salaries, so the distribution has a long right tail. That makes the mean sensitive to one atypical observation.

Correct the count: Seven of the eight salaries—not six—are below CAD 82.5K.

Decision: Report the median salary of CAD 51K as the primary description of a typical employee. The CAD 82.5K mean is mathematically correct but misleading as a typical value because the CEO salary pulls it far to the right.

Guided Practice

▾

Time to try it yourself — with immediate feedback. Work through each problem before selecting an answer. If you choose incorrectly, read the rationale carefully before moving on.

Problem 1 — Computation of the Arithmetic Mean (C1)

Work the mean step by step — commit to each step before moving on. A fresh dataset every attempt.

Work it step by step

Problem 2 — Median Localization and Even/Odd Sample Sizes (C2)

Practise finding the median — sort first, then locate. A fresh scenario each attempt; try the whole problem solo once the steps feel routine.

Work it step by step

Problem 3 — Influence of Skewness on Central Measures (C5)

Apply the decision rule — no computation needed. A new scenario each time.

Choose one

Independent Practice

▾

Work through these problems without guided hints. Commit to an answer before revealing the solution. Problems are interleaved across C1–C5.

Problem 1 — Diagnosing Skewness via Central Measure Discrepancies (C3 + C5)

Choose one

A real-estate report shows: mean sale price = CAD 485,000 — median sale price = CAD 342,000. Its histogram has a dense cluster of ordinary-priced homes and a sparse tail extending toward several multi-million-dollar sales.

What conclusion is supported by the numerical summaries and the histogram together?


Problem 2 — Defending Measure Choices for Skewed Environments (C3 + C4 + C5)

No computation needed — apply the decision rule.

Choose one

Problem 3 — Algorithmic Computation of the Arithmetic Mean (C1)

A fresh dataset every time. Apply and check your answer.

Estimate first

Problem 4 — Algorithmic Sorting and Location of the Median (C2)

Sort the generated list, locate the middle (or average the two middle values for even ).

Type your answer

Problem 5 — Algorithmic Identification of the Mode (C4)

Review the scenario and identify the value or values that stand out at the highest frequency. If every value appears equally often, use this course’s stated no mode convention.

Type your answer

The typed answer above always has one mode. Now decide how many modes a dataset has: one, two, or none.

Choose one

Problem 6 — Diagnosing a Flawed Central-Tendency Analysis (C2 + C3 + C5)

A student’s analysis contains exactly one mistake. Locate the first faulty step before reading the targeted feedback. Generate another version to practice distinguishing shape, median, and measure-selection errors.

Find the first wrong step

Mixed review from L-DS-1 and L-DS-2

Try these without looking back. Pulling an idea out of memory makes it stick better than reading it again.

Review Problem 1 — Reading a Frequency Distribution (L-DS-2)

Choose whether to solve the whole review on your own or reveal one step at a time. A fresh table rotates among roughly symmetric, right-skewed, and left-skewed distributions.

Work it step by step

Review Problem 2 — Variable Type and Appropriate Measure (L-DS-1)

Retrieve the variable-type distinction first, then connect it to the valid measure and the skew-resistant choice of centre. Choose a solo attempt or open the step-by-step route.

Work it step by step

Mastery Check

▾

Part 1: Skill checks

Each check question draws a new version every time. Two right in a row, on the first try and without help, makes it ready.

Recall: the mean of a small dataset (C1)

Type your answer

Question 1 — Delivery-time report (C1 + C2 + C3 + C5)

Check · C1 + C2 + C3 + C5

Try it yourself first, steps after

Question 2 — Find the faulty step (C1 + C2 + C3 + C5)

Check · C1 + C2 + C3 + C5

Find the first wrong step

Question 3 — Type every mode (C4)

Check · C4

Type your answer

Question 4 — Which centre leads? (C5)

Check · C5

Choose one

Part 2: Applied problem

Pick one mission. It counts when every step is right on the first try, with no step shown.

The Analyst

Salaries at a tech startup, CEO included: what is a typical salary?

The Architect

A commute survey with one very long trip: what goes in the public report?

Your verdict

Not yet

  • C1: the mean, the total shared equally
  • C2: the median, from sorted data
  • C3: one extreme value moves the mean, not the median
  • C4: the mode: one, two, or none
  • C5: the variable’s type and the longer tail choose the measure

What to do

    This verdict is not saved, so it starts again when you reload the page.

    Part 3: Explain it (optional)

    Feynman Test

    Imagine a friend who missed this entire lesson. They just asked you: “I keep hearing about mean, median, and mode — what’s actually the difference, and when should I use each one?”

    Explain the difference in plain language and describe when each measure is useful. No formulas are required.

    Explain it in your own words first, then compare with the model answer.

    Compare with a model answer

    The mean adds up all values and divides by how many there are — it’s like spreading the total equally. The median is the middle value when you sort the list. The mode is the most common value. One very extreme value (like a CEO’s salary) pulls the mean far from where most data sits, but it barely moves the median. So for skewed data — incomes, home prices, wait times — lead with the median. For roughly symmetric data with no outliers, the mean is fine. For categories (like favourite colour), only the mode works.

    Example claims (your mission’s numbers differ). The Analyst: “The median salary is CAD 86,500, and salaries range from CAD 52,000 to CAD 450,000 by role. The mean is higher, CAD 128,400, because the CEO’s salary pulls it up.” The Architect: “The typical commute in our survey is 26 minutes, the median. The mean is 32.2 minutes because one resident’s trip took 92 minutes.”

    If you chose a mission above, also write the two-sentence claim you would publish: accurate, without hiding the extreme value.

    How was this lesson?

    Optional and anonymous: tap one, or skip it.

    Challenge Problems

    ▾
    Optional stretch

    These go beyond the lesson objectives. Attempt them when you feel confident with the core material.

    Challenge 1 — Balancing Robustness and Data Retention with a Trimmed Mean

    The trimmed mean is a compromise between the mean and the median. In this lesson, a trimmed mean removes observations from each end of the sorted data, then computes the mean of the remaining observations. The floor rule means we always round the removal count down.

    Question 1: Compute the 10% trimmed mean for the fixed ten-score dataset. Enter the result to two decimal places.

    Type your answer
    Choose one

    Question 2 — As the trim percentage increases from 0% toward 50%, which value does the trimmed mean approach?

    Choose one

    Question 3: A dataset of values has a single massive outlier at the right tail.

    Which trimmed mean best controls for this outlier?

    Regenerable rematch: Apply the same floor rule to a fresh 10-score dataset.

    Type your answer
    Choose one

    Question 4: A judging system removes the highest and lowest judge scores, then averages the remaining scores.

    Which statistical concept does this judging procedure apply?


    Challenge 2 — Proving the Least-Squares Minimizer Property

    Calculus required

    This challenge uses derivatives to prove a property of the mean. Skip it if you have not yet studied differentiation.

    You learned in Section 3 that the mean minimises over all possible constants .

    Claim: The value of that minimises is .

    Your task: Prove the claim. Differentiate , solve the first-order condition for , and use the second derivative to verify that the critical point is a minimum.

    Try it on your own first, then open the answer.

    Show Proof

    Treat as a function of and differentiate with respect to :

    Set the derivative equal to zero:

    The second derivative is , confirming this is a minimum.

    Implication: is the unique “least-squares centre” of the data. This is why the mean appears everywhere in regression and inference — it is the constant prediction that minimises squared error. The median, by contrast, minimises the sum of absolute deviations — a less familiar but equally principled criterion.

    Verification task: For the dataset , compute SSE at and at . Which value of produces the smaller SSE?

    Show Verification

    Data: . .

    Any shift from increases SSE. The mean is the unique minimiser.


    Challenge 3 — Anticipating the Need for Measures of Spread

    You now know how to find the centre of a distribution. But two datasets can have the same mean and yet look very different:

    DatasetValuesMean
    A50
    B50

    Both have , but Dataset B is far more spread out. The centre alone doesn’t tell the whole story.

    In L-DS-4 (Variability and Spread), you’ll meet the standard deviation — a measure of how far the typical observation sits from the mean — and the interquartile range (IQR) — a robust spread measure analogous to the median.

    Warm-up question: For Dataset A (), the deviations from the mean are . For Dataset B (), the deviations are . What do these deviations have in common for both datasets?

    Show Solution

    In both cases, . This is the algebraic centre property: deviations from the mean always sum to zero, for any dataset. That’s why the mean is the balance point — and also why we square the deviations when measuring spread (to prevent cancellation). You’ll use this fact extensively in L-DS-4.

    Quick Reference

    ▾
    If you're stuck

    Re-read the relevant Core Concept in Section 3, then find the Worked Example that maps to that concept (e.g., Example 1 maps to Concept 1).

    Quick-Reference Formulas

    Sample Mean:

    Median:

    Mode:

    Under this course’s convention, a dataset has no mode when all distinct values tie at the same frequency. Some formal definitions instead report every value as a tied mode in that edge case.

    ShapeTypical relationship for a unimodal distributionRecommended measure
    Symmetric and unimodal, no outliersMean ≈ Median ≈ ModeMean
    Right-skewedMode < Median < Mean*Median
    Left-skewedMean < Median < Mode*Median
    Qualitative (nominal)—Mode

    *The ordering is a heuristic that holds for most unimodal continuous distributions, not an exact mathematical rule.