TLimit::ComputeLimit different results

Dear Root team,

I have been using the Tlimit class to compute 95% C.L. Limits. And I was surprised when using ROOT 5.23 I got this:

TConfidenceLevel *myconfidence = TLimit::ComputeLimit(3,0.3,0.3,500000);
root [2] myconfidence->CLs()
Warning: clb = 0 !
(const Double_t)0.00000000000000000e+00

And using ROOT 5.21/02 I got this:
TConfidenceLevel *myconfidence=TLimit::ComputeLimit(3,0.3,0.3,50000$
root [1] myconfidence->CLs()
(const Double_t)4.97870683678640277e-02

I think that the previous version makes sense since the numbers I got are congruent with the 5sigma analysis made with a different tool.

Indeed, there was a small change in the code between 5.23.02 and 5.23.04. A “<=” became a “<”. I am still uncomfortable whether that change is justified or not… maybe we should revert that change.

Anyway it shows you how critical the result is in that case.
This is because the statistic is discrete (try myconfidence->Draw() ). The effect appears when data<1 .

More generally, note that TConfidenceLevel implements a method designed for cases where the statistics (especially the background statistics) is large and where data and background are compatible (within ~3 sigmas). In that case, it gives a good confidence level for exclusion. It will not behave properly when an excess close to 5 sigmas (or higher) is observed.