Click or drag to resize

NMathFunctionsVariance(DoubleVector) Method

Calculates the biased variance of a given vector.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double Variance(
	DoubleVector v
)

Parameters

v  DoubleVector
A vector.

Return Value

Double
Variance.
Exceptions
ExceptionCondition
InvalidArgumentException Thrown if v has zero length.
Remarks
variance = (System.Math.pow(v[0] - mean, 2) + System.Math.pow(v[1] - mean, 2)) / n
See Also