Hello everyone,
i have discovered a strange behavior of Kolmogorov test probability, maybe someone can explain it…
So, what i am doing:
i generate 2 samples with uniform distribution and fill the values into array (so i get 2 arrays of unbinned data).
Then i sort them and perform Kolmogorov test for unbinned data on these sorted arrays (TMath::KolmogorovTest (n, arr1,n,arr2,"") )
I repeat this procedure 4000 times, get 4000 values of Kolmogorov probability, and fill these values to histogram.
Since the compared samples have same (uniform) distribution, the distribution of kolmogorov probability should be flat (uniform). However, what i get you can see on attached screenshot, and this is not uniform. There are some empty bins in the histgram, and the mean value is shifted to the right.
Same picture one would see for the binned Kolmogorov test.
Could anyone explain it?
I also attach my code.
KStest.C (946 Bytes)