  In recent years, Bayesian nonparametric statistics has gathered extraordinary
attention. Nonetheless, a relatively little amount of work has been expended on
Bayesian nonparametric hypothesis testing. In this paper, a novel Bayesian
nonparametric approach to the two-sample problem is established. Precisely,
given two samples $\mathbf{X}=X_1,\ldots,X_{m_1}$ $\overset {i.i.d.} \sim F$
and $\mathbf{Y}=Y_1,\ldots,Y_{m_2} \overset {i.i.d.} \sim G$, with $F$ and $G$
being unknown continuous cumulative distribution functions, we wish to test the
null hypothesis $\mathcal{H}_0:~F=G$. The method is based on the Kolmogorov
distance and approximate samples from the Dirichlet process centered at the
standard normal distribution and a concentration parameter 1. It is
demonstrated that the proposed test is robust with respect to any prior
specification of the Dirichlet process. A power comparison with several
well-known tests is incorporated. In particular, the proposed test dominates
the standard Kolmogorov-Smirnov test in all the cases examined in the paper.
