pyhf.infer.utils.pvals_from_teststat

pyhf.infer.utils.pvals_from_teststat(sqrtqmu_v, sqrtqmuA_v, qtilde=False)[source]

The \(p\)-values for signal strength \(\mu\) and Asimov strength \(\mu'\) as defined in Equations (59) and (57) of [1007.1727]

\[p_{\mu} = 1-F\left(q_{\mu}\middle|\mu'\right) = 1- \Phi\left(q_{\mu} - \frac{\left(\mu-\mu'\right)}{\sigma}\right)\]

with Equation (29)

\[\frac{(\mu-\mu')}{\sigma} = \sqrt{\Lambda}= \sqrt{q_{\mu,A}}\]

given the observed test statistics \(q_{\mu}\) and \(q_{\mu,A}\).

Parameters
  • sqrtqmu_v (Number or Tensor) – The root of the calculated test statistic, \(\sqrt{q_{\mu}}\)

  • sqrtqmuA_v (Number or Tensor) – The root of the calculated test statistic given the Asimov data, \(\sqrt{q_{\mu,A}}\)

  • qtilde (Bool) – When True perform the calculation using the alternative test statistic, \(\tilde{q}\), as defined in Equation (62) of [1007.1727]

Returns

The \(p\)-values for the signal + background, background only, and signal only hypotheses respectivley

Return type

Tuple of Floats