# Getting negative chi sq value, but the fit looks good?

**URL:** <https://root-forum.cern.ch/t/getting-negative-chi-sq-value-but-the-fit-looks-good/54281>\
**Category:** Roofit and RooStats\
**Created:** [March 29, 2023, 12:31pm UTC](https://root-forum.cern.ch/t/getting-negative-chi-sq-value-but-the-fit-looks-good/54281 "2023-03-29T12:31:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [March 29, 2023, 3:36pm UTC](https://root-forum.cern.ch/t/getting-negative-chi-sq-value-but-the-fit-looks-good/54281/2 "2023-03-29T15:36:55Z")

</div>

Hello,  
How did you compute the chisquare ? Using `RooPlot::chiSquare` ?  
See also [How exactly does RooPlot::chisquare() compute the result? - #4 by Xuli](https://root-forum.cern.ch/t/how-exactly-does-rooplot-chisquare-compute-the-result/36388/4)

Lorenzo

---

_[View the full topic](https://root-forum.cern.ch/t/getting-negative-chi-sq-value-but-the-fit-looks-good/54281)._
