Click or drag to resize

NMathFunctionsWeightedVariance(Double, Double) 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,
	double[] weights
)

Parameters

data  Double
The data.
weights  Double
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 sampling (reliability) weights and the weights are normalized to sum to the length of the data array.
See Also