| NMathFunctionsWeightedVariance(IDFColumn, IDFColumn) 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
)
Public Shared Function WeightedVariance (
data As IDFColumn,
weights As IDFColumn
) As Double
public:
static double WeightedVariance(
IDFColumn^ data,
IDFColumn^ weights
)
static member WeightedVariance :
data : IDFColumn *
weights : IDFColumn -> float
Parameters
- data IDFColumn
- The data.
- weights IDFColumn
- The weights.
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.
|
Remarks
If weights is an IDFIntColumn, the weights are interpreted as frequency counts, which in effect expand the data by these counts,
so no normalization is performed. Otherwise, the weights are interpreted as sampling (reliability) weights and the weight values are
normalized to sum to the length of the data column.
See Also