Difference between two chi2 values?

Dear experts, I have fitted a very complex model and based on that I have obtained the following chi2values from different methods.

chisquare from myframe->chiSquare() = -1
chisquare from RooChi2Var.getVal() = 896.868

The former is from

double chisquare = myframe->chiSquare();

and the later is from

RooChi2Var chi2("chi2", "chi2", total, data); double chi2_val = chi2.getVal();

Now, which one is correct and what is the difference between the two?

Thanks in advance!


I add in the loop @jonas . However, could you perhaps share a reproducer?


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