23
$\begingroup$

The concept of "mean" roams far wider than the traditional arithmetic mean; does it stretch so far as to include the median? By analogy,

$$ \text{raw data} \overset{\text{id}}{\longrightarrow} \text{raw data} \overset{\text{mean}}{\longrightarrow} \text{raw mean} \overset{\text{id}^{-1}}{\longrightarrow} \text{arithmetic mean} \\ \text{raw data} \overset{\text{recip}}{\longrightarrow} \text{reciprocals} \overset{\text{mean}}{\longrightarrow} \text{mean reciprocal} \overset{\text{recip}^{-1}}{\longrightarrow} \text{harmonic mean} \\ \text{raw data} \overset{\text{log}}{\longrightarrow} \text{logs} \overset{\text{mean}}{\longrightarrow} \text{mean log} \overset{\text{log}^{-1}}{\longrightarrow} \text{geometric mean} \\ \text{raw data} \overset{\text{square}}{\longrightarrow} \text{squares} \overset{\text{mean}}{\longrightarrow} \text{mean square} \overset{\text{square}^{-1}}{\longrightarrow} \text{root mean square} \\ \text{raw data} \overset{\text{rank}}{\longrightarrow} \text{ranks} \overset{\text{mean}}{\longrightarrow} \text{mean rank} \overset{\text{rank}^{-1}}{\longrightarrow} \text{median} $$

The analogy I am drawing is to the quasi-arithmetic mean, given by:

$$M_f(x_1,\dots,x_n)=f^{-1}\left(\frac{1}{n}\sum_{i=1}^{n}f(x_i) \right)$$

For comparison, when we say that the median of a five-item dataset is equal to the third item, we can see that as equivalent to ranking the data from one to five (which we might denote by a function $f$); taking the mean of the transformed data (which is three); and reading back off the value of the item of data that had rank three (a sort of $f^{-1}$).

In the examples of geometric mean, harmonic mean and RMS, $f$ was a fixed function that can be applied to any number in isolation. In contrast, either to assign a rank, or to work back from ranks to the original data (interpolating where necessary) requires knowledge of the entire data set. Moreover in definitions I have read of the quasi-arithmetic mean, $f$ is required to be continuous. Is the median ever considered as a special case of quasi-arithmetic mean, and if so how is the $f$ defined? Or is the median ever described as an instance of some other wider notion of "mean"? The quasi-arithmetic mean is certainly not the only generalization available.

Part of the issue is terminological (what does "mean" mean anyway, especially in contrast to "central tendency" or "average"?). For instance, in the literature for fuzzy control systems, an aggregation function $F:[a,b] \times [a,b] \to [a,b]$ is an increasing function with $F(a,a)=a$ and $F(b,b)=b$; an aggregation function for which $\min(x,y) \leq F(x,y) \leq \max(x,y)$ for all $x,y \in [a,b]$ is called a "mean" (in a general sense). Such a definition is, needless to say, incredibly broad! And in this context the median is indeed referred to as a type of mean.$^{[1]}$ But I am curious whether less broad characterisations of the mean can still extend far enough to encompass the median – the so-called generalized mean (which might better be described as the "power mean") and the Lehmer mean do not, but others may. For what it's worth, Wikipedia includes "median" in its list of "other means", but without further comment or citation.

$[1]$: Such a broad definition of mean, suitably extended for more than two inputs, seems standard in the field of fuzzy control and cropped up many times during internet searches for instances of the median being described as a median; I will cite e.g. Fodor, J. C., & Rudas, I. J. (2009), "On Some Classes of Aggregation Functions that are Migrative", IFSA/EUSFLAT Conf. (pp. 653-656). Incidentally, this paper notes that one of the earliest users of the term "mean" (moyenne) was Cauchy, in the Cours d'analyse de l'École royale polytechnique, 1ère partie; Analyse algébrique (1821). Later contributions of Aczél, Chisini, Kolmogorov and de Finetti in developing more general concepts of "mean" than Cauchy are acknowledged in Fodor, J., and Roubens, M. (1995), "On meaningfulness of means", Journal of Computational and Applied Mathematics, 64(1), 103-115.

