Comparing two histograms - NOT using Kolmogorov test

Hi all,

I have a rather basic ROOT question here. I am trying to compare two histograms. I have used the Kolmogorov Test but I would like to try to use a Chi Squared (Pearson’s) test as well just to get a ‘second opinion’. I could probably write my own in a little macro or function but I was wondering if there exists a way to do it directly in ROOT.

I know that there is a TH1->Fit that uses a chi squared test… but this will only let me fit one histogram to a function.

Thanks in advance for any help!

John Carter

John,

We have added a new function in TH1 (CVS version)
see TH1::Chi2Test at
root.cern.ch/root/htmldoc/TH1.html#TH1:Chi2Test

Rene