How to extend rank correlation to the continous case/infinite dimensions?

First let's assume that I want to compare two discrete distributions $$d_1$$ and $$d_2$$, but that I am not interested in their absolute values. Rather, I am interested in knowing how these two distributions rank different values of their input random variable. In that case, it seems natural to transform them into rankings and use some measure of rank correlation, for example Kendall's $$\tau$$ instead of divergences or distances such as Kullback-Leibler or Jensen-Shannon.

However, I face a situation in which I need to compare two continuous distributions $$p$$ and $$q$$, but as in the previous case, I am not interested in the absolute values. I would thus like to define some comparison function $$f(p,q)$$ which would, for example, consider the red and blue distributions below to be equivalent (as if we were to discretize them, they would define the same ranking over their discretized domain).

Naturally, methods such as Kullback-Leibler or Jensen-shannon wouldn't be suitable for this task.

What is the best way to extend the notion of rank correlation to this case?

• Rank correlation is as a standard also applied to continuous distributions. What's wrong with that? Jan 23 at 13:01
• Thanks for the answer @Lewian, could you please elaborate a bit? Statistics is not my field, and as far as I could understand (e.g. from en.wikipedia.org/wiki/Rank_correlation), rank correlations seem to be defined based on pairwise comparisons between rankings for all of the discrete values over which the distributions are defined, e.g. the denominator in Kendall's $\tau$ is the number of all possible pairs which converges to $\infty$ in the continuous case.
– Ash
Jan 23 at 13:14
• OK, I was thinking you wanted to apply this to a finite sample from a continuous distribution (which is what the definition is about that you apparently have in mind), but it seems you are interested in the theoretical value that the correlation takes on the distribution itself. This is explained here: stats.stackexchange.com/questions/146523/… That the denominator converges to $\infty$ is not an issue, it's an average overall and converges to an expected value. Jan 23 at 17:30
• See also here stats.stackexchange.com/questions/353834/… where also the population definition of Spearman's rank correlation is given. Jan 23 at 17:30
• @Lewian, that was super interesting and useful, especially the expression of Kendall's $\tau$ in terms of the Copula. This and the Fréchet–Hoeffding lower bound on $C(u,v)$ have given me a good starting point. Thanks again!
– Ash
Jan 25 at 0:23