Computes the covariance of two data sets using the specified bias.

Namespace:  CenterSpace.NMath.Stats
Assembly:  NMathStats (in NMathStats.dll) Version: 3.4.0.0

Syntax

C#
public static double Covariance(
	int[] data1,
	int[] data2,
	BiasType type
)
Visual Basic (Declaration)
Public Shared Function Covariance ( _
	data1 As Integer(), _
	data2 As Integer(), _
	type As BiasType _
) As Double
Visual C++
public:
static double Covariance(
	array<int>^ data1, 
	array<int>^ data2, 
	BiasType type
)

Parameters

data1
Type: array< System..::.Int32 >[]()[]
The first data set.
data2
Type: array< System..::.Int32 >[]()[]
The second data set.
type
Type: CenterSpace.NMath.Stats..::.BiasType
Biased or unbiased.

Return Value

Covariance.

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.InvalidArgumentException Thrown if data1 or data2 has a length of zero.
CenterSpace.NMath.Core..::.MismatchedSizeException Thrown if data1 and data2 have different lengths.

See Also