In

_{1/2} sometimes also ''M''. In any of these cases, the use of these or other symbols for the median needs to be explicitly defined when they are introduced.
The median is a special case of other location parameter, ways of summarizing the typical values associated with a statistical distribution: it is the 2nd quartile, 5th decile, and 50th percentile.

George W. Brown

in 1947: Further properties of median-unbiased estimators have been reported. Median-unbiased estimators are invariant under Injective function, one-to-one transformations. There are methods of constructing median-unbiased estimators that are optimal (in a sense analogous to the minimum-variance property for mean-unbiased estimators). Such constructions exist for probability distributions having monotone likelihood ratio, monotone likelihood-functions. One such procedure is an analogue of the Rao–Blackwell theorem, Rao–Blackwell procedure for mean-unbiased estimators: The procedure holds for a smaller class of probability distributions than does the Rao—Blackwell procedure but for a larger class of loss functions.

^{1} norm and therefore implicitly on the median. In 1774, Pierre-Simon Laplace, Laplace made this desire explicit: he suggested the median be used as the standard estimator of the value of a posterior Probability density function, PDF. The specific criterion was to minimize the expected magnitude of the error; $,\; \backslash alpha\; -\; \backslash alpha^,$ where $\backslash alpha^$ is the estimate and $\backslash alpha$ is the true value. To this end, Laplace determined the distributions of both the sample mean and the sample median in the early 1800s.Laplace PS de (1818) ''Deuxième supplément à la Théorie Analytique des Probabilités'', Paris, Courcier However, a decade later, Carl Friedrich Gauss, Gauss and Adrien-Marie Legendre, Legendre developed the least squares method, which minimizes $(\backslash alpha\; -\; \backslash alpha^)^$ to obtain the mean. Within the context of regression, Gauss and Legendre's innovation offers vastly easier computation. Consequently, Laplaces' proposal was generally rejected until the rise of Computing device#Analog computers, computing devices 150 years later (and is still a relatively uncommon algorithm).
Antoine Augustin Cournot in 1843 was the first to use the term ''median'' (''valeur médiane'') for the value that divides a probability distribution into two equal halves. Gustav Theodor Fechner used the median (''Centralwerth'') in sociological and psychological phenomena.Keynes, J.M. (1921) ''A Treatise on Probability''. Pt II Ch XVII §5 (p 201) (2006 reprint, Cosimo Classics, : multiple other reprints) It had earlier been used only in astronomy and related fields. Gustav Theodor Fechner, Gustav Fechner popularized the median into the formal analysis of data, although it had been used previously by Laplace, and the median appeared in a textbook by Francis Ysidro Edgeworth, F. Y. Edgeworth. Francis Galton used the English term ''median'' in 1881,Galton F (1881) "Report of the Anthropometric Committee" pp 245–260

''Report of the 51st Meeting of the British Association for the Advancement of Science''

/ref> having earlier used the terms ''middle-most value'' in 1869, and the ''medium'' in 1880. ''personal.psu.edu''

/ref> Statisticians encouraged the use of medians intensely throughout the 19th century for its intuitive clarity and ease of manual computation. However, the notion of median does not lend itself to the theory of higher moments as well as the arithmetic mean does, and is much harder to compute by computer. As a result, the median was steadily supplanted as a notion of generic average by the arithmetic mean during the 20th century.

Median as a weighted arithmetic mean of all Sample Observations

On-line calculator

A problem involving the mean, the median, and the mode.

*

Python script

for Median computations and income inequality metrics

Fast Computation of the Median by Successive Binning

'Mean, median, mode and skewness'

A tutorial devised for first-year psychology students at Oxford University, based on a worked example.

The Complex SAT Math Problem Even the College Board Got Wrong

