How it works
Rank both lists and calculate Pearson correlation on the ranks to measure a monotonic relationship.
Worked example
X values: 1, 2, 2, 3 · Y values: 4, 2, 2, 1. The result is -1.
How to read the result
Tied values receive the average of their rank positions. Neither list can be constant.