In this work, we propose a novel nonparametric Bayesian approach to the so-called two-sample problem. Let X-1, . . . , X-n and Y-1, . . . , Y-m be two independent i.i.d samples generated from P-1 and P-2, respectively. Using a nonparametric prior distribution for (P-1, P-2), we propose a new evidence index for the null hypothesis H-0 : P-1 = P-2 based on the posterior distribution of the distance d(P-1, P-2) between P-1 and P-2. This evidence index is easy to compute, has an intuitive interpretation, and can also be justified from a Bayesian decision-theoretic framework. We provide a simulation study to show that our method achieves greater power than the Kolmogorov-Smirnov and the Wilcoxon tests in several settings. Finally, we apply the method to a dataset on Alzheimer's disease.