Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use proper Clopper-Pearson interval for efficiency ratio #278

Merged

Conversation

dantrim
Copy link
Contributor

@dantrim dantrim commented Aug 3, 2021

Fixes #277.

* Use the correct Clopper-Pearson interval for an efficiency ratio as for efficiency numerator is subset of denominator
   - Update docstring to reflect this
* Add default values for ratio plot ylabel and ylim if `efficiency` option used
* Correct efficiency plot example in user guide
* Add test to ensure no uncertainties are above 1

Copy link
Member

@henryiii henryiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will let @matthewfeickert look it over too just to be sure. :)

Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all good and huge thanks @dantrim! Though we should also update the example in the docs as well. I'm happy to take care of this in the morning once I'm out of meetings though as this fixes things I did wrong previously.

src/hist/intervals.py Outdated Show resolved Hide resolved
@matthewfeickert matthewfeickert changed the title fix: error interval computation for efficiency ratio and add test fix: Use proper Clopper-Pearson interval for efficiency ratio Aug 4, 2021
Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @dantrim!

@matthewfeickert matthewfeickert merged commit d16d668 into scikit-hep:main Aug 4, 2021
@matthewfeickert
Copy link
Member

@all-contributors please add @dantrim for code

@allcontributors
Copy link
Contributor

@matthewfeickert

I've put up a pull request to add @dantrim! 🎉

@matthewfeickert
Copy link
Member

Ping @heatherrussell just to give them a heads up on this correction given they were the motivation for PR #266.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Uncertainty bands in efficiency ratios go above unity
3 participants