Hello,
I have a simple macro which calls the method TH1::Chi2Test(…) :
{
TH1F * histogram = new TH1F( “histogram”, “Simple Gaussian Histogram”, 100, -2, 2 );
histogram->FillRandom( “gaus”, 1000 );
TH1F * reference = new TH1F( “reference”, “Simple Gaussian Histogram”, 100, -2, 2 );
reference->FillRandom( “gaus”, 10000 );
float res1 = histogram->Chi2Test(reference);
float res2 = histogram->Chi2Test(reference,"");
cout<<res1<<" "<<res2<<endl;
}
The output is :
0.227191 0
I don’t know why it doesn’t give the same results.
Thanks for your help,
Nikola Makovec
lxplus212>echo $ROOTSYS
/afs/cern.ch/sw/lcg/external/root/5.14.00e/slc4_amd64_gcc34/root