Hello,
I am trying to fit data points with a suitable pdf. The chi2/ndf value is close to 1, but when i’m trying to calculate the KS-prob between the data points and the fitted function, it always gives me zero value. I have used the following snipped code in my script
h_func = model[N].createHistogram(“h_func”,x);
h_data = rh[N].createHistogram(“h_data”,x);
ks = h_func.KolmogorovTest(h_data,“NN”);
h_func and h_data are the corresponding model and data histograms.
I’m not getting why it’s giving zero value always, I hope this is the right way to calculate the KS-prob. And one more thing that few times the probability (for a certain chi2 and a no. of degrees of freedom) for this fit is bit low although the chi2/ndf value is very close to 1.
Cheers, Niladri