 | NMathFunctionsWeightedVariance(Double, Double) Method |
Calculates the weighted variance of the given data.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntaxpublic static double WeightedVariance(
double[] data,
double[] weights
)
Public Shared Function WeightedVariance (
data As Double(),
weights As Double()
) As Double
public:
static double WeightedVariance(
array<double>^ data,
array<double>^ weights
)
static member WeightedVariance :
data : float[] *
weights : float[] -> float
Parameters
- data Double
- The data.
- weights Double
- 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 array.
See Also