pyhf.infer.calculators.AsymptoticTestStatDistribution

class pyhf.infer.calculators.AsymptoticTestStatDistribution(shift)[source]

The distribution the test statistic in the asymptotic case.

Note: These distributions are in \(-\hat{\mu}/\sigma\) space. In the ROOT implementation the same sigma is assumed for both hypotheses and \(p\)-values etc are computed in that space. This assumption is necessarily valid, but we keep this for compatibility reasons.

In the \(-\hat{\mu}/\sigma\) space, the test statistic (i.e. \(\hat{\mu}/\sigma\)) is normally distributed with unit variance and its mean at the \(-\mu'\), where \(\mu'\) is the true poi value of the hypothesis.

__init__(shift)[source]

Asymptotic test statistic distribution.

Parameters

shift (float) – The displacement of the test statistic distribution.

Returns

The asymptotic distribution of test statistic.

Return type

AsymptoticTestStatDistribution

Methods

__init__(shift)

Asymptotic test statistic distribution.

cdf(value)

Compute the value of the cumulative distribution function for a given value of the test statistic.

expected_value(nsigma)

Return the expected value of the test statistic.

pvalue(value)

The \(p\)-value for a given value of the test statistic corresponding to signal strength \(\mu\) and Asimov strength \(\mu'\) as defined in Equations (59) and (57) of [1007.1727]