Gaussian used in ROOT::Math::GoFTest

I am running a Kolmogorov-Smirnov test of a Gaussian with GoFTest with ROOT 5-34. Objects of this class can include a predefined Gaussian distribution using the enumerator kGaussian in the call to the class constructor. The class interface however does not allow to set the mean and sigma of this predefined Gaussian. Looking at the source code it looks like parameters are instead estimated from the data itself. A problem arises here, since the Kolmogorov-Smirnov is not valid if parameters are estimated from the data. While it is still possible to solve the issue by pluging-in an external CDF via the SetDistributionFunction method with the desired parametrization, it is incorrect for the GoFTest class to estimate the parameters of the predefined test distributions.

Hi Diego,

Thank you for your feedback. It is correct what you are saying and we should extend the interface for the 1-sample test to pass the scale and location of the distribution.
I will produce a fix for this in the next release.
In the mean time I have open a JIRA issue

As a workaround you can either pass directly the CDF or rescale the data to the given mean and sigma of the distribution

Best Regards


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