How exactly does RooPlot::chisquare() compute the result?

Hi Sebastian,

we discussed Chi2 a bit in this thread here:

A very important difference is that the chi2 from the plot is calculated in terms of plot bins, and it is divided by ndf, but the number of fit parameters is not subtracted from ndf. The Chi2Var just computes Chi2 (no ndf), and it does that in bins of the observable(s), which don’t necessarily coincide with the plot bins.

For the bin errors, the histogram uses asymmetric Poisson errors. Bins that have a model prediction of zero are skipped.