COVAR_SAMP Function | VantageCloud Lake - COVAR_SAMP - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

Returns the sample covariance of its arguments for all non-null data point pairs.

For the COVAR_SAMP window function that performs a group, cumulative, or moving computation, see Window Aggregate Functions.

Covariance

Covariance, the sum of the products of deviations for each non-null data point pair, measures whether two random variables vary in the same way.

High covariance does not imply a causal relationship between the variables.

Computation

When there are no non-null data point pairs in the data used for the computation, then COVAR_SAMP returns NULL.

Division by zero returns NULL rather than an error.

ANSI Compliance

This statement is ANSI SQL:2011 compliant.