ts_to_sigma#
- gammapy.stats.ts_to_sigma(ts, df=1, ts_asimov=0)[source]#
Convert delta ts to number of sigma.
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:
- tsfloat
Test statistic value.
- dfint, optional
Number of degree of freedom. Default is 1.
- ts_asimovfloat, optional
TS value in the Asimov dataset (in which counts equal to the predicted counts). In that case the function applies the Wald test described in [2] and [3], and the TS is assumed to follow a non-central chi2 distribution. Should only be used for sensitivity computations. Default is 0.
- Returns:
- n_sigmafloat
Significance in number of sigma.
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.