Suppose, I have a data set with eight features in my hand.

I have juxtaposed their means and medians row by row.

            f1       f2        f3        f4        f5        f6        f7        f8
mean      2.5000    0.1868    0.0148    0.2105    0.2088   79.6583    1.0604    0.0091
median    2.5000    0.1826    0.0001    0.0002    0.0000   -0.0000    0.0000   -0.0000

Can we tell anything about the existence of outliers from these information?

  • 2
    $\begingroup$ Not from just that. Not only does mean not equal to median not tell you there are outliers, mean $\approx$ median (or even exactly equal) doesn't tell you there aren't. $\endgroup$
    – Glen_b
    Nov 26, 2016 at 8:44

1 Answer 1


Without any further knowledge I don't think so. You can construct a dataset that has a specific mean and variance by doing the following:

  • Let the mean be $\mu$ and the median $m$ and the number of elements n.
  • Put $n+1$ elements at m and $n$ at position $x$. We can find $x$ using $n,m,\mu$: $$\frac{nx+(n+1)m}{2n+1} = \mu \Rightarrow x = \frac{(2n+1)\mu-(n+1)m}{n}$$

We've created a dataset with no outliers (two huge clusters) for any given pair of $\mu, m$.

Possible knowledge that could help

Lots of times data is usually distributed more uniformly/continuously, not like my counterexample. In particular if the distribution is pretty centered (like a Gaussian) and there's an outlier, it will heavily influence the mean but not the median and this can be perceived.

However, if the distribution is not centered (like a geometric distribution) a big difference between mean and median may not mean much.

  • $\begingroup$ What kind of further knowledge can help in this regard? $\endgroup$
    – user366312
    Nov 26, 2016 at 7:57
  • $\begingroup$ updated answer to include your further knowledge question $\endgroup$
    – etal
    Nov 26, 2016 at 8:12
  • $\begingroup$ Oh, I see! The data is Normally distributed. $\endgroup$
    – user366312
    Nov 26, 2016 at 8:14
  • 1
    $\begingroup$ @Alan "it will heavily influence the mean but not the variance": I guess by variance you mean median here. $\endgroup$
    – Nick Cox
    Nov 26, 2016 at 8:32
  • $\begingroup$ @anonymous If your data are normally distributed, you need not worry about outliers, but any substantial difference between mean and median implies that your sample is too small to allow serious analysis. To the point, what are your grounds for saying that? Have you tried e.g. normal probability plots? $\endgroup$
    – Nick Cox
    Nov 26, 2016 at 8:36

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.