Computes the trimmed mean of a one-dimensional signal – the arithmetic mean
after discarding the most extreme trim fraction of the values from each
end. A robust measure of central tendency that, unlike the ordinary mean, is
not pulled by a heavy tail or a few outliers, while (unlike the median) it
still uses all of the retained data. It matches base R
mean(x, trim = ...) and scipy.stats.trim_mean bit-for-bit, both
of which discard \(\lfloor n\,\mathrm{trim}\rfloor\) values from each end.
Details
A robust location estimator that completes the robust toolkit alongside
medianAbsDev and interquartileRange (robust
dispersion). On a skewed distribution the trimmed mean lies between the
ordinary mean and the median, and moves toward the median as trim
increases – a measure of how much the tail inflates the mean.
See also
signalMoments for the ordinary mean and SD,
medianAbsDev and interquartileRange for robust
dispersion.