Real-valued random variables $X$ and $Y$ are "positively correlated" if $\mathbb{E}[XY]\geq \mathbb{E}X \mathbb{E}Y$, with the intuition that "the larger $X$ is the more probable it is that $Y$ is also large". If $X$ and $Y$ take values in general metric space $E$ (for simple intuition, imagine $E=R^3$, and $X$ and $Y$ represent the position of $2$ particles in $R^3$), the intuition of "positive correlation" can now be described as "$Y$ is probably close to $X$", but the formula above does not make sense (what is $\mathbb{E}[XY]$ if $X$,$Y \in R^3$?).
The first (general) question is - does there exist a formal definition of "something that generalizes positive correlation" to $E$-valued random variables, where $E$ is $R^n$, or a general metric space, or even a general measure space?
Here is a possible approach. Let $f:E \times E \to R$ be the density function of $X$ and $Y$. Let $F$ be the set of all symmetric density functions $(f(x,y)=f(y,x))$, and $S \subset F$ be the minimal convex closed set containing "the independent case": that is, if $f(x,y)=g(x)g(y)$ for some $g$, then $f \in S$. We will call $X$ and $Y$ (strictly) positively correlated (spc) if $f \in S$. Why does this make sense? In particular, it is easy to check that if $X$ and $Y$ are spc then $\mathbb{E}h(X)h(Y) \geq 0$ for any function $h: E \to R$. In the special case of real-valued random variables and $h(X)=X-\mathbb{E}X$, this becomes the standard notion of positive correlation.
Question 2. Is this something well-known? In particular, is this condition also sufficient, that is, does $\mathbb{E}h(X)h(Y) \geq 0$ imply that $X$ and $Y$ are spc?
Question 3 (main). Even if so, this seems to be hard to check for given $X$ and $Y$ (or for given $f$). Can the condition of strict positive correlation above (or suggest another one) be written in the form that is easy to check?