Median
Median[list]
gives the median of the elements in list.
Median[dist]
gives the median of the distribution dist.
Details

- Median is a robust location estimator.
- Median[list] gives the center element in the sorted version of list, or the average of the two center elements if list is of even length.
- Median[{{x1,y1,…},{x2,y2,…},…}] gives {Median[{x1,x2,…}],Median[{y1,y2,…}],…}.
- Median[dist] is the minimum of the set of number(s) m such that Probability[x≤m,xdist]≥1/2 and Probability[x≥m,xdist]≥1/2.
Examples
open allclose allBasic Examples (3)
Find the middle value in the list:
Average the two middle values:
Median of a parametric distribution:
Scope (15)
Data (11)
Exact input yields exact output:
Approximate input yields approximate output:
Median for a matrix gives column-wise medians:
Median for a tensor gives column-wise medians at the first level:
SparseArray data can be used just like dense arrays:
Find the median of WeightedData:
Find the median of EventData:
Find the median of TemporalData:
Find the median of a TimeSeries:
The median depends only on the values:
Applications (7)
The median represents the center of a distribution:
The median for a distribution without a single mode:
Find the median length, in miles, for 141 major rivers in North America:
Plot a Histogram for the data:
Probability that the length exceeds 90% of the median:
Smooth an irregularly spaced time series using a moving median:
Obtain a robust estimate of location when outliers are present:
Extreme values have a large influence on the Mean:
Compute medians for slices of a collection of paths of a random process:
Properties & Relations (7)
Median is equivalent to a parametrized Quantile:
For nearly symmetric samples, Median and Mean are nearly the same:
For univariate data, Median coincides with SpatialMedian:
The Median of absolute deviations from the Median is MedianDeviation:
MovingMedian is a sequence of medians:
For any distribution, there is InverseCDF[dist,1/2]=Median[dist]:
Similarly for InverseSurvivalFunction:
For a continuous distribution, there is CDF[dist,Median[dist]]=1/2:
Similarly for SurvivalFunction:
Possible Issues (1)
Median requires numeric values:

Neat Examples (1)
The distribution of Median estimates for 20, 100, and 300 samples:
Text
Wolfram Research (2003), Median, Wolfram Language function, https://reference.wolfram.com/language/ref/Median.html (updated 2016).
CMS
Wolfram Language. 2003. "Median." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Median.html.
APA
Wolfram Language. (2003). Median. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Median.html