covar_pop()

Aggregate. Returns the population covariance of a set of number pairs to determine the relationship between the two data sets.

Syntax

covar_pop ( dependent-expression, independent-expression )

Parameters

dependent-expression The variable that is affected by the independent variable. The expression accepts only a range of integers.
independent-expression The variable that influences the outcome. The expression accepts only a range of integers.

Usage

This function converts its arguments to float, performs the computation in double-precision floating point, and returns a float as the result. If the function is applied to an empty set, then it returns NULL. Both dependent-expression and independent-expression are numeric. The function is applied to the set of (dependent-expression, independent-expression) pairs after eliminating all pairs for which either dependent-expression or independent-expression is NULL. The following computation is then made:

(SUM(expr1 * expr2) - SUM(expr2) * SUM(expr1) / n) / n 

where x represents the dependent-expression, y represents the independent-expression, and n represents the number of (x,y) pairs where neither x or y is NULL.

The covariance of a sample may be used to assess the relationship between things such as the rate of economic growth and the rate of stock market return.