Mode (statistics)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
For other uses, see Mode.



The mode is not necessarily unique, since the probability mass function or probability density function may take the same maximum value at several points x1, x2, etc. The most extreme case occurs in uniform distributions, where all values occur equally frequently.



Mode of a sample[edit]



The following MATLAB (or Octave) code example computes the mode of a sample:

X = sort(x);
mode      =  X(indices(i));


Comparison of mean, median and mode[edit]

See also: mean and median
Comparison of common averages of values { 1, 2, 2, 3, 4, 7, 9 }
Type Description Example Result
Arithmetic mean Sum of values of a data set divided by number of values: \scriptstyle\bar{x} = \frac{1}{n}\sum_{i=1}^n x_i (1+2+2+3+4+7+9) / 7 4
Median Middle value separating the greater and lesser halves of a data set 1, 2, 2, 3, 4, 7, 9 3
Mode Most frequent value in a data set 1, 2, 2, 3, 4, 7, 9 2


Unlike mean and median, the concept of mode also makes sense for "nominal data" (i.e., not consisting of numerical values in the case of mean, or even of ordered values in the case of median). For example, taking a sample of Korean family names, one might find that "Kim" occurs more often than any other name. Then "Kim" would be the mode of the sample. In any voting system where a plurality determines victory, a single modal value determines the victor, while a multi-modal outcome would require some tie-breaking procedure to take place.


Uniqueness and definedness[edit]

For the remainder, the assumption is that we have (a sample of) a real-valued random variable.

For some probability distributions, the expected value may be infinite or undefined, but if defined, it is unique. The mean of a (finite) sample is always defined. The median is the value such that the fractions not exceeding it and not falling below it are both at least 1/2. It is not necessarily unique, but never infinite or totally undefined. For a data sample it is the "halfway" value when the list of values is ordered in increasing value, where usually for a list of even length the numerical average is taken of the two values closest to "halfway". Finally, as said before, the mode is not necessarily unique. Certain pathological distributions (for example, the Cantor distribution) have no defined mode at all.[citation needed] For a finite data sample, the mode is one (or more) of the values in the sample.


Assuming definedness, and for simplicity uniqueness, the following are some of the most interesting properties.

  • All three measures have the following property: If the random variable (or each value from the sample) is subjected to the linear or affine transformation which replaces X by aX+b, so are the mean, median and mode.
  • However, if there is an arbitrary monotonic transformation, only the median follows; for example, if X is replaced by exp(X), the median changes from m to exp(m) but the mean and mode won't.[citation needed]
  • Except for extremely small samples, the mode is insensitive to "outliers" (such as occasional, rare, false experimental readings). The median is also very robust in the presence of outliers, while the mean is rather sensitive.
  • In continuous unimodal distributions the median lies, as a rule of thumb, between the mean and the mode, about one third of the way going from mean to mode. In a formula, median ≈ (2 × mean + mode)/3. This rule, due to Karl Pearson, often applies to slightly non-symmetric distributions that resemble a normal distribution, but it is not always true and in general the three statistics can appear in any order.[1][2]
  • For unimodal distributions, the mode is within \sqrt{3} standard deviations of the mean, and the root mean square deviation about the mode is between the standard deviation and twice the standard deviation.[3]

Example for a skewed distribution[edit]

An example of a skewed distribution is personal wealth: Few people are very rich, but among those some are extremely rich. However, many are rather poor.

Comparison of mean, median and mode of two log-normal distributions with different skewness.

A well-known class of distributions that can be arbitrarily skewed is given by the log-normal distribution. It is obtained by transforming a random variable X having a normal distribution into random variable Y = eX. Then the logarithm of random variable Y is normally distributed, hence the name.

Taking the mean μ of X to be 0, the median of Y will be 1, independent of the standard deviation σ of X. This is so because X has a symmetric distribution, so its median is also 0. The transformation from X to Y is monotonic, and so we find the median e0 = 1 for Y.

When X has standard deviation σ = 0.25, the distribution of Y is weakly skewed. Using formulas for the log-normal distribution, we find:

\text{mean}   & = e^{\mu + \sigma^2 / 2} & = e^{0 + 0.25^2 / 2} & \approx 1.032 \\
\text{mode}   & = e^{\mu - \sigma^2}     & = e^{0 - 0.25^2}     & \approx 0.939 \\
\text{median} & = e^\mu                  & = e^0                & = 1

