x cor y cor[x;y]
x an d
y are conforming numeric lists returns their correlation as a float in the range
Perfectly correlated data results in a
-1. When one variable increases as the other increases the correlation is positive; when one decreases as the other increases it is negative.
Completely uncorrelated arguments return
q)29 10 54 cor 1 3 9 0.7727746 q)10 29 54 cor 1 3 9 0.9795734 q)1 3 9 cor neg 1 3 9 -1f q)1000101000b cor 0010011001b -0.08908708
cor is an aggregate function, equivalent to
Domain and range
Applies to all non-temporal numerics.