Andrew Daniels in ''Popular Mechanics'' {{Statistics, descriptive Means Robust statistics

statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, industrial, or social problem, it is conventional to begin with a statistical ...

and probability theory
Probability theory is the branch of concerned with . Although there are several different , probability theory treats the concept in a rigorous mathematical manner by expressing it through a set of . Typically these axioms formalise probability ...

, the median is the value separating the higher half from the lower half of a data sample
In statistics
Statistics is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, industrial, or social problem, it is conventional to begin wi ...

, a population
Population typically refers the number of people in a single area whether it be a city or town, region, country, or the world. Governments typically quantify the size of the resident population within their jurisdiction by a process called a ...

, or a probability distribution
In probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expre ...

. For a data set
A data set (or dataset) is a collection of data
Data (; ) are individual facts, statistics, or items of information, often numeric. In a more technical sense, data are a set of values of qualitative property, qualitative or quantity, quantita ...

, it may be thought of as "the middle" value. The basic feature of the median in describing data compared to the mean
There are several kinds of mean in mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (ma ...

(often simply described as the "average") is that it is not skewed
In probability theory and statistics, skewness is a measure of the asymmetry of the probability distribution of a real number, real-valued random variable about its mean. The skewness value can be positive, zero, negative, or undefined.
For ...

by a small proportion of extremely large or small values, and therefore provides a better representation of a "typical" value. Median income
The median income is the income
Income is the consumption and saving opportunity gained by an entity within a specified timeframe, which is generally expressed in monetary terms.Smith's financial dictionary. Smith, Howard Irving. 1908. Income is de ...

, for example, may be a better way to suggest what a "typical" income is, because income distribution can be very skewed. The median is of central importance in robust statistics Robust statistics is with good performance for data drawn from a wide range of s, especially for distributions that are not . Robust methods have been developed for many common problems, such as estimating , , and . One motivation is to produce ...

, as it is the most resistant statistic, having a breakdown point of 50%: so long as no more than half the data are contaminated, the median is not an arbitrarily large or small result.
Finite data set of numbers

The median of a finite list of numbers is the "middle" number, when those numbers are listed in order from smallest to greatest. If the data set has an odd number of observations, the middle one is selected. For example, the following list of seven numbers, : 1, 3, 3, 6, 7, 8, 9 has the median of ''6'', which is the fourth value. If the data set has an even number of observations, there is no distinct middle value and the median is usually defined to be the arithmetic mean of the two middle values. For example, this data set of 8 numbers : 1, 2, 3, 4, 5, 6, 8, 9 has a median value of ''4.5'', that is $(4\; +\; 5)/2$. (In more technical terms, this interprets the median as the fully trimmed estimator, trimmed mid-range). In general, with this convention, the median can be defined as follows: For a data set $x$ of $n$ elements, ordered from smallest to greatest, : if $n$ is odd, $\backslash mathrm(x)\; =\; x\_$ : if $n$ is even, $\backslash mathrm(x)\; =\; \backslash frac$Formal definition

Formally, a median of a population (statistics), population is any value such that at most half of the population is less than the proposed median and at most half is greater than the proposed median. As seen above, medians may not be unique. If each set contains less than half the population, then some of the population is exactly equal to the unique median. The median is well-defined for any Weak ordering, ordered (one-dimensional) data, and is independent of any distance metric. The median can thus be applied to classes which are ranked but not numerical (e.g. working out a median grade when students are graded from A to F), although the result might be halfway between classes if there is an even number of cases. A geometric median, on the other hand, is defined in any number of dimensions. A related concept, in which the outcome is forced to correspond to a member of the sample, is the medoid. There is no widely accepted standard notation for the median, but some authors represent the median of a variable ''x'' either as ''x͂'' or as ''μ''Uses

The median can be used as a measure of location parameter, location when one attaches reduced importance to extreme values, typically because a distribution is skewness, skewed, extreme values are not known, or outliers are untrustworthy, i.e., may be measurement/transcription errors. For example, consider the multiset : 1, 2, 2, 2, 3, 14. The median is 2 in this case, (as is the mode (statistics), mode), and it might be seen as a better indication of the central tendency, center than the arithmetic mean of 4, which is larger than all-but-one of the values. However, the widely cited empirical relationship that the mean is shifted "further into the tail" of a distribution than the median is not generally true. At most, one can say that the two statistics cannot be "too far" apart; see below. An alternative—the "delete k" method—where $k$ grows with the sample size has been shown to be asymptotically consistent. This method may be computationally expensive for large data sets. A bootstrap estimate is known to be consistent, but converges very slowly (computational complexity theory, order of $n^$). Other methods have been proposed but their behavior may differ between large and small samples.Efficiency

The Efficiency (statistics), efficiency of the sample median, measured as the ratio of the variance of the mean to the variance of the median, depends on the sample size and on the underlying population distribution. For a sample of size $N\; =\; 2n\; +\; 1$ from the normal distribution, the efficiency for large N is : $\backslash frac\; \backslash frac$ The efficiency tends to $\backslash frac$ as $N$ tends to infinity. In other words, the relative variance of the median will be $\backslash pi/2\; \backslash approx\; 1.57$, or 57% greater than the variance of the mean – the relative standard error of the median will be $(\backslash pi/2)^\backslash frac\; \backslash approx\; 1.25$, or 25% greater than the standard error of the mean, $\backslash sigma/\backslash sqrt$ (see also section #Sampling distribution above.).Other estimators

For univariate distributions that are ''symmetric'' about one median, the Hodges–Lehmann estimator is a robust statistics, robust and highly Efficiency (statistics), efficient estimator of the population median. If data are represented by a statistical model specifying a particular family ofprobability distribution
In probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expre ...

s, then estimates of the median can be obtained by fitting that family of probability distributions to the data and calculating the theoretical median of the fitted distribution. Pareto interpolation is an application of this when the population is assumed to have a Pareto distribution.
Multivariate median

Previously, this article discussed the univariate median, when the sample or population had one-dimension. When the dimension is two or higher, there are multiple concepts that extend the definition of the univariate median; each such multivariate median agrees with the univariate median when the dimension is exactly one.Marginal median

The marginal median is defined for vectors defined with respect to a fixed set of coordinates. A marginal median is defined to be the vector whose components are univariate medians. The marginal median is easy to compute, and its properties were studied by Puri and Sen.Geometric median

The geometric median of a discrete set of sample points $x\_1,\backslash ldots\; x\_N$ in a Euclidean space is the point minimizing the sum of distances to the sample points. :$\backslash hat\backslash mu\; =\; \backslash underset\; \backslash sum\_^\; \backslash left\; \backslash ,\; \backslash mu-x\_n\; \backslash right\; \backslash ,\; \_2$ In contrast to the marginal median, the geometric median is equivariant with respect to Euclidean Similarity (geometry), similarity transformations such as translation (geometry), translations and rotation (mathematics), rotations.Median in all directions

If the marginal medians for all coordinate systems coincide, then their common location may be termed the "median in all directions". This concept is relevant to voting theory on account of the median voter theorem. When it exists, the median in all directions coincides with the geometric median (at least for discrete distributions).Centerpoint

An alternative generalization of the median in higher dimensions is the Centerpoint (geometry), centerpoint.Other median-related concepts

Interpolated median

When dealing with a discrete variable, it is sometimes useful to regard the observed values as being midpoints of underlying continuous intervals. An example of this is a Likert scale, on which opinions or preferences are expressed on a scale with a set number of possible responses. If the scale consists of the positive integers, an observation of 3 might be regarded as representing the interval from 2.50 to 3.50. It is possible to estimate the median of the underlying variable. If, say, 22% of the observations are of value 2 or below and 55.0% are of 3 or below (so 33% have the value 3), then the median $m$ is 3 since the median is the smallest value of $x$ for which $F(x)$ is greater than a half. But the interpolated median is somewhere between 2.50 and 3.50. First we add half of the interval width $w$ to the median to get the upper bound of the median interval. Then we subtract that proportion of the interval width which equals the proportion of the 33% which lies above the 50% mark. In other words, we split up the interval width pro rata to the numbers of observations. In this case, the 33% is split into 28% below the median and 5% above it so we subtract 5/33 of the interval width from the upper bound of 3.50 to give an interpolated median of 3.35. More formally, if the values $f(x)$ are known, the interpolated median can be calculated from : $m\_\backslash text\; =\; m\; +\; w\backslash left[\backslash frac\; -\; \backslash frac\backslash right].$ Alternatively, if in an observed sample there are $k$ scores above the median category, $j$ scores in it and $i$ scores below it then the interpolated median is given by : $m\_\backslash text\; =\; m\; -\; \backslash frac\; \backslash left[\backslash frac\; j\backslash right].$Pseudo-median

For univariate distributions that are ''symmetric'' about one median, the Hodges–Lehmann estimator is a robust and highly efficient estimator of the population median; for non-symmetric distributions, the Hodges–Lehmann estimator is a robust and highly efficient estimator of the population ''pseudo-median'', which is the median of a symmetrized distribution and which is close to the population median. The Hodges–Lehmann estimator has been generalized to multivariate distributions.Variants of regression

The Theil–Sen estimator is a method for robust statistics, robust linear regression based on finding medians of slopes.Median filter

The median filter is an important tool of image processing, that can effectively remove any salt and pepper noise from grayscale images.Cluster analysis

In cluster analysis, the k-medians clustering algorithm provides a way of defining clusters, in which the criterion of maximising the distance between cluster-means that is used in k-means clustering, is replaced by maximising the distance between cluster-medians.Median–median line

This is a method of robust regression. The idea dates back to Abraham Wald, Wald in 1940 who suggested dividing a set of bivariate data into two halves depending on the value of the independent parameter $x$: a left half with values less than the median and a right half with values greater than the median. He suggested taking the means of the dependent $y$ and independent $x$ variables of the left and the right halves and estimating the slope of the line joining these two points. The line could then be adjusted to fit the majority of the points in the data set. Nair and Shrivastava in 1942 suggested a similar idea but instead advocated dividing the sample into three equal parts before calculating the means of the subsamples. Brown and Mood in 1951 proposed the idea of using the medians of two subsamples rather the means. Tukey combined these ideas and recommended dividing the sample into three equal size subsamples and estimating the line based on the medians of the subsamples.Median-unbiased estimators

Any Bias of an estimator, ''mean''-unbiased estimator minimizes the risk (expected loss) with respect to the squared-error loss function, as observed by Gauss. A Bias of an estimator#Median unbiased estimators, and bias with respect to other loss functions, ''median''-unbiased estimator minimizes the risk with respect to the Absolute deviation, absolute-deviation loss function, as observed by Laplace. Other loss functions are used in statistical theory, particularly inrobust statistics Robust statistics is with good performance for data drawn from a wide range of s, especially for distributions that are not . Robust methods have been developed for many common problems, such as estimating , , and . One motivation is to produce ...

.
The theory of median-unbiased estimators was revived bGeorge W. Brown

in 1947: Further properties of median-unbiased estimators have been reported. Median-unbiased estimators are invariant under Injective function, one-to-one transformations. There are methods of constructing median-unbiased estimators that are optimal (in a sense analogous to the minimum-variance property for mean-unbiased estimators). Such constructions exist for probability distributions having monotone likelihood ratio, monotone likelihood-functions. One such procedure is an analogue of the Rao–Blackwell theorem, Rao–Blackwell procedure for mean-unbiased estimators: The procedure holds for a smaller class of probability distributions than does the Rao—Blackwell procedure but for a larger class of loss functions.

History

Scientific researchers in the ancient near east appear not to have used summary statistics altogether, instead choosing values that offered maximal consistency with a broader theory that integrated a wide variety of phenomena. Within the Mediterranean (and, later, European) scholarly community, statistics like the mean are fundamentally a medieval and early modern development. (The history of the median outside Europe and its predecessors remains relatively unstudied.) The idea of the median appeared in the 13th century in the Talmud, in order to fairly analyze divergent Economic appraisal, appraisals. However, the concept did not spread to the broader scientific community. Instead, the closest ancestor of the modern median is the mid-range, invented by Al-Biruni. Transmission of Al-Biruni's work to later scholars is unclear. Al-Biruni applied his technique to assaying metals, but, after he published his work, most assayers still adopted the most unfavorable value from their results, lest they appear to Debasement, cheat. However, increased navigation at sea during the Age of Discovery meant that ship's navigators increasingly had to attempt to determine latitude in unfavorable weather against hostile shores, leading to renewed interest in summary statistics. Whether rediscovered or independently invented, the mid-range is recommended to nautical navigators in Harriot's "Instructions for Raleigh's Voyage to Guiana, 1595". The idea of the median may have first appeared in Edward Wright (mathematician), Edward Wright's 1599 book ''Certaine Errors in Navigation'' on a section about compass navigation. Wright was reluctant to discard measured values, and may have felt that the median — incorporating a greater proportion of the dataset than the mid-range — was more likely to be correct. However, Wright did not give examples of his technique's use, making it hard to verify that he described the modern notion of median. The median (in the context of probability) certainly appeared in the correspondence of Christiaan Huygens, but as an example of a statistic that was inappropriate for Actuarial science, actuarial practice. The earliest recommendation of the median dates to 1757, when Roger Joseph Boscovich developed a regression method based on the L1 norm, ''L''''Report of the 51st Meeting of the British Association for the Advancement of Science''

/ref> having earlier used the terms ''middle-most value'' in 1869, and the ''medium'' in 1880.

/ref> Statisticians encouraged the use of medians intensely throughout the 19th century for its intuitive clarity and ease of manual computation. However, the notion of median does not lend itself to the theory of higher moments as well as the arithmetic mean does, and is much harder to compute by computer. As a result, the median was steadily supplanted as a notion of generic average by the arithmetic mean during the 20th century.

See also

* Medoids which are a generalisation of the median in higher dimensions * Central tendency ** Mean ** Mode (statistics), Mode * Absolute deviation * Bias of an estimator * Concentration of measure for Lipschitz functions * Median (geometry) * Median graph * Median search * Median slope * Median voter theory * Weighted median * Median of medians: Algorithm to calculate the approximate median in linear time * Order statisticNotes

References

External links

*Median as a weighted arithmetic mean of all Sample Observations

On-line calculator

A problem involving the mean, the median, and the mode.

*

Python script

for Median computations and income inequality metrics

Fast Computation of the Median by Successive Binning

'Mean, median, mode and skewness'

A tutorial devised for first-year psychology students at Oxford University, based on a worked example.

The Complex SAT Math Problem Even the College Board Got Wrong

Andrew Daniels in ''Popular Mechanics'' {{Statistics, descriptive Means Robust statistics