Probability - TGraphError

When I use TGraphError I can display the probability. What is this? I thought it was the probability of the chisquare / ndf, but it is not. What is it?

Thanks.

The “Prob” parameter is the result of TMath::Prob(chi2,ndf).
see:

root.cern.ch/root/htmldoc//TMath.html#TMath:Prob

Rene

1 Like

[quote=“brun”]The “Prob” parameter is the result of TMath::Prob(chi2,ndf).
see:

root.cern.ch/root/htmldoc//TMath.html#TMath:Prob

Rene[/quote]

thanks. In your link the documentation say:

“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.”

I don’t know what is the incomplete gamma funcion; I studied that the probability of the chi-square is:

2/ ( 2^(a) * Gamma(a)) * Int_{2x}^{inf} y^(2a-1) exp(-y^2/2) dy

I don’t know the details, but I’m know that the value of root of 1-chisquare probability is different from mine (taken from tables)

The formula for incomplete gamma function is:
P(a, x) = (1/G(a))*Int_{0}^{x}(exp(-t)*t^(a-1))dt
And the chisquare probability function is P(ndf/2, chi/2).
The TMath::Prob function returns 1-P
So if you could give a particular example of chi2 and ndf, where the TMath function is giving a wrong result, I’d be happy to fix it.

TMath::Prob for the p-value of the chisquare test? Jesus, can we use more meaningful/descriptive names for the functions?

I literally spent an hour looking for this…I am sure next time I need to use it I’ll forget it and will
have to do this investigation all over again.