Feature #3990

Add function to convert sigma for a given number of freedoms to TS value

Added by Knödlseder Jürgen 12 months ago. Updated 10 months ago.

Status:NewStart date:02/17/2022
Priority:NormalDue date:
Assigned To:-% Done:


Target version:-


The equation to use is at the bottom of


In this equation a is the TS value that corresponds to a given significance level. Since a should be the outcome, the equation can only be solved iteratively.
To obtained the Probability on the left hand side of the equation, a Gaussian needs to be integrated over the interval [-sigma,+sigma], and the probability to be used is 1 - the integral.

The other parameters to use are alpha = 1/2 and k which is the number of degrees of freedom, see for example https://programmathically.com/chi-square-distribution-and-degrees-of-freedom/.


No recurrence.


#1 Updated by Knödlseder Jürgen 11 months ago

  • Target version deleted (2.0.0)

#2 Updated by Knödlseder Jürgen 10 months ago

For 2 degrees of freedom the equation simplifies to

P(Chi2 > TS) = exp(-E/2.0)

TS = -2 ln(P)

Sigma P TS
1 1-0.6827 2.2958
2 1-0.9545 6.1801
3 1-0.9973 11.8290

Also available in: Atom PDF