# Median

﻿
Median

In probability theory and statistics, a median is described as the numerical value separating the higher half of a sample, a population, or a probability distribution, from the lower half. The median of a finite list of numbers can be found by arranging all the observations from lowest value to highest value and picking the middle one. If there is an even number of observations, then there is no single middle value; the median is then usually defined to be the mean of the two middle values.

In a sample of data, or a finite population, there may be no member of the sample whose value is identical to the median (in the case of an even sample size), and, if there is such a member, there may be more than one so that the median may not uniquely identify a sample member. Nonetheless, the value of the median is uniquely determined with the usual definition. A related concept, in which the outcome is forced to correspond to a member of the sample, is the medoid.

At most, half the population have values less than the median, and, at most, half have values greater than the median. If both groups contain less than half the population, then some of the population is exactly equal to the median. For example, if a < b < c, then the median of the list {abc} is b, and, if a < b < c < d, then the median of the list {abcd} is the mean of b and c; i.e., it is (b + c)/2.

The median can be used as a measure of location when a distribution is skewed, when end-values are not known, or when one requires reduced importance to be attached to outliers, e.g., because they may be measurement errors.

## Notation

The median of some variable x is denoted either as $\tilde{x}$ or as $\mu_{1/2}(x)\,\!.$

## Measures of statistical dispersion

When the median is used as a location parameter in descriptive statistics, there are several choices for a measure of variability: the range, the interquartile range, the mean absolute deviation, and the median absolute deviation. Since the median is the same as the second quartile, its calculation is illustrated in the article on quartiles.

## Medians of probability distributions

For any probability distribution on the real line with cumulative distribution function F, regardless of whether it is any kind of continuous probability distribution, in particular an absolutely continuous distribution (and therefore has a probability density function), or a discrete probability distribution, a median m satisfies the inequalities $\operatorname{P}(X\leq m) \geq \frac{1}{2}\text{ and }\operatorname{P}(X\geq m) \geq \frac{1}{2}\,\!$

or $\int_{-\infty}^m \mathrm{d}F(x) \geq \frac{1}{2}\text{ and }\int_m^{\infty} \mathrm{d}F(x) \geq \frac{1}{2}\,\!$

in which a Lebesgue–Stieltjes integral is used. For an absolutely continuous probability distribution with probability density function ƒ, we have $\operatorname{P}(X\leq m) = \operatorname{P}(X\geq m)=\int_{-\infty}^m f(x)\, \mathrm{d}x=\frac{1}{2}.\,\!$

### Medians of particular distributions

The medians of certain types of distributions can be easily calculated from their parameters:

• The median of a normal distribution with mean μ and variance σ2 is μ. In fact, for a normal distribution, mean = median = mode.
• The median of a uniform distribution in the interval [ab] is (a + b) / 2, which is also the mean.
• The median of a Cauchy distribution with location parameter x0 and scale parameter y is x0, the location parameter.
• The median of an exponential distribution with rate parameter λ is the natural logarithm of 2 divided by the rate parameter: λ−1ln 2.
• The median of a Weibull distribution with shape parameter k and scale parameter λ is λ(ln 2)1/k.

## Medians in descriptive statistics  Comparison of mean, median and mode of two log-normal distributions with different skewness.

The median is used primarily for skewed distributions, which it summarizes differently than the arithmetic mean. Consider the multiset { 1, 2, 2, 2, 3, 14 }. The median is 2 in this case, as is the mode, and it might be seen as a better indication of central tendency than the arithmetic mean of 4.

Calculation of medians is a popular technique in summary statistics and summarizing statistical data, since it is simple to understand and easy to calculate, while also giving a measure that is more robust in the presence of outlier values than is the mean.

## Theoretical properties

### An optimality property

A median is also a central point that minimizes the arithmetic mean of the absolute deviations. In the above example, the median value of 2 minimizes the arithmetic mean of the absolute deviations (1 + 0 + 0 + 0 + 1 + 12) / 6 = 2.33; in contrast, the mean value of 4 minimizes the arithmetic mean of the squares (9 + 4 + 4 + 4 + 1 + 100) / 6 = 20.33. In the language of statistics, a value of c that minimizes $E(\left|X-c\right|)\,$

is a median of the probability distribution of the random variable X.

However, a median c need not be uniquely defined. Where exactly one median exists, statisticians speak of "the median" correctly; even when no unique median exists, some statisticians speak of "the median" informally.

### An inequality relating means and medians

For continuous probability distributions, the difference between the median and the mean is never more than one standard deviation. See an inequality on location and scale parameters.

## The sample median

### Efficient computation of the sample median

Even though sorting n items requires O(n log n) operations, selection algorithms can compute the kth-smallest of n items (e.g., the median) with only O(n) operations.

### Easy explanation of the sample median

#### For an odd number of values

As an example, we will calculate the sample median for the following set of observations: 1, 5, 2, 8, 7.

Start by sorting the values: 1, 2, 5, 7, 8.

In this case, the median is 5 since it is the middle observation in the ordered list.

The median is the ((n + 1)/2)th item, where n is the number of values. For example, for the list {1, 2, 5, 7, 8}, we have n = 5, so the median is the ((5 + 1)/2)th item.

median = (6/2)th item
median = 3rd item
median = 5

#### For an even number of values

As an example, we will calculate the sample median for the following set of observations: 1, 6, 2, 8, 7, 2.