$\endgroup$
15
  • $\begingroup$ I think arithmetic average, median and mode ore often called in general as "mean" and the word is sometimes used in ambiguous way. How To Lie With Statistics book uses it as an example of "lying" with statistics. (I understand your question is more general so post it as a comment.) $\endgroup$
    – Tim
    Feb 11, 2015 at 11:37
  • $\begingroup$ @Tim I have the unscientific impression that it's rare to see "mode" referred to as "mean". But there's definitely a huge nexus of confusion around the usage of "average" (which is sometimes used as a synonym for "arithmetic mean" and other times includes measures of central tendency that are not means at all) and "mean" (which in general use, rather than in the technical sense, is mostly but not exclusively used for "arithmetic mean"). Incidentally it's also a hard topic for internet searches, due to the other meanings of "mean"! $\endgroup$
    – Silverfish
    Feb 11, 2015 at 11:59
  • 4
    $\begingroup$ means (arithmetic, geometric, harmonic, powered, exponential, combinatorial, etc) are "analytic averages". Median, quantiles, tantiles are "positional averages". Ranking is quite different from log, square etc because it is the monotonic transformation of any variate to uniform variate and there is no back path to untransform. $\endgroup$
    – ttnphns
    Feb 11, 2015 at 12:04
  • 3
    $\begingroup$ If you allow weights in calculation $\sum_i w_i x_i, \sum_i w_i = 1$, then the median could easily be regarded as a kind of mean. Similarly, but not identically, the concept of trimmed means certainly includes medians as a limiting or courtesy special case. stata-journal.com/article.html?article=st0313 is one fairly recent review. $\endgroup$
    – Nick Cox
    Feb 11, 2015 at 13:33
  • 1
    $\begingroup$ @whuber I think that's a helpful way of summarising the nub of the problem. I will edit to incorporate it. $\endgroup$
    – Silverfish
    Feb 11, 2015 at 19:44

6 Answers 6

9
$\begingroup$

Here's one way that you might regard a median as a "general sort of mean" -- first, carefully define your ordinary arithmetic mean in terms of order statistics:

$$\bar{x} = \sum_i w_i x_{(i)},\qquad w_i=\frac{_1}{^n}\,.$$

Then by replacing that ordinary average of order statistics with some other weight function, we get a notion of "generalized mean" that accounts for order.

In that case, a host of potential measures of center become "generalized sorts of means". In the case of the median, for odd $n$, $w_{(n+1)/2}=1$ and all others are 0, and for even $n$, $w_{\frac{n}{2}}=w_{\frac{n}{2}+1}=\frac{1}{2}$.

Similarly, if we look at M-estimation, location estimates might also be thought of as a generalization of the arithmetic mean (where for the mean, $\rho$ is quadratic, $\psi$ is linear, or the weight-function is flat), and the median falls also into this class of generalizations. This is a somewhat different generalization than the previous one.

There are a variety of other ways we might extend the notion of 'mean' that could include median.

$\endgroup$
1
  • $\begingroup$ This is very nice. Closely related to this answer, and which is discussed in the papers cited in the question: the ordered weighted average, or OWA $\endgroup$
    – Silverfish
    Feb 13, 2015 at 20:51
13
$\begingroup$

If you think of the mean as the point minimizing the quadratic loss function SSE, then the median is the point minimizing the linear loss function MAD, and the mode is the point minimizing some 0-1 loss function. No transformations required.

So the median is an example of a Fréchet mean.

$\endgroup$
3
  • 3
    $\begingroup$ @Mike Anderson: Well, this shows that the media is a Frechet mean (see the wikipedia article): en.wikipedia.org/wiki/Fr%C3%A9chet_mean $\endgroup$ Feb 11, 2015 at 20:58
  • $\begingroup$ @Kjetil Excellent! The fact that the median is an example of a Fréchet mean is exactly an answer to my question "is the median ever described as an instance of some other wider notion of "mean"?" And +1 to Mike Anderson. I hope this information is edited into the answer. $\endgroup$
    – Silverfish
    Feb 11, 2015 at 21:13
  • 2
    $\begingroup$ I've added @Kjetil's comment to the answer so that it will show up in a site search for "Frechet mean". Thanks to both of you. $\endgroup$
    – Silverfish
    Mar 24, 2015 at 23:05
