Investment Studio > Expressions > Functions > Statistical > TRIMMEAN
float trimmean(float array data, float trim_fraction)
Returns the arithmetic average of the values in data, excluding the specified trim_fraction of outlying (largest and smallest) data points.
All array elements are converted to float, with exclusion if conversion fails.
trim_fraction must be in the range [0, 1].
The number of excluded data points is rounded down to nearest multiple of 2 for symmetry (i.e. same number of data points is excluded at top and bottom end). For instance, 10% of 57 data points is rounded down to 4 excluded data points (the 2 largest and the 2 smallest).
Example
=trimmean({1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 20%)
is equivalent to average({2, 3, 4, 5, 6, 7, 8, 9}) = 5.5.
See also average, count, frequency, geomean, harmean, large, max, median, min, percentile, percentrank, quartile, rank, small.