Stats.WeightedStandardDeviation<T>(Vector<T>, Vector<T>) Method

Returns the standard deviation of the variable with observations weighted by the specified vector.

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static double WeightedStandardDeviation<T>(
	this Vector<T> values,
	Vector<T> weights
)

Parameters

values  Vector<T>
A vector containing the data.
weights  Vector<T>
A vector containing the weights. May be null.

Type Parameters

T

Return Value

Double
The standard deviation of the variable weighted by weights.

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).

Remarks

If weights is null, the unweighted mean is returned.

Exceptions

ArgumentNullException

values is null.

DimensionMismatchException

The length of weights does not equal the number of observations of the variable.

See Also