Indeed, the median is about one third on the way from mean to mode.

When X has a larger standard deviation, σ = 1, the distribution of Y is strongly skewed. Now

\text{mean}   & = e^{\mu + \sigma^2 / 2} & = e^{0 + 1^2 / 2} & \approx 1.649 \\
\text{mode}   & = e^{\mu - \sigma^2}     & = e^{0 - 1^2}     & \approx 0.368 \\

Here, Pearson's rule of thumb fails.

Van Zwet condition[edit]

Van Zwet derived an inequality which provides sufficient conditions for this inequality to hold.[4] The inequality

Mode ≤ Median ≤ Mean

holds if

F( Median - x ) + F( Median + x ) ≥ 1

for all x where F() is the cumulative distribution function of the distribution.

Unimodal distributions[edit]

The difference between the mean and the mode in a unimodal continuous distribution is bounded by the standard deviation multiplied by the square root of 3.[5] In symbols

\frac{| \text{mean} - \text{mode} |}{\text{standard deviation}} \leq \sqrt{3}

where || is the absolute value. Incidentally this formula is also the Pearson mode or first skewness coefficient,.[6]

The difference between the mode and the median has the same bound.[5] In symbols

\frac{| \text{median} - \text{mode} |}{\text{standard deviation}} \leq \sqrt{3}

Confidence interval for the mode with a single data point[edit]

It is a common but false belief that from a single observation x we can not gain information about the variability in the population and that consequently that ﬁnite length conﬁdence intervals for mean and/or variance are impossible even in principle.

It is possible for an unknown unimodal distribution to estimate a confidence interval for the mode with a sample size of 1.[7] This was first shown by Abbot and Rosenblatt[8] and extended by Blachman and Machol.[9] This confidence interval can be sharpened if the distribution can be assumed to be symmetrical. It is further possible to sharpen this interval if the distribution is normally distributed.

Let the confidence interval be 1 - α. Then the confidence intervals for the general, symmetric and normally distributed variates respectively are

 X \pm \left( \frac{ 2 }{ \alpha } - 1 \right) | X - \theta |
 X \pm \left( \frac{ 1 }{ \alpha } - 1 \right) | X - \theta |
 X \pm \left( \frac{ 0.484 }{ \alpha } - 1 \right) | X - \theta |

where X is the variate, θ is the mode and || is the absolute value.

These estimates are conservative. The confidence intervals for the mode at the 90% level given by these estimators are X ± 19 | X - θ |, X ± 9 | X - θ | and X ± 5.84 | X - θ | for the general, symmetric and normally distributed variates respectively. The 95% confidence interval for a normally distributed variate is given by X ± 10.7 | X - θ |. It may be worth noting that the mean and the mode coincide if the variates are normally distributed.

The 95% bound for a normally distributed variate has been improved and is now known to be X ± 9.68 | X - θ |[10] The bound for a 99% confidence interval is X ± 48.39 | X - θ'|


Machol has shown that that given a known density symmetrical about 0 that given a single sample value (x) that the 90% confidence intervals of population mean are[11]

 x \pm 5 | x - \nu |

where ν is the population median.

If the precise form of the distribution is not known but it is known to be symmetrical about zero then we have

 P( X - k | X - a | \le \mu \le X + k | X - a |) \ge 1 - \frac{ 1 }{ 1 + k }

where X is the variate, μ is the population mean and a and k are arbitrary real numbers.

It is also possible to estimate a confidence interval for the standard deviation from a single observation if the distribution is symmetrical about 0.[12] For a normal distribution the with an unknown variance and a single data point (X) the 90%, 95% and 99% confidence intervals for the standard deviation are [ 0, 8|X| ], [ 0, 17|X| ] and [ 0, 70|X| ]. These intervals may be shorted if the mean is known to be bounded by a multiple of the standard deviation.

If the distribution is known to be normal then it is possible to estimate a confidence interval for both the mean and variance from a simple value.[13] The 90% confidence intervals are

 X - 23.3 | X | \le \mu \le  X + 23.3 | X |
 \sigma \le 10 | X |

The confidence intervals can be estimated for any chosen range.

This method is not limited to the normal distribution but can be used with any known distribution.

Statistical tests[edit]

