Click or drag to resize

NMathFunctionsWeightedVariance(Double, Int32) Method

Calculates the weighted variance of the given data.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double WeightedVariance(
	double[] data,
	int[] weights
)

Parameters

data  Double
The data.
weights  Int32
The weights.

Return Value

Double
The weighted variance.
Exceptions
ExceptionCondition
MismatchedSizeException Thrown if data and weights do not have the same length.
Remarks
The weights are interpreted as frequency counts, which in effect expand the data array by these counts, so no normalization is performed.
See Also