Start by sorting the values: 1, 2, 2, 6, 7, 8.

In this case, the arithmetic mean of the two middlemost terms is (2 + 6)/2 = 4. Therefore, the median is 4 since it is the arithmetic mean of the middle observations in the ordered list.

We also use this formula MEDIAN = {(n+1)/2} th item . n= Number of values

As above example 1, 2, 2, 6, 7, 8 n=6 Median={(6+1)/2}th item =3.5 th item

3rd item is 2    Median = {2+(0.5*(difference of 3rd and 4th item)}
Median = {2+(0.5*(6-2)}
Median = {2+(0.5*4)}
Median = (2+2)
Median = 4


## Other estimates of the median

If data are represented by a statistical model specifying a particular family of probability distributions, 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. See, for example Pareto interpolation.

## Median-unbiased estimators, and bias with respect to loss functions

Any mean-unbiased estimator minimizes the risk (expected loss) with respect to the squared-error loss function, as observed by Gauss. A median-unbiased estimator minimizes the risk with respect to the absolute-deviation loss function, as observed by Laplace. Other loss functions are used in statistical theory, particularly in robust statistics.

The theory of median-unbiased estimators was revived by George W. Brown in 1947:

An estimate of a one-dimensional parameter θ will be said to be median-unbiased, if, for fixed θ, the median of the distribution of the estimate is at the value θ; i.e., the estimate underestimates just as often as it overestimates. This requirement seems for most purposes to accomplish as much as the mean-unbiased requirement and has the additional property that it is invariant under one-to-one transformation. [page 584]

Further properties of median-unbiased estimators have been noted by Lehmann, Birnbaum, van der Vaart and Pfanzagl. In particular, median-unbiased estimators exist in cases where mean-unbiased and maximum-likelihood estimators do not exist. Besides being invariant under one-to-one transformations, median-unbiased estimators have surprising robustness.

## In image processing

In monochrome raster images there is a type of noise, known as the salt and pepper noise, when each pixel independently become black (with some small probability) or white (with some small probability), and is unchanged otherwise (with the probability close to 1). An image constructed of median values of neighborhoods (like 3×3 square) can effectively reduce noise in this case.

## History

Gustav Fechner popularized the median into the formal analysis of data, although it had been used previously by Laplace.

Wikimedia Foundation. 2010.

Synonyms:

### Look at other dictionaries:

• médian — médian, iane [ medjɑ̃, jan ] adj. et n. f. • 1550 « demi »; médiantXIVe; lat. medianus I ♦ Adj. (1560 anat.; autres emplois 1812) 1 ♦ Qui est situé, placé au milieu. Ligne médiane, plan médian. Anat. Veines, artères médianes. Vermis médian.… …   Encyclopédie Universelle

• median — me‧di‧an [ˈmiːdiən] adjective [only before a noun] STATISTICS the median number is the middle one in a series of numbers, arranged in order: • The median sales price fell 1.4% from October. • Median household income fell by 1.9% last year. see… …   Financial and business terms

• median — MEDIÁN, Ă, mediani, e, adj. Care se află la mijloc; medial. ♦ Situat la mijlocul unei figuri geometrice. ♦ (Substantivat, f.) Fiecare dintre dreptele care unesc un vârf al unui triunghi cu mijlocul laturii opuse vârfului. ♦ (Substantivat, f.)… …   Dicționar Român

• Median — Me di*an (m[=e] d[i^]*an), a. [L. medianus, fr. medius middle. See {Medial}.] 1. Being in the middle; running through the middle; as, a median groove. [1913 Webster] 2. (Zo[ o]l.) Situated in the middle; lying in a plane dividing a bilateral… …   The Collaborative International Dictionary of English

• Median — Mediān, ein aus dem Lat. medianus entlehntes und nur in einigen Zusammensetzungen übliches Wort, etwas zu bezeichnen, welches theils in der Mitte zwischen andern Dingen, theils aber auch von mittlern Größe ist, d.i. zwar größer als gewöhnlich,… …   Grammatisch-kritisches Wörterbuch der Hochdeutschen Mundart

• médian — médian, ane (mé di an, a n ) adj. 1°   Terme d anatomie. Qui est au milieu.    Ligne médiane, ligne verticale qu on suppose partager longitudinalement le corps en deux parties égales et symétriques.    Veines médianes, nom donné à trois veines… …   Dictionnaire de la Langue Française d'Émile Littré

• median — index average (midmost), central (situated near center), intermediate, mesne, norm Burton s Legal Thesaurus. William C. Burton. 2006 …   Law dictionary

• median — [mē′dē ən] adj. [L medianus < medius, middle: see MID1] 1. middle; intermediate a) designating a line extending from a vertex of a triangle to the middle of the opposite side b) designating a line joining the midpoints of the nonparallel sides …   English World dictionary

• Median — Me di*an, n. (Geom.) A median line or point. [1913 Webster] …   The Collaborative International Dictionary of English

• median# — median n *average, mean, norm, par median adj average, mean, par (see under AVERAGE n) …   New Dictionary of Synonyms

• median — ► ADJECTIVE 1) technical situated in the middle. 2) referring to the middle term (or mean of the middle two terms) of a series of values arranged in order of magnitude. ► NOUN 1) a median value. 2) Geometry a straight line drawn from one of the… …   English terms dictionary