complex corelation and p-value

Version 1.0.0 (2.06 KB) by KSSV
To find the complex correlation and its p-value between two complex vectors.
7 Downloads
Updated 24 Jan 2025

View License

The complex correlation coefficient is a measure of the relationship between two complex-valued datasets. It generalizes the Pearson correlation coefficient to handle the real and imaginary components of complex signals.
Let w1, w2 be two complex vectors.
w1 = u1+i*v1
w2 = u2+i*v2
Where:
  • u1,v1: Real and imaginary parts of the vector w1.
  • u2,v2: Real and imaginary parts of the vector w2.
The complex corelation between w1, w2 is igven by:
Formula:
The complex correlation ρ is given by:
Where:
  • ⟨⋅⟩: Mean or expected value.
Interpretation of complex corelation ρ:
1. Magnitude Analysis: The magnitude of ρ, given by |ρ|, indicates the strength of the correlation between the two vectors:
If : The two signals are perfectly correlated (linear relationship exists).
If : The two signals are uncorrelated.
Intermediate values ()): Indicates partial correlation, where higher values suggest stronger correlation.
2. Phase Analysis: The phase of ρ, given by:
represents the phase shift between the two signals.
If : The signals are in phase (no delay).
If : Signal 2 leads Signal 1.
If : Signal 1 leads Signal 2.
Statistical Significance (p-value)
The statistical significance is calculated using Monte Carlo simulations.
If p-value < 0.05, the complex correlation ρ is statistically significant.
If p-value >= 0.05, the observed correlation might have occurred by chance.
Reference: Kundu, P. K. 1975. Ekman veering observed near the ocean bottom. J. Phys. Oceanogr. 6, 238-242.

Cite As

KSSV (2025). complex corelation and p-value (https://www.mathworks.com/matlabcentral/fileexchange/179589-complex-corelation-and-p-value), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0