# Weird(?) chi2/ndf from multiple peak fit

**URL:** <https://root-forum.cern.ch/t/weird-chi2-ndf-from-multiple-peak-fit/57037>\
**Category:** ROOT\
**Tags:** roofit, hist\
**Created:** [November 8, 2023, 6:15pm UTC](https://root-forum.cern.ch/t/weird-chi2-ndf-from-multiple-peak-fit/57037 "2023-11-08T18:15:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thegame](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e495f1/32.png) [@thegame](https://root-forum.cern.ch/u/thegame)\
**Post date:** [November 8, 2023, 6:15pm UTC](https://root-forum.cern.ch/t/weird-chi2-ndf-from-multiple-peak-fit/57037/1 "2023-11-08T18:15:51Z")

</div>

donexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

---

<div class="post-metadata">

**Author:** ![Eddy\_Offermann](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eddy_offermann/32/25079_2.png) [@Eddy\_Offermann](https://root-forum.cern.ch/u/Eddy_Offermann)\
**Post date:** [November 8, 2023, 9:12pm UTC](https://root-forum.cern.ch/t/weird-chi2-ndf-from-multiple-peak-fit/57037/2 "2023-11-08T21:12:31Z")

</div>

hi @thegame ,

What is weird about the NDF (Number of Degrees of Freedom. Staring at your plot you seem to fit ~70 bins. You fit 2 functions with each 4 parameters, of which you fix some after the individual fits. NDF = #bins-#par = 70 - 8 = 62 or slightly higher if you fixed some of the parameters.

On a log-scale the fit looks ok. Have a closer Look at x~=6.5.

-Eddy

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 22, 2023, 9:12pm UTC](https://root-forum.cern.ch/t/weird-chi2-ndf-from-multiple-peak-fit/57037/3 "2023-11-22T21:12:45Z")

</div>

Closed on November 22, 2023, 9:12pm UTC

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