Statistics.MeanT Method

Double MeanT(TVec Data, Double Alpha)

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
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        Vector a = new Vector(0);
        a.SetIt(false, new double[] {1, 2, 97, 98, 99, 100, 190});
        double MT = Statistics.MeanT(a,0.5);
        // MT = 79.2
    }
}
See Also: Statistics.MeanH, Statistics.MeanG