11
$\begingroup$

This article is above my league but it talks about a topic which I am interested in, the relationship between mean, mode and median. It says :

It is widely believed that the median of a unimodal distribution is "usually" between the mean and the mode. However, this is not always true...

My question: can someone provide examples of continuous unimodal (ideally simple) distributions where the median is outside the [mode, mean] interval? For example a distribution such as mode < mean < median.

=== EDIT =======

There are already good answers by Glen_b and Francis, but I realized that what I am really interested in is an example where mode < mean < median or median < mean < mode (that is both median is outside [mode, mean] AND median is "on the same side" as mean of mode (i.e. both above or below mode)). I can accept the answers here are open a new question or maybe someone can suggest a solution here directly?

$\endgroup$
  • $\begingroup$ It's no trouble to extend the answer to cover the more restricted case. $\endgroup$ – Glen_b Dec 15 '16 at 9:32
  • 2
    $\begingroup$ Check out figure 6 here: ww2.amstat.org/publications/jse/v13n2/vonhippel.html which gives a (continuous unimodal) Weibull example where the median is not between the mode and mean. $\endgroup$ – Matthew Towers Dec 15 '16 at 12:08
14
$\begingroup$

Sure, it's not hard to find examples - even continuous unimodal ones - where the median is not between the mean and the mode.

  1. Consider $T_1,T_2$ i.i.d from a triangular distribution of the form $f_T(t) = 2(1-t) \mathbb{1}_{0<t<1}$

    Now let $X$ be a 60-40 mixture of $T_1$ and $-4T_2$.

    The density of $X$ looks like this:

    Mixture of two triangular densities with the median outside the mode-mean interval

    The mean is below 0, the mode is at 0, but the median is above 0. A minor modification of this would yield an example where even the density (rather than just the cdf) was continuous, but the relationship between location-measures was the same (edit: see 3. below).

  2. Generalizing, let's put a proportion $p$ (with $0<p<1$) of the total probability into the right-hand-side triangle and a proportion $(1-p)$ into the left-hand side triangle (in place of the 0.6 and 0.4 we had before). Further, make the scaling factor on the left half $-\beta$ rather than $-4$ (with $\beta>0$):

    density for the generalized version of that mixture of two triangular densities

    Now assuming $p>\frac12$, the median will always be in the interval covered by the right-triangle, so the median will exceed the mode (which will always remain at $0$). In particular, when $p>\frac12$, the median will be at $1-1/\sqrt{2p}$.

    The mean will be at $(p - \beta(1-p))/3$.

    If $\beta>p/(1-p)$ then the mean will be below the mode, and if $\beta< p/(1-p)$ the mean will be above the mode.

    On the other hand, we want $ (p - \beta(1-p))/3 < 1-1/\sqrt{2p}$ to keep the mean below the median.

    Consider $p=0.7$; this puts the median above the mode.

    Then $\beta=2$ would satisfy $\beta<p/(1-p)$ so the mean is above the mode.

    The median is actually at $1-1/\sqrt{1.4}\approx 0.1548$ while the mean is at $\frac{0.7-2(0.3)}{3}\approx 0.0333$. Hence for $p=0.7$ and $\beta=2$, we have mode < mean < median.

    (NB For consistency with my notation, the variable on the x-axis for both plots should be $x$ rather than $t$ but I am not going to go back and fix it.)

  3. This is an example where the density itself is continuous. It is based on the approach in 1. and 2. above, but with the "jump" replaced with a steep slope (and then the entire density flipped about 0 because I want an example that looks right-skew).

    continuous, piecewise linear density with median<mean<mode

    [Using the "mixture of triangular densities" approach, it can be generated as a mixture of 3 independent scaled variates of the triangular form described in section 1. We now have 15% $T_1$, 60% $-3T_2$ and 25% $5T_3$.]

    As we see in the diagram above, the mean is in the middle, as requested.


  1. Note that m_t_ mentions the Weibull in comments (for which the median is outside the $[\text{mode},\text{mean}]$ interval for a small range of the shape parameter $k$). This is potentially satisfying because it's a well-known unimodal continuous (and smooth) distribution with simple functional form.

    In particular, for small values of the Weibull shape parameter, the distribution is right-skew, and we have the usual situation of median between the mode and the mean, while for large values of the Weibull shape parameter, the distribution is left-skew, and we again have that "median in the middle" situation (but now with the mode at the right rather than the mean). In between those cases is a small region where the median is outside the mean-mode interval, and in the middle of that the mean and mode cross over:

          k                 order
     (0,3.2589)      mode < median < mean
      ≈ 3.2589       mode = median < mean
    (3.2589,3.3125)  median < mode < mean    (1)
      ≈ 3.3215       median < mode = mean
    (3.3215,3.4395)  median < mean < mode    (2)
      ≈ 3.4395       median = mean < mode
      3.4395+        mean < median < mode
      (≈3.60235      moment-skewness = 0)
    

    Choosing convenient values for the shape parameter in the intervals marked (1) and (2) above -- ones where the gaps between the location-statistics are about equal -- we get:

    Weibull densities with median outside the mode-mean interval

    While these fulfill the requirements, unfortunately the three location-parameters are so close together that we can't visually distinguish them (they all fall in the same pixel), which is a little disappointing -- the cases for my earlier examples are much more separated. (Nevertheless it does suggest situations to examine with other distributions, some of which might give outcomes which are more visually distinct.)