These estimators have been used to create hypothesis tests for simple samples from normal or symmetrical unimodal distributions.[14] Let the distribution have an assumed mean ( μ0 ). The null hypothesis is that the assumed mean of the distribution lies within the confidence interval of the sample mean ( m ). The null hypothesis is accepted if

 \mu_0 < \frac{ x + m }{ 2 } \pm k | x - m |

where x is the value of the sample and k is a constant. The null hypothesis is rejected if

 \mu_0 > \frac{ x + m }{ 2 } \pm k | x - m |

The value of k depends on the choice of confidence interval and the nature of the assumed distribution.

If the distribution is assumed or is known to be normal then the values of k for the 50%, 66.6%, 75%, 80%, 90%, 95% and 99% confidence intervals are 0.50, 1.26, 1.80, 2.31, 4.79, 9.66 and 48.39 respectively.

If the distribution is assumed or known to be unimodal and symmetrical but not normal then the values of k for the 50%, 66.6%, 75%, 80%, 90%, 95% and 99% confidence intervals are 0.50, 1.87, 2.91, 3.94, 8.97, 18.99, 99.00 respectively.

To see how this test works we assume or know a priori that the population from which the sample is drawn has a mean of μ0 and that the population has a symmetrical unimodal distribution - a class that includes the normal distribution. We wish to know if the mean estimated from the sample is representative of the population at a pre chosen level of confidence.

Assume that the distribution is normal and let the confidence interval be 95%. Then k = 9.66.

Assuming that the sample is representative of the population, the sample mean ( m ) will then lie within the range determined from the formula:

 \mu_0 < \frac{ x + m }{ 2 } \pm 9.66 | x - m |

If subsequent sampling shows that the sample mean lies outside these parameters the sample mean is to be considered to differ significantly from the population mean.


The term mode originates with Karl Pearson in 1895.[15]

See also[edit]


  1. ^ "Relationship between the mean, median, mode, and standard deviation in a unimodal distribution". 
  2. ^ Hippel, Paul T. von (2005). "Mean, Median, and Skew: Correcting a Textbook Rule". J. of Statistics Education 13 (2). 
  3. ^ Bottomley, H. (2004). "Maximum distance between the mode and the mean of a unimodal distribution". Unpublished preprint. 
  4. ^ van Zwet WR (1979) "Mean, median, mode II", Statistica Neerlandica, 33 (1) 1–5
  5. ^ a b
  6. ^ Weisstein, Eric W., "Pearson Mode Skewness", MathWorld.
  7. ^ Edelman, D. (1990). "A confidence interval for the center of an unknown unimodal distribution based on a sample of size 1". The American Statistician 44 (4): 285–287. doi:10.1080/00031305.1990.10475740. 
  8. ^ Abbot, J. H.; Rosenblatt, J. (1963). "Two stage estimation with one observation on the first stage". Annals of the Institute of Statistical Mathematics 14 (1): 229–235. doi:10.1007/BF02868644. 
  9. ^ Blachman, N. M.; Machol, R. (1987). "Confidence intervals based on one or more observations". IEEE Transactions on Information Theory 33 (3): 373–382. doi:10.1109/TIT.1987.1057306. 
  10. ^ Wall, M. M.; Boen, J.; Tweedie, R. (2001). "An effective confidence interval for the mean With samples of size one and two". The American Statistician 55 (2): 102–105. doi:10.1198/000313001750358400. 
  11. ^ Machol R (1964) IEEE Trans Info Theor
  12. ^ Rodríguez, C. C. (1996). "Confidence Intervals from one Observation". Maximum Entropy and Bayesian Methods. Fundamental Theories of Physics 70. pp. 175–182. arXiv:bayes-an/9504001. doi:10.1007/978-94-009-0107-0_19. ISBN 978-94-010-6534-4. 
  13. ^ Rosenblatt, J. (1966). "Confidence interval for standard deviation from a single observation". Technometrics 8 (2): 367–368. doi:10.1080/00401706.1966.10490358. 
  14. ^ Valentine, H. T.; Furnival, G. M.; Gregoire, T. G. (1991). "Confidence Intervals from Single Observations in Forest Research". Forest Science 37 (1): 370–373. 
  15. ^ Pearson, Karl (1895). "Contributions to the Mathematical Theory of Evolution. II. Skew Variation in Homogeneous Material", Philosophical Transactions of the Royal Society of London, Ser. A, 186, 343-414

External links[edit]