Eval Error?

Hello,

I am fitting with a function fct a TgraphError. To get the value of the fund function at a given point x I use fct->Eval(x) but I didn’t find how to get the error on the given value, can someone help me ?

Thank you very much

Hi,

You can to use the FitResult class to get the confidence intervals values of the function at given points.
For example, for getting the interval on a point x0, you can do :


TFitResultPtr r = graph->Fit(myFunction,"S");

double x[1] = { x0 };
double err[1];  // error on the function at point x0

r->GetConfidenceIntervals(1, 1, 1, x, err, 0.683, false);
cout << " function value at " << x[0] << " = " << myFunction->Eval(x[0]) << " +/- " << err[0] << endl;

Lorenzo

Thank you very much :slight_smile:

Have a nice day

Charlotte

Sorry, can I ask what is the correlation of confidence interval with the error?
you choose 68.3% to get +/- 1 sigma?

Usually, when people talk about sigmas, they mean the tails of the normal distribution. This is kind of implicitly assumed.

If that’s the case, the relation between confidence intervals and sigmas can be read off from the central quantiles of the normal distribution. Like e.g. here:

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