wstat#
- gammapy.stats.wstat(n_on, n_off, alpha, mu_sig, mu_bkg=None, extra_terms=True)[source]#
W statistic, for Poisson data with Poisson background.
For a definition of WStat see WStat : Poisson data with background measurement. If
mu_bkg
is not provided it will be calculated according to the profile likelihood formula.- Parameters
- n_onarray_like
Total observed counts.
- n_offarray_like
Total observed background counts.
- alphaarray_like
Exposure ratio between on and off region.
- mu_sigarray_like
Signal expected counts.
- mu_bkgarray_like, optional
Background expected counts.
- extra_termsbool, optional
Add model independent terms to convert stat into goodness-of-fit parameter. Default is True.
- Returns
- statndarray
Statistic per bin.
References