# Errors given by ROOT::Minuit2::Minuit2Minimizer are confusing

**URL:** <https://root-forum.cern.ch/t/errors-given-by-root-minuit2minimizer-are-confusing/57166>\
**Category:** ROOT\
**Tags:** roofit\
**Created:** [November 20, 2023, 3:37am UTC](https://root-forum.cern.ch/t/errors-given-by-root-minuit2minimizer-are-confusing/57166 "2023-11-20T03:37:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josiah1](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/josiah1/32/34984_2.png) [@Josiah1](https://root-forum.cern.ch/u/Josiah1)\
**Post date:** [November 20, 2023, 3:37am UTC](https://root-forum.cern.ch/t/errors-given-by-root-minuit2minimizer-are-confusing/57166/1 "2023-11-20T03:37:05Z")

</div>

I encountered a very difficult problem when using ROOT::Minuit2::Minuit2Minimizer. I would really appreciate it if friends who have encountered and understood this problem could explain it to me.

First I use ROOT::Minuit2::Minuit2Minimizer. After calling the Minimize() function for the first time for fitting, it will give me an error sigma1 of a certain important parameter. When I call Hesse() or Minimize() again after this line, Minuit2Minimizer will give me a new error sigma2 for the same parameter. Although it doesn’t always happen, sigma2 will occasionally be significantly smaller than sigma1. But I scanned this parameter and found that the error sigma1 actually corresponds to Delta chi ^2=1, which is what I want. Does anyone know why the Hesse(), which can calculate the error more accurately, does not give me an error that corresponds to Delta chi^2 =1? Does sigma2 make any sense in this case?

_Please fill also the fields below. Note that **`root -b -q`** will tell you this info, and starting from 6.28/06 upwards, you can call **`.forum bug`** from the ROOT prompt to pre-populate a topic._

\_ROOT Version: 6.28.06  
\_Platform: macosxarm64  
\_Compiler: Apple clang version 15.0.0 (clang-1500.0.40.1)

* * *

---

<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:** [November 20, 2023, 10:36am UTC](https://root-forum.cern.ch/t/errors-given-by-root-minuit2minimizer-are-confusing/57166/2 "2023-11-20T10:36:53Z")

</div>

Hi,

If you want to compute the error that corresponds to `Delta chi^2 = 1` you need to call Minos, i.e. the function [`Minimizer::GetMinosError`](https://root.cern.ch/doc/v614/classROOT_1_1Math_1_1Minimizer.html#af5f4fa9a2b7773e128ecb0c655797f79). Calling Hesse() will compute the error using the covariance matrix (inverse of the Hessian).  
If you are not calling Hesse after the minimization, Minuit2 will return the error using an approximate covariance matrix. Only in some specific conditions, when using strategy=1, Minuit2 will call automatically Hesse internally after the minimization.  
I hope this clarifies this problem

Best regards

Lorenzo

---

<div class="post-metadata">

**Author:** ![Josiah1](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/josiah1/32/34984_2.png) [@Josiah1](https://root-forum.cern.ch/u/Josiah1)\
**Post date:** [November 20, 2023, 3:04pm UTC](https://root-forum.cern.ch/t/errors-given-by-root-minuit2minimizer-are-confusing/57166/3 "2023-11-20T15:04:35Z")

</div>

Hi Lorenzo, thanks a lot for pointing this out. This leads me to know their differences.  
In my case, I should always use the MINOS error.

---

<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:** [December 4, 2023, 3:05pm UTC](https://root-forum.cern.ch/t/errors-given-by-root-minuit2minimizer-are-confusing/57166/4 "2023-12-04T15:05:19Z")

</div>

Closed on December 4, 2023, 3:05pm UTC

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