stored. Power was estimated by the fraction of test statistics that were at least as large as the 95th percentile of the null distribution. The null tables were based on 10 6 permutations. The noise level was chosen separately for each configuration and sample size, so that the power is reasonable for at least some of the variants. This enables a clear comparison using a range of scenarios of interest. Since the power was very similar for the Pearson and likelihood ratio test statistics, only the results of the likelihood ratio test statistic are presented. The simulations for the two-sample problem are detailed in 4.1, and for the indepen- dence problem in 4.2. The analysis was done with the R package HHG , now available on CRAN. We examined the power properties of the statistic aggregated by summation as well as by maximization for m ∈ { 2 ,...,N/ 2 } , as well as the minimum p -value statistic, min$_{m}$$_{∈{}$$_{2}$$_{,...,m}$$_{max}$$_{}}$ p$_{m}$ . We display here the results for m$_{max}$ = 149 and N = 500. However, the choice of m$_{max}$ has little effect on power, see Appendix G for results with other values of m$_{max}$ . Also, see Appendix G for the results for m$_{max}$ = 29 and N = 100. We compared these tests to six two-sample distribution-free tests suggested in the literature. We compared to Wilcoxon’s rank sum test, since it is one of the most widely used tests to detect location shifts. We compared to two consistent tests suggested recently in the literature, the test of Jiang et al. (2014), referred to as DS, and the test of Heller et al. (2013) on ranks, referred to as HHG on ranks. Finally, we compared to the classical consistent tests of Kolmogorov and Smirnov, referred to as 27 4.1 The two-sample problem