Skip to content

Commit

Permalink
Clarify meaning of 2D contours in Minuit.draw_mnmatrix (#927)
Browse files Browse the repository at this point in the history
The method `Minuit.draw_mnmatrix` shows 2D contours that do not align
with the 1D intervals, which is ok. The keyword `cl` sets the confidence
level for the 1D intervals and 2D contours, according to Wilks' theorem,
the projections of the 2D contours are then wider than the 1D intervals.
The docstrings make this point more clear.
  • Loading branch information
HDembinski committed Aug 15, 2023
1 parent 77d7646 commit 47bd39c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 5 additions & 3 deletions doc/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ These methods and properties you will probably use a lot:
Minuit.fval
Minuit.nfit
Minuit.mnprofile
Minuit.draw_mnprofile
Minuit.mncontour
Minuit.visualize
Minuit.draw_mnmatrix


Minuit
------
Main interface
--------------

.. autoclass:: Minuit
:members:
Expand Down
14 changes: 11 additions & 3 deletions src/iminuit/minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,11 @@ def mncontour(
scan point. This scan produces a statistical confidence region according to the
`profile likelihood method <https://en.wikipedia.org/wiki/Likelihood_function>`_
with a confidence level `cl`, which is asymptotically equal to the coverage
probability of the confidence region.
probability of the confidence region according to `Wilks' theorem
<https://en.wikipedia.org/wiki/Wilks%27_theorem>`. Note that 1D projections of
the 2D confidence region are larger than 1D Minos intervals computed for the
same confidence level. This is not an error, but a consequence of Wilks'
theorem.
The calculation is expensive since a numerical minimisation has to be performed
at various points.
Expand Down Expand Up @@ -2085,8 +2089,12 @@ def draw_mnmatrix(
This draws a matrix of Minos likelihood scans, meaning that the likelihood is
minimized with respect to the parameters that are not scanned over. The diagonal
cells of the matrix show the 1D scan, the off-diagonal cells show 2D scans for
all unique pairs of parameters. The 2D scans show confidence regions. See
:meth:`mncontour` for details on the interpretation of these regions.
all unique pairs of parameters.
The projected edges of the 2D contours do not align with the 1D intervals,
because of Wilks' theorem. The levels for 2D confidence regions are higher. For
more information on the interpretation of 2D confidence regions, see
:meth:`mncontour`.
Parameters
----------
Expand Down

0 comments on commit 47bd39c

Please sign in to comment.