significance_on_off

gammapy.stats.significance_on_off(n_on, n_off, alpha, method='lima', neglect_background_uncertainty=False)[source]

Compute significance of an on-off observation.

TODO: describe available methods.

Parameters:

n_on : array_like

Observed number of counts in the on region

n_off : array_like

Observed number of counts in the off region

alpha : array_like

On / off region exposure ratio for background events

method : {‘lima’, ‘simple’, ‘direct’}

Select method

Returns:

significance : array

Significance according to the method chosen.

References

[R12]Li and Ma, “Analysis methods for results in gamma-ray astronomy”, Link

Examples

>>> significance_on_off(n_on=10, n_off=20, alpha=0.1, method='lima')
3.6850322319420274
>>> significance_on_off(n_on=10, n_off=20, alpha=0.1, method='simple')
2.5048971643405982
>>> significance_on_off(n_on=10, n_off=20, alpha=0.1, method='direct')
3.5281644971409953