Measures of Center
The mean, median, and mode are different ways to summarize the middle of data, and they can be far apart. “Average” usually means the mean. The geometric mean averages growth factors and ratios, and the expected value is the mean of a probability distribution rather than of data.
Definitions
Think of a list of numbers, like test scores. The mean of the list is the sum of all the numbers divided by how many there are. The mean of $2, 4, 9$ is $15 / 3 = 5$.
Consider data $x_1, \dots, x_n$. The mean of the data is
\[\bar{x} = \frac{1}{n} \sum_{i=1}^n x_i.\]Consider data $x_1, \dots, x_n$, and a random variable $X$ that takes each of the values $x_1, \dots, x_n$ with probability $1/n$ (counting repeated values once per repetition). The mean of the data is the expected value of $X$:
\[\bar{x} = \mathbb{E}[X] = \sum_{i=1}^n x_i \, \frac{1}{n}.\]Worked examples
-
Value:
$\frac{16}{3}$
$\frac{2 + 5 + 9}{3} = \frac{16}{3}$ -
Value:
$\frac{1 + 1 + 2 + 3 + 100}{5} = 21.4$
The mean of the data $1, 1, 2, 3, 100$ is $21.4$, because the outlier $100$ pulls the mean far above most of the data.
Think of a list of numbers, like the heights of the students in a class. An average of the list is a single number that represents a typical value of it. Usually, “average” means the arithmetic mean.
Think of a list of numbers, sorted from smallest to largest. The median of the list is the middle value. With an even number of values, it is the mean of the two middle values.
Consider a random variable $X$. A median of $X$ is a number $m$ such that
\[P(X \leq m) \geq \frac{1}{2} \quad \text{and} \quad P(X \geq m) \geq \frac{1}{2}.\]Worked examples
-
Value:
$5$
$\operatorname{median}(2, 5, 9) = 5$ -
Value:
$\operatorname{median}(1, 1, 2, 3, 100) = 2$
The median of the data $1, 1, 2, 3, 100$ is $2$, the middle value in sorted order, which the outlier $100$ does not affect. -
Value:
$\frac{3 + 4}{2} = 3.5$
The expected value and the median of a fair die roll are both $3.5$, which is not a possible outcome.
Think of a list of values, some of which may appear more than once. The mode of the list is the value that appears most often. A list can have several modes.
Consider a probability distribution, with its probability mass function (or density). A mode of the distribution is a value at which that function is largest.
Worked examples
-
Value:
$\operatorname{mode}(1, 1, 2, 3, 100) = 1$
The mode of the data $1, 1, 2, 3, 100$ is $1$, because $1$ is the only value that appears twice. -
Value:
Every outcome, $1$ through $6$
Every outcome is equally likely.
A weighted average is an average in which some values count more than others.
The weighted average of values $x_i$ with nonnegative weights $w_i$ is
\[\frac{\sum_i w_i x_i}{\sum_i w_i}.\]Values with larger weights count more.
Properties
- With equal weights, the weighted average is the ordinary mean.
- A weighted average lies between the smallest and largest of the values $x_i$.
Consider positive numbers $x_1, \dots, x_n$. The geometric mean of $x_1, \dots, x_n$ is the $n$th root of the product $x_1 x_2 \cdots x_n$:
\[\sqrt[n]{x_1 x_2 \cdots x_n}.\]Worked examples
-
Value:
$\sqrt[5]{1 \cdot 1 \cdot 2 \cdot 3 \cdot 100} = \sqrt[5]{600} \approx 3.59$
The geometric mean of the data $1, 1, 2, 3, 100$ is about $3.59$, which the outlier $100$ pulls up much less than the arithmetic mean, because the geometric mean averages the logarithms of the data.
Properties
- The geometric mean is at most the arithmetic mean, with equality only when all of the numbers are the same number (the AM–GM inequality).
- The logarithm of the geometric mean is the arithmetic mean of the logarithms.
- The geometric mean is suitable for finding the average of growth factors and ratios: a quantity that grows by the factors $x_1, \dots, x_n$ ends where it would if it grew by their geometric mean each time.
Consider a random quantity with several possible values, each with a probability. The expected value of the quantity is its long-run average: the average of its possible values, weighted by how likely each one is.
Consider a random variable $X$.
If $X$ is a discrete random variable, then the expected value of $X$ is
\[\mathbb{E}[X] = \sum_x x P(X = x).\]If $X$ is a continuous random variable with a density $f$, then the expected value of $X$ is
\[\mathbb{E}[X] = \int x f(x) \dx\]Worked examples
-
Value:
$\mathbb{E}[X] = 3.5$
$\mathbb{E}[X] = \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = 3.5$. Note: The expected value is not a possible outcome.
Properties
- The expected average of a random variable is a weighted average of the possible values, where each value is weighted by its probability.
- By the law of large numbers, the mean of many independent samples approaches the expected value.
- Expected value is linear: \[\mathbb{E}[a X + b Y] = a \mathbb{E}[X] + b \mathbb{E}[Y].\]
Examples
Each cell is the ___ of the data or distribution in that row.
The data $1, 1, 2, 3, 100$
| mean | $\frac{1 + 1 + 2 + 3 + 100}{5} = 21.4$ |
|---|---|
| median | $\operatorname{median}(1, 1, 2, 3, 100) = 2$ |
| mode | $\operatorname{mode}(1, 1, 2, 3, 100) = 1$ |
| geometric mean | $\sqrt[5]{1 \cdot 1 \cdot 2 \cdot 3 \cdot 100} = \sqrt[5]{600} \approx 3.59$ |
The roll of a fair die
| median | $\frac{3 + 4}{2} = 3.5$ |
|---|---|
| mode | Every outcome, $1$ through $6$ |
| expected value | $\mathbb{E}[X] = 3.5$ |
Missing example: credit_weighted_grades
Missing example: investment_growth