I calculate the statistical significance for cases where the p-value is very small,
the macro being:
// b = background, d = data
void ss( int b, int d ){
Double_t p = TMath::Poisson( d, b );
Double_t Z = TMath::Sqrt(2)*TMath::ErfInverse( 1 - p );
cout << p << endl;
cout << Z << endl;
return;
}
In my case the order of magnitude is b = 300, d = 600
, the corresponding p value if 8e-53, the ErfInverse functino returns 0 sigma for such value.
If I test the ErfInverse function for gradually smaller numbers, it is fine until e-17 when it suddenly drops to zero.
It looks like some some numerical unstability or a too rough precision in the estimation of the integral.
Do you confirm ? Is there a way to bypass this problem ?
for getting the significance, you should not use this function but
ROOT::Math::normal_quantile_c(p, 1)
which is the inverse of the integral of the normal distribution from +inf to x.
In your case by doing 1.-p if p is less than the double eps ( ~ 2 E-16 ) the result will be always 1.