Re: Upper-tail probability of Chi-Squared Distribution

Rene Brun (Rene.Brun@cern.ch)
Thu, 10 Sep 1998 14:57:52 +0200


Urs Langenegger wrote:
>
> I have a small function calculating for some data a chi^2 with some
> degrees of freedom. I am interested in the confidence level. I tried
> to find the equivalent of the CERNLIB function PROB in the ROOT source
> code, but I didn't find it. I searched the website, without success.
>
> Is there a way to get the CL without having to build my own root
> executable (such that I can access PROB) or do the integration myself?
>
> Any hint would be appreciated,
>
> --U.

Urs,
I was hoping that somewhere in the world, an individual/group/division/
army would have developped the most basic mathematical routines
written in C++. There are certainly several public domain libraries
with this kind of functions and it should be no problems to invoke
them from Root.
A few months ago, this point was briefly discussed in this list.
I am hesitating between the two following solutions.
-Solution1. implement a class TUtils
===================================
This class will include the most frequently called math functions
from the existing mathlib/genlib of Cernlib. Like the existing
Root class TMath, the TUtils class will include static functions
eg TUtils::Prob, TUtils::Sort, TUtils::ZeroOfFunction, etc
TUtils functions will also be callable from the interpreter.

-Solution2. Wait for an HEP agreement on this topic
==================================================
CLHEP is around. Stefan Kluth has recently Rootified this class
library. There is also some activity at FNAL with the ZOOM library.
It would be nice if a small group of people (please not one more
committee!) could:
- Investigate what is already available
- List the math functions typically used from Cernlib
- propose this list to roottalk (and other newsgroups)
- make sure these functions can be called from Root (must go
through rootcint).

We could also add very basic functions such as Prob to TMath,
but we would like to keep TMath as small as possible because this class
is used in many Root classes.

Waiting for comments.

Rene Brun