xi(X,Y) = 0
if and only if the two variables are independent, while xi(X,Y) = 1
if Y
is a function of X
.
Caution
Contrary to many other correlation coefficients, XI is not symmetric.
The xi correlation (xicor) is based on cross correlation between ranked increments. For a simple explanation see this video
For more info on XI, see the original paper. A New Coefficient of Correlation S. Chatterjee 2020
A full example of how you can embed libxicor
in your application
can be found in xicor_example.c
:
gcc xicor_example.c -O3 -Wall xicor.c -I. -lm -o xicor_example