Click or drag to resize

NMathFunctionsWeightedMean(DoubleVector, DoubleVector) Method

Calculates the weighted average of the given data.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double WeightedMean(
	DoubleVector data,
	DoubleVector weights
)

Parameters

data  DoubleVector
A vector.
weights  DoubleVector
A vector of weights.

Return Value

Double
Weighted mean.
Exceptions
ExceptionCondition
MismatchedSizeException Thrown if data and weights do not have the same length.
See Also