Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
Returns the sample covariance of x-y pairs of values evaluated over a set, by using the unbiased population formula (dividing by the number of x-y pairs).
The CovarianceN function evaluates the specified set against the first numeric expression, to get the values for the y-axis. The function then evaluates the specified set against the second numeric expression, if specified, to get the set of values for the x-axis. If the second numeric expression is not specified, the function uses the current context of the cells in the specified set as values for the x-axis.
The CovarianceN function uses the unbiased population formula. This is in contrast to the Covariance function that uses the biased population formula (dividing by the number of x-y pairs).
The CovarianceN function ignores empty cells or cells that contain text or logical values. However, the function includes cells with values of zero.