COVARIANCE.S

Formulas / COVARIANCE.S
Return the sample covariance.
COVARIANCE.S(array1, array2)
  • array1 - the first cell range of integers
  • array2 - the second cell range of integers

Examples

  • =COVARIANCE.S({2,4,8},{5,11,12})

    The COVARIANCE.S function can be used to calculate the sample covariance for two sets of data points. To calculate the sample covariance for the data points {2,4,8} and {5,11,12}, use the preceding formula.

  • =COVARIANCE.S(A3:A5,B3:B5)

    The COVARIANCE.S function can also be used to calculate the sample covariance for two sets of data points that are stored in two different ranges of cells. For example, to calculate the sample covariance for the data points in A3:A5 and B3:B5, use the formula above.

  • The COVARIANCE.S function will return a number that indicates the level of correlation between the two sets of data points. A positive number indicates that the two sets of data points are positively correlated, while a negative number indicates that the two sets of data points are negatively correlated.

  • =COVARIANCE.S({3,4,5},{7,8,9})

    The COVARIANCE.S function can also be used to calculate the sample covariance for two sets of numeric values stored in two different arrays. For example, to calculate the sample covariance for the data points {3,4,5} and {7,8,9}, use this formula.

Summary

The COVARIANCE.S function is used to calculate the sample covariance between two data sets. It requires that the arguments be numerical and throws an error if the arrays have different numbers of data points or are both empty.

  • The COVARIANCE.S function returns the sample covariance of data point pairs in two data sets, including cells with the value zero.
  • COVARIANCE.S throws an error if either array is empty or contains a single data point (#DIV/0!) or if the input arrays differ in their number of values (#N/A).
  • The sample covariance does not include logical values, text, or empty cells.

Frequently Asked Questions

What is the COVARIANCE.S function?
The COVARIANCE.S function is a statistical function that returns the sample covariance of data point pairs in two data sets.
What does the sample covariance mean?
The sample covariance is the average of the products of deviations for each data point pair.
What types of arguments can be used with the COVARIANCE.S function?
The arguments of the COVARIANCE.S function need to be numerical or references, arrays, or names containing numerical values.
What data is ignored by the COVARIANCE.S function?
The COVARIANCE.S function ignores text, empty cells, or logical values.
What error is thrown if either input array only contains a single data point each?
The COVARIANCE.S function throws a #DIV/0! error if either input array only contains a single data point each.
What error is thrown if its input arrays contain a different number of values?
The COVARIANCE.S function throws a #N/A error if its input arrays contain a different number of values.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.