sigma_to_ts#
- gammapy.stats.sigma_to_ts(n_sigma, df=1, n_sigma_asimov=0)[source]#
Convert number of sigma to delta ts.
Assumes that the TS follows a chi2 distribution according to Wilks theorem [1]. This is valid only if:
the two hypotheses tested can be defined in the same parameters space
the true value is not at the boundary of this parameters space.
- Parameters:
- n_sigmafloat
Significance in number of sigma.
- dfint, optional
Number of degree of freedom. Default is 1.
- n_sigma_asimovfloat, optional
Significance in number of sigma in the Asimov dataset (in which counts are equal to the predicted counts). In that case the function applies the Wald test described in [2] and [3], where the TS of H1 under the H0 assumption is assumed to follow a non-central chi2 distribution. Should only be used for sensitivity computations. Default is 0.
- Returns:
- tsfloat
Test statistic value.
References
[1]Wilks theorem: https://en.wikipedia.org/wiki/Wilks%27_theorem
[2]Wald (1943): https://www.pp.rhul.ac.uk/~cowan/stat/wald1943.pdf
[3]Cowan et al. (2011), European Physical Journal C, 71, 1554. doi:10.1140/epjc/s10052-011-1554-0.