A new test is proposed for the comparison of two regression curves $f$ and $g$. We prove an asymptotic normal law under fixed alternatives which can be applied for power calculations, for constructing confidence regions and for testing precise hypotheses of a weighted $L_2$ distance between $f$ and $g$ . In particular, the problem of nonequal sample sizes is treated, which is related to a peculiar formula of the area between two step functions. These results are extended in various directions, such as the comparison of $k$ regression functions or the optimal allocation of the sample sizes when the total sample size is fixed. The proposed pivot statistic is not based on a nonparametric estimator of the regression curves and therefore does not require the specification of any smoothing parameter.
"Nonparametric comparison of several regression functions: exact and asymptotic theory." Ann. Statist. 26 (6) 2339 - 2368, December 1998. https://doi.org/10.1214/aos/1024691474