# How to extract the significance of model vs data from the chi2/dof and/or the p-value of a fit in multiples of sigma?

Is there a general of way of extracting the significance of a model in terms of sigma in ROOT? For instance, if the outcome of chi2 minimisation yields TMath:Prob(chi2,dof) = 0.96, how do i know its significance?
Thanks, Daniel.

When performing a statistical test on teh compatibility of your data with your model (your null hypothesis), you get a p-value , for example using the asymptotic formula of the chi2 distribution, such as `TMath::Prob(chi2, dof)`.
You can then interpret this p-value as `sigma` of the normal distribution, see paragraph 2 and 2.1 of the link above.
The formula to do in ROOT is
`ROOT::Math_normal_quantile_c(pvalue, 1)` for one-tailed test and `ROOT::Math_normal_quantile_c(pvalue/2, 1)` for two-tailed test. In this case, since you are looking a the chi2 distribution, it is more appropriate to use the one-tailed test.

Cheers

Lorenzo

Thanks for the answer and reference, Lorenzo.

I have one extra doubt: the “pvalue” to put in the argument of `ROOT::Math_normal_quantile_c(pvalue, 1)` is truly the outcome of TMath::Prob(chi2,dof)? In such case, the significance of a fit with TMath::Prob(450.438,506)=0.963576 isn’t significant one? I’m actually puzzled by that.

Hi,
Yes it is correct, you should use the output of Math::Prob. Now if you get a p-value closer to one, it does not really make sense to speak about significance, because your tested model is in agreement with your data.

Lorenzo

Ok! Thanks a lot!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.