Skip to content

trimmean

Trimmed mean (mean excluding outliers).

v = trimmean(array, percent)

Returns the mean of array after excluding the percent proportion of values from each tail (so percent = 0.2 excludes the top 10% and bottom 10%). percent must be in [0, 1). Robust to outliers.

trimmean([1 2 3 4 5 6 7 8 9 100], 0.2) % 5.5 (excludes 1 and 100)
  • mean — Arithmetic mean.
  • median — Median value.