| NMathFunctionsWeightedVariance(Double, Int32) 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(
double[] data,
int[] weights
)
Public Shared Function WeightedVariance (
data As Double(),
weights As Integer()
) As Double
public:
static double WeightedVariance(
array<double>^ data,
array<int>^ weights
)
static member WeightedVariance :
data : float[] *
weights : int[] -> float
Parameters
- data Double
- 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 array by these counts,
so no normalization is performed.
See Also