flav-io / flavio

A Python package for flavour physics phenomenology in the Standard model and beyond
http://flav-io.github.io/
MIT License
71 stars 62 forks source link

Likelihood Contour Plots differing based on y-axis range #117

Closed mbr-phys closed 4 years ago

mbr-phys commented 4 years ago

Hi,

I'm working on a project using flavio for some fits of the 2HDM, and among others, I have been working on R(K) and R(K*). For these, I produce the attached plots which show significantly different results for these observables depending on the range of values I allow mH+ (y-axis) to take (either log(mH+) in (0,3.5) or (1,3.5)). There is no other difference between producing these two plots other than the range. Both of these take "steps=60" in the likelihood_contour_data function. Increasing steps does not significantly change either of these plots. I am looking for any guidance you could give into how the likelihood contours would give such different results purely based on range, and if there's a way to tell which, if either, of the two plots would likely be the realistic fit.

Thanks in advance. I look forward to hearing from you.

rks_plot rks_plot2

DavidMStraub commented 4 years ago

Which version of flavio?

Related: https://github.com/flav-io/flavio/pull/113 @peterstangl

mbr-phys commented 4 years ago

Version 2.0.0.

Just had a look at #113 . I'll try updating to 2.1.0 and seeing if this resolves it.

peterstangl commented 4 years ago

@mbr-phys it looks like the actual minimum of your chi squared function is outside of the plot range in both cases, but at around 0.7 on the y-axis the values are considerably smaller (the small darker area on the right edge of the second plot). By defauit, flavio just uses the smallest value inside the plot range as the minimum, which is not a reasonable thing to do in your case. There, it is necessary to minimize the chi squared function numerically to find the value of the actual minimum.

Before flavio version 2.1.0, the plotting functions were not able to deal with a minimum outside of the plot range and one had to write a dedicated plotting function. From version 2.1.0 on, the exact minimum can be passed to flavio.plots.contour and flavio.plots.likelihood_contour_data and a warning is raised if this is not done (PR #133 mentioned by @DavidMStraub).

mbr-phys commented 4 years ago

This all makes a lot of sense. That looks like the plots are now resolved with the inclusion of the chi squared minimum proper. Many thanks for the guidance.