Theory of Nonparametric Tests