  Independence analysis is an indispensable step before regression analysis to
find out essential factors that influence the objects. With many applications
in machine Learning, medical Learning and a variety of disciplines, statistical
methods of measuring the relationship between random variables have been well
studied in vector spaces. However, there are few methods developed to verify
the relation between random elements in metric spaces. In this paper, we
present a novel index called metric distributional discrepancy (MDD) to measure
the dependence between a random element $X$ and a categorical variable $Y$,
which is applicable to the medical image and genetic data. The metric
distributional discrepancy statistics can be considered as the distance between
the conditional distribution of $X$ given each class of $Y$ and the
unconditional distribution of $X$. MDD enjoys some significant merits compared
to other dependence-measures. For instance, MDD is zero if and only if $X$ and
$Y$ are independent. MDD test is a distribution-free test since there is no
assumption on the distribution of random elements. Furthermore, MDD test is
robust to the data with heavy-tailed distribution and potential outliers. We
demonstrate the validity of our theory and the property of the MDD test by
several numerical experiments and real data analysis.
