Expand Minimize
This topic has not yet been rated - Rate this topic

WorksheetFunction.Covar Method

Office 2007
Returns covariance, the average of the products of deviations for each data point pair.

Syntax

expression.Covar(Arg1, Arg2)

expression   A variable that represents a WorksheetFunction object.

Parameters

NameRequired/OptionalData TypeDescription
Arg1RequiredVariantThe first cell range of integers.
Arg2RequiredVariantThe second cell range of integers.

Return Value
Double

Remarks

Use covariance to determine the relationship between two data sets. For example, you can examine whether greater income accompanies greater levels of education.

  • The arguments must either be numbers or be names, arrays, or references that contain numbers.
  • If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.
  • If Arg1 and Arg2 have different numbers of data points, COVAR generates an error.
  • If either Arg1 or Arg2 is empty, Covar generates an error.
  • The covariance is:

    Equation

    where x and y are the sample means AVERAGE(array1) and AVERAGE(array2), and n is the sample size.




Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.