significance¶
-
gammapy.stats.
significance
(n_on, mu_bkg, method='lima', n_on_min=1)[source]¶ Compute significance for an observed number of counts and known background.
The simple significance estimate Ssimple is given by
Ssimple=(non−μbkg)/√μbkgThe Li & Ma significance estimate corresponds to the Li & Ma formula (17) in the limiting case of known background μbkg=α×noff with α→0. The following formula for Slima was obtained with Mathematica:
Slima=[2nonlog(nonμbkg)−non+μbkg]1/2Parameters: n_on : array_like
Observed number of counts
mu_bkg : array_like
Known background level
method : str
Select method: ‘lima’ or ‘simple’
n_on_min : float
Minimum
n_on
(returnNaN
for smaller values)Returns: significance :
numpy.ndarray
Significance according to the method chosen.
See also
References
Examples
>>> significance(n_on=11, mu_bkg=9, method='lima') 0.64401498442763649 >>> significance(n_on=11, mu_bkg=9, method='simple') 0.66666666666666663 >>> significance(n_on=7, mu_bkg=9, method='lima') -0.69397262486881672 >>> significance(n_on=7, mu_bkg=9, method='simple') -0.66666666666666663