Calculates the mean of the given data after the specified trimming.

Namespace:  CenterSpace.NMath.Stats
Assembly:  NMathStats (in NMathStats.dll) Version: 3.4.0.0

Syntax

C#
public static double TrimmedMean(
	int[] data,
	double trim
)
Visual Basic (Declaration)
Public Shared Function TrimmedMean ( _
	data As Integer(), _
	trim As Double _
) As Double
Visual C++
public:
static double TrimmedMean(
	array<int>^ data, 
	double trim
)

Parameters

data
Type: array< System..::.Int32 >[]()[]
An array of doubles.
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

ExceptionCondition
CenterSpace.NMath.Core..::.InvalidArgumentException Thrown if data has a length of zero.

See Also