21  Arithmetic mean

Ity kosa mazava! Sa?

The mean is likely the most familiar concepts in statistics. Almost everyone knows how to calculate the average of numbers: “the sum of all values divided by the total count.” Yet, when presented with the formal mathematical equation (see Equation 21.2 and Equation 21.3), the confidence is lost. Hopefully, these formulas should be less daunting after reading Chapter 4 on mathematical notation.

There are three main ways to calculate the mean. The simple “sum divided by count” is the standard practical method. A second method applies when weights or coefficients are involved, such as with course grades. In that case, you multiply each grade by its coefficient, sum those products, and divide the total by the sum of all coefficients.

The third and most general formula multiplies each value by its relative frequency of occurrence and sums the results. In the grades example, instead of dividing by the sum of coefficients at the end, one multiplies each grade by its proportion of the total weight. This general approach allows to calculate the mean directly from a distribution (Chapter 19).

While the mean is the most common metric used to summarize data, reducing a set of numbers to a single value means losing helpful details. For instance, a student with test scores of 10/20 and 10/20 has the exact same average as a student with 5/20 and 15/20, even though their performance are completely different. Being the most common summary metric does not make the mean the best or the only option for every situation.

Formal

Here are three equations for calculating the mean. If the values are denoted by \(x_i\) and there are \(n\) observations, the familiar formula is:

\[ \bar{X} = \mu = \frac{1}{n} \sum_{i=1}^{n} x_i \tag{21.1}\]

The second formula is similar; if \(x_i\) repeats \(n_i\) times () with \(\sum n_i = n\), the equation for the mean is:

\[ \mu = \frac{1}{n} \sum_{i} n_i \, x_i \tag{21.2}\]

The third and general formula is obtained by multiplying each \(x_i\) by \(p_i = \pfrac{n_i}{n}\):

\[ \mu = \sum_{i} p_i \, x_i \tag{21.3}\]

In other words, the \(n\) outside the \(\sum\) in Equation 21.2 is distributed inside the summation symbol \(\sum\).

Examples

Assume the grades of six students in a class are: \(\{5, 7, 10, 10, 12, 14\}\). Below are three formulas to calculate the mean :

  1. \(\dfrac{5 + 7 + 10 + 10 + 12 + 14}{6}\)

  2. \(\dfrac{1 \times 5 + 1 \times 7 + 2 \times 10 + 1 \times 12 + 1 \times 14}{6}\)

  3. \(\dfrac{1}{6} \times 5 + \dfrac{1}{6} \times 7 + \dfrac{2}{6} \times 10 + \dfrac{1}{6} \times 12 + \dfrac{1}{6} \times 14\)

Tips and warnings

  • The mean serves as a primary summary metric designed to capture the central tendency of a dataset, it is the center of mass (or gravity) of the data.

  • The arithmetic mean is only valid for quantitative variables otherwise (\(n_i \times x_i\) or \(\sum x_i\)) is not defined (Chapter 17)

  • The mean is highly sensitive to outliers or extreme skewness. For instance, computing the mean of the sequence \((1, 1, 1, 1, 10\,000\,000)\) yields \(2\,000\,000.4\), beyond the numerical value, it does not have a practical intepretation.

  • Averaging can yield incorrect conclusions when dealing with rates or ratios. For example, if you travel from Fianarantsoa to Ambalavao covering equal distances at \(30\text{ km/h}\) and \(60\text{ km/h}\), your overall average speed is not \(\frac{30 + 60}{2} = 45\text{ km/h}\).1

  • There are alternative definitions to calculate the mean (geometric and harmonic mean). In the speed example above, calculating the harmonic mean provides the correct average speed2.

  • When the distribution is perfectly symmetric (where the left side of the distribution mirrors the right), the center of gravity of the point symmetry is thus is the mean.

Notation/Semantic/Terminology

  • mean and average are synonymous, referring to the arithmetic measure of central location .

  • In probability theory and inferential statistics, the theoretical counterpart of the empirical mean is the expected value or expectation, denoted as \(\mathbb{E}[X]\). If dealing with a population Chapter 15, they are the same. But when sampling is involved, the empirical mean (\(\bar{X}\)) is an estimate of the population mean.

  • In mathematics, the mean is formalised as the first moment (often written as \(\mu_1\) or \(\mathbb{E}[X^1]\)). Higher-order moments describe other structural properties of a distribution—such as variance (second central moment) and skewness (third standardized moment).


  1. Left to the reader as an exercise to re-calculate the true mean spped↩︎

  2. Left to the reader as an exercise↩︎