 The Wasserstein metric may be equivalently defined by

where formula_29 denotes the expected value of a random variable formula_30 and the infimum is taken over all joint distributions of the random variables formula_31 and formula_32 with marginals "formula_7" and formula_15 respectively.One way to understand the motivation of the above definition is to consider the optimal transport problem.That is, for a distribution of mass formula_35 on a space formula_31, we wish to transport the mass in such a way that it is transformed into the distribution formula_37 on the same space; transforming the 'pile of earth' formula_7 to the pile formula_15.