# Median

**Median** gives a technical definition of *middle* in a number of senses.

## Median in Statistics

In statistics, the**median**is that value that separates the highest half of the sample from the lowest half. To find the

*median*, arrange all the observations from lowest value to highest value and pick the middle one. If there are an even number of observations, take the mean of the two middle values. When we use the

*median*to describe what the observations have in common, there are several choices for a measure of variability, the range, the interquartile range, and the absolute deviation. Since the median is the same as the

*second quartile*, its calculation is illustrated in the article on quartiles.

The median is primarily used for skewed distributions, which it represents more accurately than the arithmetic mean. Consider the set {1, 2, 2, 2, 3, 9}. 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 3.166....

The median is also the central point which minimises the average of the absolute deviations; in the example above this would be (1+0+0+0+1+7)/6=1.5 using the median, while it would be 1.944... using the mean.

Even though sorting *n* items takes in general O(*n* log *n*) operations, by using a recursive "Divide-and-Conquer" algorithm the median of *n* items can be computed with only O(*n*) operations.

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. The difference between the median and the mean is less than or equal to one standard deviation.

## Median of a Triangle

In a triangle, a**median**is a line joining a vertex to the midpoint of the opposite side. It divides the triangle into two parts of equal area. The three medians intersect in the triangle's centroid or center of mass, and two-thirds of the length of each median is between the vertex and the centroid, while one-third is between the centroid and the midpoint of the opposite side.

Any other lines which divide the area of the triangle into two equal parts do not pass through the centroid.

## Median strip of a road

On an expressway, motorway, or autobahn, the**median**is the strip of grass or the wall which separates opposing lanes of traffic. This is necessary because of safety concerns, due to the high speed of automobiles on both sides, and the potential danger of a disastrous head-on collision at the combined speed of both vehicles.

Medians function secondarily as "green areas", beautifying roadways. Some jurisdictions mow their medians, others scatter wildflower seeds which germinate and re-seed themselves every year, while still others create extensive plantings of trees, shrubs, herbaceous perennials and decorative grasses. Where space is at a premium, dense hedges of shrubs filter the headlights of oncoming traffic and provide a resilient barrier.

## See also

- Median number