Skip to content

Commit

Permalink
more explicit var names
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Nov 10, 2020
1 parent d420e5f commit ab1b78e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pyhf/infer/calculators.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,13 @@ def expected_pvalues(self, sig_plus_bkg_distribution, b_only_distribution):
corresponding to the :math:`\mathrm{CL}_{s+b}`,
:math:`\mathrm{CL}_{b}`, and :math:`\mathrm{CL}_{s}`.
"""
# Calling pvalues is easier then repeating the CLs calculation here
return [
self.pvalues(v, sig_plus_bkg_distribution, b_only_distribution)[-1]
for v in [b_only_distribution.expected_value(x) for x in [2, 1, 0, -1, -2]]
self.pvalues(test_stat, sig_plus_bkg_distribution, b_only_distribution)[-1]
for test_stat in [
b_only_distribution.expected_value(n_sigma)
for n_sigma in [2, 1, 0, -1, -2]
]
]


Expand Down

0 comments on commit ab1b78e

Please sign in to comment.