Anderson-Darling test with a user-defined function

Hello everyone,

After looking at the goftest.C, I have a small question regarding the possibility to run the Anderson-Darling test with a user defined function TF1.

If I have a TF1 function defined as such:

TF1 *f1 = new TF1("f1","function expression",-10,10);

Can I simply use the following:

ROOT::Math::GoFTest* test = new ROOT::Math::GoFTest(nEvents, dist,*f1);

where dist is an array containing the distribution I am running the AD test on?

I have tried to run this with some example but the results are a bit strange so I was wondering if I was missing something…

Thanks in advance :slight_smile:

I guess @moneta can help

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

Hi,

Sorry for the late reply. Yes, this is the correct way to use with a generic function. What so you mean the result is strange? Can you please post the data and the function. You can try to use also the KS test in the same way, by just calling GoFTest::KolmogorovSmirnovTest

Lorenzo