Note

You are not reading the most up to date version of Gammapy documentation.
Access the latest stable version v1.3 or the list of Gammapy releases.

cash

gammapy.stats.cash(n_on, mu_on)[source]

Cash statistic, for Poisson data.

The Cash statistic is defined as:

C=2(μonnonlogμon)

and C=0 where μ<=0. For more information see Fit statistics

Parameters
n_onarray_like

Observed counts

mu_onarray_like

Expected counts

Returns
statndarray

Statistic per bin

References