 | NMathFunctionsWeightedVariance(DoubleVector, Int32) Method |
Calculates the weighted variance of the given data.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic static double WeightedVariance(
DoubleVector data,
int[] weights
)
Public Shared Function WeightedVariance (
data As DoubleVector,
weights As Integer()
) As Double
public:
static double WeightedVariance(
DoubleVector^ data,
array<int>^ weights
)
static member WeightedVariance :
data : DoubleVector *
weights : int[] -> float
Parameters
- data DoubleVector
- The data.
- weights Int32
- The weights.
Return Value
DoubleThe weighted variance.
Exceptions
Remarks
The weights are interpreted as frequency counts, which in effect expand the data vector by these counts,
so no normalization is performed.
See Also