Skip to content

Median

Median(list)

returns the median of list.

See:

Median can be applied to the following distributions:

BernoulliDistribution, BinomialDistribution, DiscreteUniformDistribution, ErlangDistribution, ExponentialDistribution, FrechetDistribution, GammaDistribution, GeometricDistribution, GumbelDistribution, HypergeometricDistribution, LogNormalDistribution, NakagamiDistribution, NormalDistribution, StudentTDistribution, WeibullDistribution

Examples

>> Median({26, 64, 36})
36

For lists with an even number of elements, Median returns the mean of the two middle values:

>> Median({-11, 38, 501, 1183})
539/2

Passing a matrix returns the medians of the respective columns:

>> Median({{100, 1, 10, 50}, {-1, 1, -2, 2}})
{99/2,1,4,26}
>> Median(LogNormalDistribution(m,s))
E^m

FiveNum, Quantile, Quartiles

Implementation status

  • ✅ - full supported

Github