Public Function Covariance( _
ByRef vXValues As Variant _
, ByRef vYValues As Variant _
) As Variant
Returns the average of the products of the deviations for each data point pair.
Examples: Covariance(Array(12, 34, 56), Array(23, 45, 67)) = 322.666666666667
Covariance(Array(12, 34, 56), Array(13, 36, 59)) = 337.333333333333
Covariance(Array(12, 34, 56), Array(11, 22, 44)) = 242
See also: Correlation Function
Fisher Function
FisherInverse Function
StandardDeviation Function
AverageDeviation Function
DeviationsSquared Function
COVAR Function (Microsoft Excel)
vXValues: First set of data. Numeric-type array or Variant array containing only numeric elements. This function is NOT affected by the current setting of the StatVarType Property. It assumes that vXValues is an array that contains only numeric elements.
vYValues: Second set of data. Numeric-type array or Variant array containing only numeric elements. This function assumes that vYValues is an array that contains only numeric elements.
Return value: Function returns the average of the products of the deviations for each data point pair. Function returns Null if the arrays vXValues and vYValues contain a different number of elements, if both arrays are empty, or if there is some type of error, such as if the argument is a Variant array which contains an Object reference or String.
v1.5 Note: This function replaces the CovarianceVariantVector function, which has been removed from ArrayArithmetic Class. This function is slightly different in that it examines all of the elements in the array from its lower bound through its upper bound. Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.