Math ClubMath Club
v1 · padrão canônico

Lesson 71 — Measures of central tendency: mean, median, mode

Summarize a dataset with a single number: mean, median, mode. When to use each and what the choice reveals about the distribution.

Used in: 2.º ano do EM (16-17 anos) · Stochastik LK alemão · H2 Math Statistics singapurense · Math B japonês

xˉ=1ni=1nxi\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i
Choose your door

Rigorous notation, full derivation, hypotheses

Definitions and properties

Descriptive statistics: the summary problem

Given a set of nn observations x1,x2,,xnx_1, x_2, \ldots, x_n, we want a single number that represents the "center" of the distribution. There is no single answer — there are three different questions, three different answers.

"The sample mean can be calculated for any quantitative variable. For a discrete distribution, the mean is the sum of each value multiplied by its probability; for a continuous distribution, the corresponding integral." — OpenIntro Statistics, §1.6

Algebraic properties of the mean

"The mean minimizes the sum of squared deviations (L2L^2 error). The median minimizes the sum of absolute deviations (L1L^1 error). This distinction has profound consequences in regression and machine learning." — OpenIntro Statistics, §2.1

Relationship between the three measures and skewness

Symmetric unimodalMode=Med=MeanRight skewModeMedMeanLeft skewModeMedMean

Relationship between mode, median, and mean according to distribution skewness. In right skew (long positive tail): mode less than median less than mean.

Distribution shapeRelationship
Symmetric unimodalMode == Median == Mean
Right skew (positive tail)Mode << Median << Mean
Left skew (negative tail)Mean << Median << Mode

Solved examples

Exercise list

42 exercises · 10 with worked solution (25%)

