A novel methodology which improves the performance of nonparametric, $L_2$-based goodness-of-fit testing is introduced. The technique is based on the piecewise approximation of the distance between an empirical estimate of the density and the null model. The developments include test statistics for both fully specified and parametrically estimated densities. The theoretical results contributed include analytic quantification of the test statistic asymptotic distribution under both the null and the alternative hypothesis and closed form expressions for its power under Pitman alternatives. Further, the Edgeworth expansion of its size and power functions are derived and employed in developing a bandwidth selector, designed to optimize power, subject to keeping the size constant. Finally, simulation evidence is provided on the performance of the test under parametric and nonparametric types of alternatives as well as under the two sample problem, in comparison to existing, well established tests in the literature.
An Improved $L_2$-Distance Based Density Goodness-Of-Fit Test