scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
283 stars 83 forks source link

Type-O in Binder example notebook #577

Closed nhartman94 closed 5 years ago

nhartman94 commented 5 years ago

Description

The example Binned HEP Statistical Analysis in Pyton has a small type-O for the calculation of the obs upper limit. https://diana-hep.org/pyhf/examples/notebooks/binderexample/StatisticalAnalysis.html#HistFactory

Expected Behavior

In the plot for cell 12 it looks like the obs upper limit on mu should be close to 0.6.

Actual Behavior

The result printed in cell 13 says it is 0.96. The issue is with the invert_interal function in cell 11: the line yvals = cls_obs should be replaced with y_vals = cls_obs

Steps to Reproduce

Run the Binder example

Checklist

N/a because has to do with the documentation

matthewfeickert commented 5 years ago

Thanks very much for reporting this Issue, @nhartman94. Even better you kindly reported the fix as well. Awesome! :rocket:

I'll get a fix for this in immediately.