scikit-hep / pyhf

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

hypotest documentation not clear on return types depending on test statistic chosen #2262

Open kratsg opened 1 year ago

kratsg commented 1 year ago

Summary

If we have return_tail_probs=True, then for test_stat in ['qmu', 'qtilde'], we return [CLs, CLsb, CLb]; while for test_stat=q0 we return [CLsb, CLb] only.

Documentation Page Link

https://scikit-hep.org/pyhf/_generated/pyhf.infer.hypotest.html#pyhf.infer.hypotest

Code of Conduct

kratsg commented 1 year ago

To summarize briefly from offline with @phinate and @alexander-held (some bullet points):

kratsg commented 1 year ago

One more thing, CLx is making the implicit assumption (for x=s, sb, b) that the test stat involve is either qmu or qmu-tilde.

matthewfeickert commented 1 year ago

One more thing, CLx is making the implicit assumption (for x=s, sb, b) that the test stat involve is either qmu or qmu-tilde.

We do state this in the pyhf.infer.hypotest docs

https://github.com/scikit-hep/pyhf/blob/852a224d21da19ed25b7a8548315342d3c7c0c53/src/pyhf/infer/__init__.py#L108-L112

with a special note as well

https://github.com/scikit-hep/pyhf/blob/852a224d21da19ed25b7a8548315342d3c7c0c53/src/pyhf/infer/__init__.py#L115-L122

Although the place that I've found it to be the most clear (and I should update this as well in the docs) is in Appendix A.1.2 and Table 11 in the Procedure for the LHC Higgs boson search combination in Summer 2011 — which actually describes what ATLAS and CMS did for the Higgs discovery.

table-11

(This reference document has been quite useful before, as we used it as a reference check in PR https://github.com/scikit-hep/pyhf/pull/1610).

matthewfeickert commented 1 year ago

CL naming is just bad i think everyone agrees on this

@cranmer would agree with you too, I think, given Issue https://github.com/scikit-hep/pyhf/issues/965. :)