| NMathFunctionsWeightedVariance(DoubleVector, DoubleVector) Method |
Calculates the weighted variance of the given data.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static double WeightedVariance(
DoubleVector data,
DoubleVector weights
)
Public Shared Function WeightedVariance (
data As DoubleVector,
weights As DoubleVector
) As Double
public:
static double WeightedVariance(
DoubleVector^ data,
DoubleVector^ weights
)
static member WeightedVariance :
data : DoubleVector *
weights : DoubleVector -> float
Parameters
- data DoubleVector
- The data.
- weights DoubleVector
- The weights.
Return Value
DoubleThe weighted variance.
Exceptions Remarks
The weights are interpreted as sampling (reliability) weights and the weights are normalized to sum to
the length of the data vector.
See Also