5
$\begingroup$

The question invites us to characterize the concept of "mean" in a sufficiently broad sense to encompass all the usual means--power means, $L^p$ means, medians, trimmed means--but not so broadly that it becomes almost useless for data analysis. This reply discusses some of the axiomatic properties that any reasonably useful definition of "mean" should have.


Basic Axioms

A usefully broad definition of "mean" for the purpose of data analysis would be any sequence of well-defined, deterministic functions $f_n:A^n\to A$ for $A\subset\mathbb{R}$ and $n=1, 2, \ldots$ such that

(1) $\newcommand{\x}{\mathrm{x}} \newcommand{\min}{\text{min}}\min (\x)\le f_n(\x)\le \max(\x)$ for all $\x = (x_1, x_2, \ldots, x_n)\in A^n$ (a mean lies between the extremes),

(2) $f_n$ is invariant under permutations of its arguments (means do not care about the order of the data), and

(3) each $f_n$ is nondecreasing in each of its arguments (as the numbers increase, their mean cannot decrease).

We must allow for $A$ to be a proper subset of real numbers (such as all positive numbers) because plenty of means, such as geometric means, are defined only on such subsets.

We might also want to add that

(1') there exists at least some $\x\in A$ for which $\min(\x)\ne f_n(\x)\ne \max(\x)$ (means are not extremes). (We cannot require that this always hold. For instance, the median of $(0,0,\ldots,0,1)$ equals $0$, which is the minimum.)

These properties seem to capture the idea behind a "mean" being some kind of "middle value" of a set of (unordered) data.

Consistency axioms

I am further tempted to stipulate the rather less obvious consistency criterion

(4.a) The range of $f_{n+1}(t, x_1, x_2, \ldots, x_n)$ as $t$ varies throughout the interval $[\min(\x), \max(\x)]$ includes $f_n(\x)$. In other words, it is always possible to leave the mean unchanged by adjoining an appropriate value $t$ to a dataset. In conjunction with (3), it implies that adjoining extreme values to a dataset will pull the mean towards those extremes.

If we wish to apply the concept of mean to a distribution or "infinite population", then one way would be to obtain it in the limit of arbitrarily large random samples. Of course the limit might not always exist (it does not exist for the arithmetic mean when the distribution has no expectation, for instance). Therefore I do not want to impose any additional axioms to guarantee the existence of such limits, but the following seems natural and useful:

(4.b) Whenever $A$ is bounded and $\x_n$ is a sequence of samples from a distribution $F$ supported on $A$, then the limit of $f_n(\x_n)$ almost surely exists. This prevents the mean from forever "bouncing around" within $A$ even as sample sizes get larger and larger.

Along the same lines, we could further narrow the idea of a mean to insist that it become a better estimator of "location" as sample sizes increase:

(4.c) Whenever $A$ is bounded, then the variance of the sampling distribution of $f_n(X^{(n)})$ for a random sample $X^{(n)} = (X_1, X_2, \ldots, X_n)$ of $F$ is nondecreasing in $n$.

Continuity axiom

We might consider asking means to vary "nicely" with the data:

(5) $f_n$ is separately continuous in each argument (a small change in the data values should not induce a sudden jump in their mean).

This requirement might eliminate some strange generalizations, but it does not rule out any well-known mean. It will rule out some aggregation functions.

An invariance axiom

We can conceive of means as applying to either interval or ratio data (in Stevens' well-known sense). We cannot demand they be invariant under shifts of location (the geometric mean is not), but we can require

(6) $f_n(\lambda \x) = \lambda f_n(\x)$ for all $\x \in A^n$ and all $\lambda \gt 0$ for which $\lambda \x \in A^n$. This says only that we are free to compute $f_n$ using any units of measurement we like.

All the means mentioned in the question satisfy this axiom except for some aggregation functions.


Discussion

General aggregation functions $f_2$, as described in the question, do not necessarily satisfy axioms (1'), (2), (3), (5), or (6). Whether they satisfy any consistency axioms may depend on how they are extended to $n\gt 2$.

The usual sample median enjoys all these axiomatic properties.

We could augment the consistency axioms to include

(4.d) $f_{2n}(\x;\x) = f_n(\x)$ for all $\x \in A^n.$

This implies that when all elements of a dataset are repeated equally often, the mean does not change. This may be too strong, though: the Winsorized mean does not have this property (except asymptotically). The purpose of Winsorizing at the $100\alpha\%$ level is to provide resistance against changes in at least $100\alpha\%$ of the data at either extreme. For instance, the 10% Winsorized mean of $(1,2,3,6)$ is the arithmetic mean of $(2,2,3,3)$, equal to $2.5$, but the 10% Winsorized mean of $(1,1,2,2,3,3,6,6)$ is $3.5$.

I do not know which of the consistency axioms (4.a), (4.b), or (4.c) would be most desirable or useful. They appear to be independent: I don't think any two of them imply the third.

$\endgroup$
8
  • $\begingroup$ (+1) I think (1'), "means are not extremes", is an interesting point. Many otherwise natural definitions of mean happen to include the minimum and maximum as special or limiting cases: this is true of power means, Lehmer means, Fréchet mean, Chisini mean and Stolarsky mean. Though it does seem a bit odd to refer to them as "average"! $\endgroup$
    – Silverfish
    Feb 14, 2015 at 0:00
  • $\begingroup$ Yes, limiting cases are unavoidable. But for finite datasets we might want to insist that neither the max nor the min qualify as "means." $\endgroup$
    – whuber
    Feb 14, 2015 at 0:01
  • $\begingroup$ On the other hand, not only is it true that "the usual sample median enjoys all these axiomatic properties", but so do the usual sample quantile (unless I've missed something). It also feels a bit odd to refer to e.g. the upper quartile as a "mean" (though I've seen it used as a measure of central tendency on very skewed data). If we accept all other quantiles, it no longer feels quite so perverse to admit minima and maxima. But I can certainly see it may be desirable to at least retain the right to exclude them. $\endgroup$
    – Silverfish
    Feb 14, 2015 at 0:05
  • 1
    $\begingroup$ I am not perturbed by the admission of quantiles into the pantheon of means. After all, for given families of distributions, certain non-median quantiles will coincide with arithmetic means, so you could be in trouble if you tried to eliminate this possibility axiomatically. (Consider a family of lognormal distributions of constant geometric SD, for instance.) If the arithmetic mean cannot qualify as a mean, all is lost! $\endgroup$
    – whuber
    Feb 14, 2015 at 0:11
  • 1
    $\begingroup$ I have considered that approach and rejected it, as explained in my answer: if you apply such a criterion for $n \gt 2$, you eliminate the median as a form of mean! $\endgroup$
    – whuber
    Feb 14, 2015 at 0:19
4
$\begingroup$

One easy but fruitful generalization is to weighted means, $\sum_{i=1}^n w_i x_i / \sum_{i=1}^n w_i,$ where $\sum_{i=1}^n w_i = 1$. Clearly the common or garden mean is the simplest special case with equal weights $w_i = 1/n$.

Letting the weights depend on the order of values in magnitude, from smallest to largest, points to various other special cases, notably the idea of a trimmed mean, which is known by other names too.

To avoid excessive use of notation where it is not needed or especially helpful, imagine for example ignoring the smallest and largest values and taking the (equally weighted) mean of the others. Or imagine ignoring the two smallest and two largest and taking the mean of the others; and so forth. The most vigorous trimming would ignore all but the one or two middle values in order, depending on whether the number of values was odd or even, which is naturally just the familiar median. Nothing in the idea of trimming commits you to ignoring equal numbers in each tail of a sample, but saying more about asymmetric trimming would take us further away from the main idea in this thread.

In short, means (unqualified) and medians are extreme limiting cases of the family of (symmetric) trimmed means. The overall idea is to allow compromises between one ideal of using all the information in the data and another ideal of protecting oneself from extreme data points, which may be unreliable outliers.

See the reference here for one fairly recent review.

$\endgroup$
2
$\begingroup$

I think the median can be considered a type of a generalization of the arithmetic mean. Specifically, the arithmetic mean and the median (among others) can be unified as special cases of the Chisini mean. If you are going to perform some operation over a set of values, the Chisini mean is a number that you can substitute for all of the original values in the set and still get the same result. For example, if you want to sum your values, replacing all the values with the arithmetic mean will yield the same sum. The idea is that a certain value is representative of the numbers in the set in the context of a certain operation over those numbers. (An interesting implication of this way of thinking is that a given value—the arithmetic mean—can only be considered representative under the assumption that you are doing certain things with those numbers.)

This is less obvious for the median (and I note that the median is not listed as one of the Chisini means on Wolfram or Wikipedia), but if you were to allow operations over ranks, the median could fit within the same idea.

$\endgroup$
9
  • $\begingroup$ This is a very interesting suggestion. Could you suggest a suitable operation, so that for a median $M$ we would have $f(M,M,...,M)=f(x_1,x_2,...,x_n)$? $\endgroup$
    – Silverfish
    Feb 11, 2015 at 20:33
  • $\begingroup$ That's a good question, @Silverfish, I've been thinking about that ;-). My thinking is more that, in your Q & the discussion in comments, the conceptual framework seems to be how to get the mean & how to get the data back from the mean; OTOH, my framing is what we use the mean for: viz as a compressed representation of the data w/ the minimum information loss. $\endgroup$ Feb 11, 2015 at 21:03
  • $\begingroup$ I've added some citations to the question which show a wider range of conceptual frameworks, including this one. At the moment I can't see a better $f$ than "take the median", which doesn't quite seem within the spirit of the piece! $\endgroup$
    – Silverfish
    Feb 13, 2015 at 21:16
  • $\begingroup$ @Silverfish, I grant that does seem like a somewhat problematic hole in my position. $\endgroup$ Feb 13, 2015 at 21:17
  • $\begingroup$ While the insight from Chisini's set-up is that, for example, the arithmetic mean preserves the sum, while the geometric mean preserves the product, it's still true (just less interesting) that the arithmetic mean of $(\bar{x}, \bar{x}, ..., \bar{x})$ is also $\bar{x}$ and so on. So I'm not convinced it's a fatal blow. $\endgroup$
    – Silverfish
    Feb 13, 2015 at 21:43
-1
$\begingroup$

The question is not well defined. If we agree on the common "street" definition of mean as the sum of n numbers divided by n then we have a stake in the ground. Further If we would look at measures of central tendency we could say both Mean and Median are generealization but not of each other. Part of my background is in non parametrics so I like the median and the robustness it provides, invariance to monotonic transformation and more. but each measure has it's place depending on objective.

$\endgroup$
3
  • 3
    $\begingroup$ Welcome to our site, Bob. I believe that if you read to the end of the question--especially the long penultimate paragraph--you will discover that it is precise and well-defined. (If not, it would be a good idea to explain what you mean by "not well defined.) Your comments don't really seem to address what is being asked. $\endgroup$
    – whuber
    Feb 13, 2015 at 19:01
  • 1
    $\begingroup$ I actually sympathise with Bob's feeling that the question is not terribly well-defined, in the sense that the concept of "mean" does not have a single definition, but I have tried my best to make things as clear as possible. I hope my most recent edit helps clarify things. $\endgroup$
    – Silverfish
    Feb 13, 2015 at 20:58
  • 2
    $\begingroup$ The reason I feel the question has some value other than mere terminology (what does mean mean anyway, and is there a definition we can stretch as far as to include the median?) is that it may be instructive to see the median as just one member of a family of generalizations of the mean; Nick Cox's example of the median as a limiting case of the trimmed mean is particularly nice - it ties in neatly with the "robustness" property you like. In the family of trimmed means, the "street" arithmetic mean and the median lie at opposite ends with a spectrum between them. $\endgroup$
    – Silverfish
    Feb 13, 2015 at 21:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.