Name
CORR — Returns the coefficient of correlation of a set of number pairs.
Synopsis
numeric
CORR
(
|
in expr1 any , |
in
expr2
any
) ; |
Description
CORR returns the coefficient of correlation of a set of number pairs. Both expr1 and expr2 are number expressions. Virtuoso applies the function to the set of (expr1, expr2) after eliminating the pairs for which either expr1 or expr2 is null. Then Virtuoso makes the following computation:
COVAR_POP(expr1, expr2) / (STDDEV_POP(expr1) * STDDEV_POP(expr2))
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.