# The metric of the expected difference of random variables

Suppose we have a set of independent random variables $X_1,\ldots,X_n$ over $\mathbb{R}$. It is easy to see that $$d_{ij}=E[|X_i-X_j|]$$ satisfy the triangle inequality. Is there any study of such metric spaces?

(Note that this metric is not the usual metric of distributions. In particular, for two identically distributed $X_1,X_2$, $d_{12}\ne 0$.)

Before this question gets closed (although I don't see any reason for that), I would like to point out that although this metric looks like the $L^1$ norm, it actually is not (the OP tried to point this out, but was ignored). The reason is that the probability space, on which $X_i$ are defined, is precisely the product measure obtained from their distributions.

In fact, what is defined here is the following "distance" between two probability measures $\mu_1$ and $\mu_2$ on $\mathbb R$ (or on any metric space) with a finite first moment: $$\rho(\mu_1,\mu_2) = \iint d(x_1,x_2)\,d\mu_1(x_1)\,d\mu_2(x_2) \;.$$ Although it is non-negative, symmetric, and satisfies the triangle inequality it is not a metric as $\rho(\mu,\mu)=0$ if and only if $\mu$ is a $\delta$-measure. One could call such an object hyper-metric (using hyper- as an antonym of pseudo-).

EDIT: This notion is actually the starting point of the theory of distance (Brownian) covariance first developed by Székely, Rizzo and Bakirov for Euclidean spaces and then extended by Lyons to more general metric spaces (see http://arxiv.org/pdf/1106.5758.pdf and the references therein).

I have opened the following meta discussion concerning the closure of this question: Why was the question about "expected difference of random variables" put on hold?

• I don't see any reason for downvoting either. – Campello Jul 10 '14 at 11:17
• I wonder if something is lost by thinking of $d$ as a metric on distributions rather than on random variables. In particular, as defined in the original post, when $i=j$ I think we have $d_{ij} = 0$. The point being that even if $i$ and $j$ have equal distributions, they are not equal as random variables (if they are independent). So it really would be a metric. – usul Jul 10 '14 at 22:55
• Thanks for the reference. It seems relevant. I am going to look into it. – jian Jul 12 '14 at 1:05
• @usul Since we are talking about independent random variables everything should be determined just by their distributions. – R W Jul 17 '14 at 16:24

I have not seen concretely your metric, but something similar is used to analyze extrema of Gaussian random fields. A very useful notion is entropy with respect to the following metric: $d(s,t)=(\mathbf{E}(X_t-X_s)^2)^{1/2}$. I think, such metrics were introduced by Dudley, but I may be mistaken. I am sure this is written in many books and papers. A minute of googling gave me http://cims.nyu.edu/~zeitouni/notesGauss.pdf, where this metric is introduced on p.18.

Your independence assumption makes this metric not so useful though, it seems, and the following computation may be more elucidating for your problem:

$$E|X-Y|= E\int_R (1_{X\le x}-1_{Y\le x})^2 dx = \int_R E(1_{X\le x}+1_{Y\le x}-21_{X\le x}1_{Y\le x})dx =\int_R (P\{X\le x\}+P\{Y\le x\}-2P\{X\le x\}P\{Y\le x\})dx =\int_R ((P\{X\le x\}-P^2\{X\le x\})+(P\{Y\le x\}-P^2\{Y\le x\})+(P\{X\le x\}-P\{Y\le x\})^2)dx =\int_R F_X(x)(1-F_X(x)) dx +\int_R F_Y(x)(1-F_Y(x)) dx + \int_R(F_X(x)-F_Y(x))^2dx$$

The first term on the right-hand side depends only on $F_X$, the distribution of $X$, the second one depends only on $F_Y$, the distribution of $Y$, and the last one is the square of $L^2$ distance between the distribution functions of $X$ and $Y$.

So the distance you want to consider is, in fact, a kind of $L^2$ distance on distributions with a little bit of what is called the "nugget effect" in geostatistics, where they often consider random fields $X_t$ such that $E(X_s-X_t)^2$ does not converge to zero as $s\to t$. This occurs naturally if $X_t=Y_t+Z_t$, where $Y_t$ is a very nice smooth process, and $Z_t$ has zero correlation range, i.e., $cov(Z_t,Z_s)=0$ for $t\ne s$.