Comparison between 2 1D-histograms

Dear ROOT experts,

I would like to compare 2 1D-histograms. The first histogram [lets name it h_Pred] has weighted entries and gives a prediction of the second one [h_Obs], which has weight=1 for all entries.
My question is, which is the best way to compare them in order to quantify the agreement.

A first approach, is to plot the ratio of the two [h_Pred/h_Obs] and fit with a pol1. There is though a problem for the bins with very low statistics[~2-3 entries-small error bar which is obviously wrong] which in some cases ruins the fit. [I would like to avoid a variable binning] Poisson errors could be solution. (?)

Is there a better/other way to do this comparison?

Thank you very much in advance.

Best regards,
Loukas

May be have a look to:
root.cern.ch/root/html/TH1.html#TH1:Chi2Test
root.cern.ch/root/html/TH1.html#TH1:Chi2TestX

Hi,

thank you very much! I’ll try it.

Cheers – loukas