Reference/cov

From Kx Wiki
Revision as of 09:41, 12 October 2009 by Chris Burke (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

cov (covariance verb)

Returns the covariance of its arguments as a floating point number.

cov applies to all numeric data types and throws error with temporal types, char and sym.

Syntax

q)r:X cov Y

Example

q)2 3 5 7 cov 3 3 5 9
4.5
q)2 3 5 7 cov 4 3 0 2
-1.8125
q)select price cov size by sym from trade

See also


For a complete list of functions, see the kdb+ Function Reference.

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox