Dear Rooters,
I have a function y = f(x,a,b) with a and b being free parameters whose uncertainties are da and db, respectively. Does ROOT provide any function or method to calculate the uncertainty of y, namely dy?
I add some texts below to clarify my question.
Manually, dy can be calculated using the error propagation formula (the one right below the “Simplification” headline) (https://en.wikipedia.org/wiki/Propagation_of_uncertainty). However it requires the derivative of f as a function of a and b.
For instance, assume that y = a*x + b;
The derivative of f as a function of a = x;
The derivative of f as a function of b = 1;
So, dy = sqrt((x^2da^2 + 1^2db^2)).
In this case, things seem very simple.
BUT
What if the function f is much more complicated? The derivative of f as a function of its parameters would have a very complicated form. Normally, I use the Monte Carlo method as follows.
I select random values of a and b within the range [a-da : a+da] and [b-db:b+db], respectively, then I calculate f and store it as y1.
Then I repeat N-1 times to get y2, y3, …, yN.
Finally, I calculate standard deviation of {yi} with i=1,N and consider it as dy.
This procedure is, however, slow!!!
SO my question is: Does ROOT provide a function or method that help me to solve the problem without doing calculus on the derivative or writing Monte Carlo code myself?
Thank you.
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided