at moderate to large sample sizes (i.e., n ≥ 500). We did not include the results for sample size 125 in the figure because type I error control was too poor. In particular, for zero signal coordinates, the probability of rejection was 0 . 24 for bandwidth 1 and 0 . 33 for bandwidth 1 / 2. For a signal of 5, the empirical probability of rejection decreases between a sample size of 250 and 500, likely due to the poor type I error control at sample size 250. Nonetheless, this simulation shows that, overall, our method indeed has increasing power as sample size grows or as the number of coordinates j for which µ$_{j}$ (1 , W ) − µ$_{j}$ (0 , W ) not equal to zero in probability increases. This figure also highlights that the bandwidth may be an important determinant of finite-sample power, therefore warranting further scrutiny in future work. We have presented a novel approach to test whether two unknown functions are equal in distribution. Our proposal explicitly allows, and indeed encourages, the use of flexible, data- adaptive techniques for estimating these unknown functions as an intermediate step. Our approach is centered upon the notion of maximum mean discrepancy, as introduced in Gret- ton et al. (2006), since the MMD provides an elegant means of contrasting the distributions of these two unknown quantities. In their original paper, these authors showed that the MMD, which in their context tests whether two probability distributions are equal using n random draws from each distribution, can be estimated using a U - or V -statistic. Under the null hypothesis, this U - or V -statistic is degenerate and converges to the true parame- ter value quickly. Under the alternative, it converges at the standard n − 1 / 2 rate. Because this parameter is a mean over a product distribution from which the data were observed, it is not surprising that a U - or V -statistic yields a good estimate of the MMD. What is surprising is that we were able to construct an estimator with these same rates even when the null hypothesis involves unknown functions that can only be estimated at slower rates. To accomplish this, we used recent developments from the higher-order pathwise differentia- 32 7 Concluding remarks