Application 12Understanding 10Modeling 11Challenge 5Proof 4
  1. Ex. 71.1Application

    Data: 5, 6, 7, 7, 7, 8, 9. Calculate the mean, median, and mode.

  2. Ex. 71.2Application

    Grades of 8 students: 4, 5, 6, 6, 7, 8, 9, 10. Calculate the mean, median, and mode.

  3. Ex. 71.3Application

    Monthly salaries ($k): 2, 2, 3, 4, 5, 50. Compare mean and median. Which better represents the typical salary?

  4. Ex. 71.4Application

    Ages of 7 participants: 18, 19, 20, 21, 22, 23, 24. Calculate the mean, median, and mode.

  5. Ex. 71.5ApplicationAnswer key

    Loading times (s): 0.5; 0.7; 0.8; 0.9; 1.1; 1.5; 7.0. Calculate the mean and median. Is the median more informative than the mean in this case?

  6. Ex. 71.6Application

    Car colors in a parking lot: 12 white, 8 black, 5 gray, 5 red. Which measure of central tendency is appropriate?

  7. Ex. 71.7ApplicationAnswer key

    Data: 1, 1, 2, 3, 5, 5, 7. Determine the mode(s). How is this distribution classified?

  8. Ex. 71.8Application

    Frequency table: xx = 4, 5, 6, 7, 8 with frequencies ff = 2, 3, 5, 3, 2. Calculate the arithmetic mean.

  9. Ex. 71.9Application

    Grouped data: intervals [0,10)[0,10), [10,20)[10,20), [20,30)[20,30) with frequencies 5, 12, 3. Calculate the mean using midpoints.

  10. Ex. 71.10Application

    A class has a mean age xˉ=17.5\bar{x} = 17.5 years. A new 20-year-old student joins and the new mean becomes 17.7517.75 years. How many students were there originally?

  11. Ex. 71.11ApplicationAnswer key

    Calculate mean, median, and mode for: 3, 3, 4, 5, 6, 6, 6, 9.

  12. Ex. 71.12ApplicationAnswer key

    Calculate mean, median, and mode(s) for: 10, 10, 11, 12, 13, 14, 14, 15, 19.

  13. Ex. 71.13UnderstandingAnswer key

    Why does IBGE prefer to use the median (and not the mean) to describe the per capita household income of Brazil?

  14. Ex. 71.14Understanding

    Emergency room waiting time: most are seen in 1 to 2 hours, but some serious cases wait more than 10 hours. Which measure to use to describe typical waiting time? Justify.

  15. Ex. 71.15Understanding

    A manufacturer wants to declare the typical useful life of its LED bulbs. Suggest which measure of central tendency to use and justify.

  16. Ex. 71.16Understanding

    An election poll asks 1,000 voters which party they intend to vote for. Which measure of central tendency will identify the preferred party?

  17. Ex. 71.17Understanding

    For a unimodal distribution with right skew (long positive tail), what is the typical order between mode, median, and mean? Explain intuitively.

  18. Ex. 71.18UnderstandingAnswer key

    Uniform distribution in [0,10][0, 10]. Determine the mean, median, and discuss the mode. What does this say about symmetric distributions?

  19. Ex. 71.19Understanding

    ENEM grades have a distribution close to normal. Is the mean or median more adequate to describe typical performance? Justify.

  20. Ex. 71.20Understanding

    An investor wants to know the most common number of rooms in apartments in a neighborhood. Which measure to use?

  21. Ex. 71.21UnderstandingAnswer key

    Page loading time: 95% of requests respond in less than 300 ms, but 1% take more than 5 s. Why do reliability engineers prefer median (P50) and percentiles (P95, P99) instead of the mean?

  22. Ex. 71.22Understanding

    Why for a continuous unimodal symmetric distribution are the three measures of central tendency equal? Explain geometrically.

  23. Ex. 71.23Modeling

    A/B testing: checkout time for site A has mean 12 s and median 9 s. Site B has mean 10 s and median 10 s. Which site has better experience for the typical user? Justify.

  24. Ex. 71.24Modeling

    Company A reports only an average salary of R$ 10k. Company B reports mean of R$ 8k and median of R$ 7k. What might the absence of the median in A be hiding?

  25. Ex. 71.25Modeling

    In K-means, the centroid of a cluster is the mean. What is the effect of an outlier on the centroid? How does K-medoids (which uses the median point) mitigate this problem?

  26. Ex. 71.26Modeling

    Quality control: parts with mean diameter dˉ=10.05\bar{d} = 10.05 mm and approximately symmetric distribution. To what value would you expect the median to be close? Why?

  27. Ex. 71.27Modeling

    In machine learning, MSE as a loss function implies the model learns to estimate the mean conditional. MAE implies the model estimates the median conditional. Explain why this follows from the variational characterization of central measures.

  28. Ex. 71.28Modeling

    A meta-analysis with 50 studies reports the median effect size instead of the mean. Why is the median preferred in meta-analysis?

  29. Ex. 71.29Modeling

    Why does the boxplot use the median as the central line (and IQR as box width) instead of using mean and standard deviation?

  30. Ex. 71.30Modeling

    In federated learning, why does replacing the mean of gradients with the median increase resistance to malicious clients (Byzantine attacks)?

  31. Ex. 71.31Modeling

    For the log-normal distribution (lnXN(μ,σ2)\ln X \sim N(\mu, \sigma^2)): mode =eμσ2= e^{\mu-\sigma^2}, median =eμ= e^\mu, mean =eμ+σ2/2= e^{\mu+\sigma^2/2}. Verify the ordering mode less than median less than mean for σ>0\sigma > 0.

  32. Ex. 71.32ModelingAnswer key

    Salaries ($k): 4, 4, 5, 5, 6, 7, 7, 8 (8 employees). A CEO with a salary of $60k is added (without removing anyone). Calculate mean and median before and after. Which measure changed more?

  33. Ex. 71.33Modeling

    Grades of 30 students on a test, grouped: [60,70)[60,70): 3 students; [70,80)[70,80): 8 students; [80,90)[80,90): 12 students; [90,100][90,100]: 7 students. Calculate the mean estimated by midpoints.

  34. Ex. 71.34Proof

    Show that i=1n(xixˉ)=0\sum_{i=1}^{n}(x_i - \bar{x}) = 0.

  35. Ex. 71.35Proof

    Show that i=1n(xic)2\sum_{i=1}^{n}(x_i - c)^2 is minimized at c=xˉc = \bar{x} for any sequence x1,,xnRx_1, \ldots, x_n \in \mathbb{R}.

  36. Ex. 71.36Proof

    Show that i=1nxic\sum_{i=1}^{n}|x_i - c| is minimized at c=medianc = \text{median}. (Hint: analyze what happens when shifting cc to one side or the other of the median, counting how many xix_i remain above and below.)

  37. Ex. 71.37Proof

    Show that if yi=axi+by_i = ax_i + b (linear transformation), then yˉ=axˉ+b\bar{y} = a\bar{x} + b.

  38. Ex. 71.38Challenge

    Does the mean satisfy f(xi)=f(xˉ)\overline{f(x_i)} = f(\bar{x}) in general? And the median? Investigate with f(t)=t2f(t) = t^2 and the data x={1,2,3}x = \{1, 2, 3\}.

  39. Ex. 71.39Challenge

    Cauchy distribution: f(x)=1/[π(1+x2)]f(x) = 1/[\pi(1+x^2)]. Calculate the median. Show that the mean does not exist (the integral +xf(x)dx\int_{-\infty}^{+\infty} x f(x)\,dx diverges).

  40. Ex. 71.40Challenge

    Show that if we swap the largest value of a dataset for an even larger value, the median does not change, but the mean increases.

  41. Ex. 71.41ChallengeAnswer key

    Two groups have means xˉ1\bar{x}_1 and xˉ2\bar{x}_2 with sizes n1n_1 and n2n_2. Derive the formula for the combined mean of the two groups.

  42. Ex. 71.42ChallengeAnswer key

    Jensen's inequality states that for convex φ\varphi, φ(E[X])E[φ(X)]\varphi(E[X]) \leq E[\varphi(X)]. Apply with φ(t)=t2\varphi(t) = t^2 to obtain an inequality between xˉ2\bar{x}^2 and x2\overline{x^2}. What does this imply about the variance?

Sources

Updated on 2025-05-14 · Author(s): Clube da Matemática

Found an error? Open an issue on GitHub or submit a PR — open source forever.