pyhf.infer.utils.get_test_stat#

pyhf.infer.utils.get_test_stat(name)[source]#

Get the test statistic function by name. The following test statistics are supported:

Example

>>> from pyhf.infer import utils, test_statistics
>>> utils.get_test_stat("q0")
<function q0 at 0x...>
>>> utils.get_test_stat("q0") == test_statistics.q0
True
>>> utils.get_test_stat("q")
<function qmu at 0x...>
>>> utils.get_test_stat("q") == test_statistics.qmu
True
>>> utils.get_test_stat("qtilde")
<function qmu_tilde at 0x...>
>>> utils.get_test_stat("qtilde") == test_statistics.qmu_tilde
True
Parameters:

name (str) – The name of the test statistic to retrieve

Returns:

The test statistic function

Return type:

callable