I propose a generalization of Kolmogorov-Smirnov, Cramér-von Mises and Anderson-Darling homogeneity tests that can be used to weighted samples. The only tests of weighted samples in ROOT are TH1::Chi2test and TH1::KolmogorovTest. Generally, testing homogeneity of binned continuous data is not good (as you cannot accept original null hypothesis about unbinned distribution + get different p-values for different binning) and both tests mentioned above have their flaws. Therefore, I decided to contribute to ROOT with my code that is very similar to TMath::KolmogorovTest which can be applied to two unweighted samples.
Along the code with example of use I attached my poster from recent ACAT where details can be found with analysis of tests’ performance.
It was written in ROOT 6.04. It is not working when using ROOT 5 because of numeric integration libraries are not included in the old version.
Please tell me whether I should explain something which is unclear, modify the code or add something that is missing. I hope that my code can help you when determining homogeneity.