Histogram generated from RooAddPdf has large errors

Hello rooters, I used some keyspdfs to generate a fit to a roodataset. Once I got the result from the fit, then created a histogram from the rooaddpdf fit result. I scaled the histogram by the number of events represented by the dataset and then used the dataset and the histogram to find a chisquare between them. When writing the chisquare program, we are using a slightly different form of the usual chisquare, I printed the errors from the bins of the histogram from the pdf and they were several times larger than the events in the bin.

Why would this be?

Because you scaled the histogram. Let’s say you fill a histogram with 10 events, which you sampled from the PDF. Now you blow up the histogram by a factor 1000, so it looks like you have 10k entries. Still, the statistical uncertainty of your histogram needs to be equivalent to 10 events, so the errors get blown up as well.
What you should do if you want resonable errors is to generate as many events as you had in the dataset.

1 Like

I did that and it worked. Thank you so much.

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