Chaterjee's xi correlation

An implementation of Chaterjee's xi correlation for MATLAB
97 Downloads
Updated 1 Jun 2022

Chaterjee's xi correlation for MATLAB

View Chaterjee's xi correlation on File Exchange

What is Chaterjee's xi correlation:

  • Measure of the dependency between 2 variables.
  • Able to capture non-linear dependencies. Pearson/Spearman only work for linear trends (see below).
  • Tool for inference (if offers p-values or confidence intervals).

How to use it:

x = linspace(0, 20, 1000);
y = cos(x) + 0.3*randn(1, 1000);

xi = xicor(x, y);

Post any bugs/ideas/comments as issues!

The difference between Pearson's (<math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="010f0b0792e378dfc679a795343fbae9">$r$</math-renderer>) and xi-correlation (<math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="010f0b0792e378dfc679a795343fbae9">$\xi$</math-renderer>):

Image description

References:

  1. Sourav Chatterjee, A New Coefficient of Correlation, Journal of the American Statistical Association, 116:536, 2009-2022, 2021. DOI:10.1080/01621459.2020.1758115
  2. XICOR R package: https://cran.r-project.org/web/packages/XICOR/index.html

Cite As

David Romero (2026). Chaterjee's xi correlation (https://github.com/drombas/xicor-mat/releases/tag/v1.0.1), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.1

See release notes for this release on GitHub: https://github.com/drombas/xicor-mat/releases/tag/v1.0.1

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.