li_ma_significance

pyirf.statistics.li_ma_significance(n_on, n_off, alpha=0.2)[source]

Calculate the Li & Ma significance.

Formula (17) in https://doi.org/10.1086/161295

This functions returns 0 significance when n_on < alpha * n_off instead of the negative sensitivities that would result from naively evaluating the formula.

Parameters:
n_on: integer or array like

Number of events for the on observations

n_off: integer or array like

Number of events for the off observations

alpha: float

Ratio between the on region and the off region size or obstime.

Returns:
s_lima: float or array

The calculated significance