Stats.TrimmedMean Method

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

TrimmedMean(Double[], Double) Returns the trimmed mean of the elements of an array.
TrimmedMean(Vector<Double>, Double) Returns the trimmed mean of the elements of a vector.
TrimmedMean<T>(T[], Double) Returns the trimmed mean of the elements of a numerical variable.
TrimmedMean<T>(Vector<T>, Double) Returns the trimmed mean of the elements of a numerical variable.

TrimmedMean(Double[], Double)

Returns the trimmed mean of the elements of an array.
C#
public static double TrimmedMean(
	this double[] values,
	double percent
)

Parameters

values  Double[]
A Double array.
percent  Double
The percentage of extreme values to trim before evaluating the mean.

Return Value

Double
The mean of the elements of values with the percent % of extreme values removed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Double[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionvalues is null.

TrimmedMean<T>(T[], Double)

Returns the trimmed mean of the elements of a numerical variable.
C#
public static double TrimmedMean<T>(
	this T[] values,
	double percent
)

Parameters

values  T[]
A Vector<T>.
percent  Double
The percentage of extreme values to trim before evaluating the mean.

Type Parameters

T

Return Value

Double
The mean of the elements of values with the percent % of extreme values removed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionvalues is null.

TrimmedMean(Vector<Double>, Double)

Returns the trimmed mean of the elements of a vector.
C#
public static double TrimmedMean(
	this Vector<double> values,
	double percent
)

Parameters

values  Vector<Double>
A vector.
percent  Double
The percentage of extreme values to trim before evaluating the mean.

Return Value

Double
The mean of the elements of values with the percent % of extreme values removed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionvalues is null.

TrimmedMean<T>(Vector<T>, Double)

Returns the trimmed mean of the elements of a numerical variable.
C#
public static double TrimmedMean<T>(
	this Vector<T> values,
	double percent
)

Parameters

values  Vector<T>
A Vector<T>.
percent  Double
The percentage of extreme values to trim before evaluating the mean.

Type Parameters

T

Return Value

Double
The mean of the elements of values with the percent % of extreme values removed.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionvalues is null.

See Also