Hi everybody,
Could you remind me how we can cover entire %100 of the Gaussian area by using Integral(…,…) for the function we defined earlier? I guess, we can’t write -infinity to + infinity as an option.
For instance:
TF1*f1= new TF1("f1","gaus", -10,10);
f1->SetParameter(0,10);
f1->SetParameter(1,0);
f1->SetParameter(2,2);
f1->Draw();
f1->Integral(-6, 6);
All we know, for example, we can cover 99.73% if we go range from -3sigma to +3sigma as I chose above from -6 to 6. Thus, I can retrieve the full area by dividing the result of this integral to 0.9973.
Also, the formulation says the area of a Gaussian is height x sigma x sqrt(2*pi) . When I compare the ROOT’s Integral result, they don’t match %100. For instance integral gives 50.128 after percentage correction, but formula gives 50.132.
Another, more important question for me, is there any example to look at to get the blue area I badly marked in the picture I attached. It shows the simple case when 2 Gaussian functions are overlapped.
Mathematically, we can just get the integral of the (f1-f2) in the specified range on X axis. That will give immediately, the blue area. How should I implement that to my code, so ROOT understands? Probably, I will need errors, too. However, let’s get the 1st bit, first.
Appreciate to all in advance.