The ndof is equal to n or n-1?

i have two histograms: hdata and hmc. i want to get their chi2/ndof. when calculate the chi2, i combine bins whose events are less than10 to one bin, and then i get the number of bins: n. i want to know the ndof = n, or ndof = n-1? and why? Thanks!

Hi,

It depends if you have fixed the overall normalisation of the histogram or not. If you have re-normalized the MC histogram to have the same values as the data one, then you have one degree of freedom less and it should be n-1.

Best Regards

Lorenzo