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_on
ndarray
or array_like Total observed counts.
- n_off
ndarray
or array_like Total observed background counts.
- alpha
ndarray
or array_like Exposure ratio between on and off region.
- mu_sig
ndarray
or array_like Signal expected counts.
- mu_bkg
ndarray
or array_like, optional Background expected counts.
- extra_termsbool, optional
Add model independent terms to convert stat into goodness-of-fit parameter. Default is True.
- n_on
- Returns:
- statndarray
Statistic per bin.
References