  We introduce a new unbinned two sample test statistic sensitive to CP
violation utilizing the optimal transport plan associated with the Wasserstein
(earth mover's) distance. The efficacy of the test statistic is shown via two
examples of CP asymmetric distributions with varying sample sizes: the Dalitz
distributions of $B^0 \rightarrow K^+\pi^-\pi^0$ and of $D^0 \rightarrow
\pi^+\pi^-\pi^0$ decays. The windowed version of the Wasserstein distance test
statistic is shown to have comparable sensitivity to CP violation as the
commonly used energy test statistic, but also retains information about the
localized distributions of CP asymmetry over the Dalitz plot. For large
statistic datasets we introduce two modified Wasserstein distance based test
statistics -- the binned and the sliced Wasserstein distance statistics, which
show comparable sensitivity to CP violation, but improved computing time and
memory scalings. Finally, general extensions and applications of the introduced
statistics are discussed.
