significance

erfc_inverse(x)[source]

erfc-1(x) = - 1/sqrt(2) * normal_quantile( 0.5 * x)

normal_quantile(p)[source]

Computes quantiles for standard normal distribution N(0, 1) at probability p

prob(chi_2, ndf)[source]

Computation of the probability for a certain Chi-squared (chi2) and number of degrees of freedom (ndf).

Calculations are based on the incomplete gamma function P(a,x), where a=ndf/2 and x=chi2/2.

P(a,x) represents the probability that the observed Chi-squared for a correct model should be less than the value chi2.

The returned probability corresponds to 1-P(a,x), which denotes the probability that an observed Chi-squared exceeds the value chi2 by chance, even for a correct model.

significance(l1: float, l2: float, ndf: int) float[source]

computation of significance for log-likelihood fit values l1 and l2 with number of degrees of freedom (ndf).