Return the sample covariance.

`COVARIANCE.S(array1, array2)`

- array1 - the first cell range of integers
- array2 - the second cell range of integers

`=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.

`=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 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.

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.

The COVARIANCE.S function is a statistical function that returns the sample covariance of data point pairs in two data sets.

The sample covariance is the average of the products of deviations for each data point pair.

The arguments of the COVARIANCE.S function need to be numerical or references, arrays, or names containing numerical values.

The COVARIANCE.S function ignores text, empty cells, or logical values.

The COVARIANCE.S function throws a #DIV/0! error if either input array only contains a single data point each.

The COVARIANCE.S function throws a #N/A error if its input arrays contain a different number of values.

Drop CSV