<-- Previous || Up || Next -->

Trim Mean Function
Math Statistics Class

Public Function TrimMean( _
      ByVal vPercent As Variant _
    , ParamArray vValues() As Variant _
    ) As Variant

Returns the mean of the values in the middle of a data set by excluding vPercent of the data points, half at the top and half at the bottom of the data.

Examples:
    TrimMean(0.0, SampleData) = 145.152173913043
    TrimMean(0.1, SampleData) = 144.654761904762
    TrimMean(0.2, SampleData) = 144.108108108108
    TrimMean(0.3, SampleData) = 143.878787878788
See also:
    Average Function
    Percentile Function
    Quartile Function
    PercentRank Function
    Rank Function
    StatVarType Property
    TRIMMEAN Function (Microsoft Excel)
vPercent: The percent of data points to be excluded from the average. vPercent is expressed as a number between 0 and 1, so to exclude 20% of the data, use a vPercent value of .2. Half of the data is excluded from the bottom or the data and half from the top.
vValues: The values that are to be averaged. Can be numbers, one-dimensional numeric arrays, one-dimensional Variant arrays, one-dimensional Variant arrays with embedded arrays, or any combination of these. The current setting of the StatVarType Property determines which numeric data types are recognized by this function.
Return value: Function returns the mean of the remaining values in the middle of a data set. Function returns Null if none of the vValues arguments are numeric, or if vPercent is less than zero (<0) or greater than one (>1).

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.