Calculates the mean of the given data after the specified trimming.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public static double TrimmedMean( DoubleVector data, double trim ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function TrimmedMean ( _ data As DoubleVector, _ trim As Double _ ) As Double |
| Visual C++ |
|---|
public: static double TrimmedMean( DoubleVector^ data, double trim ) |
Parameters
- data
- Type: CenterSpace.NMath.Core..::.DoubleVector
A vector.
- trim
- Type: System..::.Double
Trim.
Return Value
Trimmed mean.
Remarks
A trim of 0.0 results in the mean, 1.0 in the median.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if data has a length of zero. |