| NMathFunctionsWeightedVariance(IDFColumn, IDFColumn, Boolean) 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(
IDFColumn data,
IDFColumn weights,
bool normalizeWeights
)
Public Shared Function WeightedVariance (
data As IDFColumn,
weights As IDFColumn,
normalizeWeights As Boolean
) As Double
public:
static double WeightedVariance(
IDFColumn^ data,
IDFColumn^ weights,
bool normalizeWeights
)
static member WeightedVariance :
data : IDFColumn *
weights : IDFColumn *
normalizeWeights : bool -> float
Parameters
- data IDFColumn
- The data.
- weights IDFColumn
- The weights.
- normalizeWeights Boolean
-
If true, normalize the weights to sum to the length of the data column. If the weights
represent sampling (reliability) weights, normalizing is usually appropriate. But if the weights
represent frequency counts, which in effect expand the data column by these counts, do not normalize.
Return Value
DoubleThe weighted variance.
Exceptions Exception | Condition |
---|
MismatchedSizeException |
Thrown if data and weights do not have the same length.
|
NMathFormatConvertException |
Thrown if data or weights are not numeric.
|
See Also