Name
COVAR_POP — Returns the population covariance of a set of number pairs.
Synopsis
numeric
COVAR_POP
(
|
in expr1 any , |
in
expr2
any
) ; |
Description
COVAR_POP returns the population covariance of a set of number pairs. Both expr1 and expr2 are numeric expressions. Virtuoso applies the function to the set of (expr1, expr2) pairs after eliminating all pairs for which either expr1 or expr2 is null. Then Virtuoso makes the following computation:
(SUM(expr1 * expr2) - SUM(expr2) * SUM(expr1) / n) / n
where n is the number of (expr1, expr2) pairs where neither expr1 nor expr2 is null.
Parameters
expr1
Number expression.
expr2
Number expression.
Return Types
The function returns a value of type NUMERIC. If the function is applied to an empty set, then it returns null.