Gets the covariance between two sets of values.

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)

Syntax

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

Parameters

data1 ()
A Double array.
data2 ()
A Double array.

Return Value

The covariance between the two sets of values.

Exceptions

ExceptionCondition
ArgumentNullExceptiondata1 is nullNothingnullptr.

-or-

data2 is nullNothingnullptr.

DimensionMismatchException The length of data1 does not equal the length of data2.