Question about chi2test

Dear ROOT experts

i am trying to get the chi^2 test of two histograms, both histograms are in the y_axis range from 0 to 10^-6, the problem is the chi^2 test is so small ~ about 0 and this is something weird.

An image of the two histograms are attached below

When i calculate the chisquare value for the two histograms from using this line

cout <<"The chi2 equal h1 "<<h1->Chi2Test(h2, "CHI2")<<endl;

it gives me a weird zero value
if you please is there any method to solve this problem.

Thanks in advance

@moneta can surely help.

1 Like

Maybe the test failed for some reason; if you add the ā€œPā€ option h1->Chi2Test(h2, "P,CHI2") of Chi2Test you can see if the test was good (igood=0) or not; the values of igood are explained some lines below, under Chi2TestX(). Also, check on that page whether you should be using one of the other options too (UU,ā€¦).

1 Like

Thanks a lot,

After applying the ā€œPā€ option as you kindly illustrated, the result is
Chi2 = 0.000000, Prob = 0, NDF = -1, igood = 0

I think this is a weird result

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.