WebCab Probability and Statistics for .NET v3.6

Correlation.Covariance Method 

Evaluates the covariance the two (ordered) discrete variables.

public double Covariance(
   double[] xValues,
   double[] yValues
);

Parameters

xValues
An array where the k-th element is the k-th value of the 1-st discrete variable (i.e. xValues[k]).
yValues
An array where the k-th element is the k-th value of the 2-nd discrete variable (i.e. yValues[k].

Return Value

The covariance between the two (ordered) discrete variables.

Remarks

For example, if the two discrete variables take values (xValues[0], yValues[0]), (xValues[1], yValues[1]),... , (xValues[n], yValues[n]), then here we evaluate the covariance between the xValues and the yValues.

See Also

Correlation Class | WebCab.Libraries.Statistics.Correlation Namespace