$\endgroup$
  • $\begingroup$ That works, thanks. Out of curiosity, what would be a similar "triangular distribution" where mode < mean < median? (here median < mode < mean) $\endgroup$ – Janthelme Dec 15 '16 at 7:07
  • $\begingroup$ Actually in my original example mean<mode<median ; you had the inequalities backward there. I have now added a similar example where the mean is above the mode but below the median (indeed, you could simply have replaced the original $-4T_2$ with say $-1.25T_2$ and kept the mixture proportions at $0.6$ for the right part and $0.4$ for the left part). $\endgroup$ – Glen_b Dec 15 '16 at 9:20
6
$\begingroup$

The following example is taken from Jordan Stoyanov's Counterexamples in Probability.

Given positive constant $c$ and $\lambda$, consider a random variable $X$ with density $$f(x)=\begin{cases}ce^{-\lambda(x-c)}, & x\in(c, \infty) \\ x, & x\in(0, c] \\ 0, & x\in(-\infty,0].\end{cases}$$ The mean $\mu$, median $m$ and mode $M$ of $X$ can be found as $$\mu=\frac{c^3}{3}+\frac{c^2}{\lambda}+\frac{c}{\lambda^2},\qquad m=1,\qquad M=c.$$ Note $f(x)$ is a density only if $$\frac{c^2}{2}+\frac{c}{\lambda}=1.$$ So if we let $c\to1$ then $\lambda\to2$. As a result, if we choose a $c>1$ that's close to $1$ (say $1.0001$), we can find that $\mu>c$ and $M=c$, so median $m$ does not fall between $\mu$ and $M$.

$\endgroup$
0
$\begingroup$

Take the exponential distribution with rate parameter a and density a exp(-ax) for 0<=x< infinity. The mode is at zero. Of course the mean and the median are greater than 0. The cdf is 1-exp(-ax). So for the median solve for exp(-ax)=0.5 for x. Then -ax=ln(0.5) or x = -ln(0.5)/a. For the mean integrate ax exp(-ax) from 0 to infinity. Take a=1 and we have a median = -ln(0.5)=ln(2) and mean = 1.

So mode < median < mean.

$\endgroup$
  • 1
    $\begingroup$ Sorry, but aren't we looking for distributions where mode < mean < median (or more generally where median is outside [mode, average])? $\endgroup$ – Janthelme Dec 15 '16 at 6:58
  • 3
    $\begingroup$ Sorry for the confusion, I did add to the original question, but what I was asking originally is for examples where median is outside [mode, mean] while I think median is inside [mode, median] in your example. $\endgroup$ – Janthelme Dec 15 '16 at 8:56
  • 3
    $\begingroup$ Michael, the question doesnt ask for a case where the median is between the mode and the mean. You misquote the original in your comment just above this one; the question does not say "mode<median<mean" where you state that it does (and has never done so at any point in the edit history). As a result, your answer supplies a case which is not asked for; indeed that's the usual situation (median in the middle of the other two) that the question seeks exceptions from. Almost any well-known skewed unimodal distribution has the median in the middle - the trick is finding ones that don't do that. $\endgroup$ – Glen_b Dec 15 '16 at 22:13
  • 1
    $\begingroup$ The edit history is available by clicking on the red link at the bottom of the question where it currently says "edited 18 hours ago" (it changed to 19 while I was typing these comments). You can see the history of edits by clicking there. The question was posted 22 hours ago (as I type this now), and when you click through to the edit history that original question can be seen at the bottom labelled "1". Your answer appeared about 2 hours later (20 hours ago), when that was what the question still said. About 1-2 hours after your post, the OP edited their question once, which can be seen ... $\endgroup$ – Glen_b Dec 16 '16 at 2:55
  • 1
    $\begingroup$ ctd ... at the top of the edit history.. There's a two-minute window after each edit to make changes that count as part of that edit (i.e. at 22 hours ago and at 18-19 hours ago there was a two-minute window each time where say a typo might have been fixed) but ~20 hours ago when you posted, the question had been unchanged for about 2 hours, and it remained unchanged for more than an hour after you posted, when a major edit (shown in the edit history) was performed. Any edits outside those brief two-minute post-edit windows would be in the edit history. $\endgroup$ – Glen_b Dec 16 '16 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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