Statistics.MeanT Method

function MeanT(const Data: TVec; Alpha: Double): Double;

Trimmed mean.

#NameDescription
1DataData. An exception is raised if Data vector is complex.
2AlphaDefines the percent of value excluded from mean calculation. If Alpha parameter is omitted, the default value 0.05 is used (meaning highest 2.5% and lowest 2.5% of data will be excluded). Alpha paramater must lie on the interval [0,1) otherwise an exception is raised.

Returns: Double - the mean of all Data vector elements, excluding highest and lowest 100*Alpha/2 percents of value.

Examples
Uses MtxExpr, Statistics, Math387;
procedure Example;
var a: Vector;
MT : double;
begin
    a.SetIt(false,[1, 2, 97, 98, 99, 100, 190]);
    MT := MeanT(a,0.5); // MT = 79.2
end;
See Also: Statistics.MeanH, Statistics.MeanG