Click or drag to resize

NMathFunctionsWeightedStandardDeviation(Double, Double, Boolean) Method

Calculates the weighted standard deviation of the given data.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double WeightedStandardDeviation(
	double[] data,
	double[] weights,
	bool normalize
)

Parameters

data  Double
The data.
weights  Double
The weights.
normalize  Boolean
If true, normalize the weights to sum to the length of the data array. If the weights represent sampling (reliability) weights, normalizing is usually appropriate. But if the weights represent frequency counts, which in effect expand the data vector by these counts, do not normalize.

Return Value

Double
The weighted standard deviation.
Exceptions
ExceptionCondition
MismatchedSizeException Thrown if data and weights do not have the same length.
See Also