COVARIANCE.S(array1, array2)
=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.
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.