About accurancy

I have to two questions about the accuracy of fit result.

  1. How to set the accuracy of the fit parameters.(The plot is here)

For example. the parameter p0 is at the level of 1e-8, I think the result in the pad is not precise enough for my work.

  1. How to set the accuracy of parameters in Fit-box.
    Is it right by

To obtain more accurate result, waht can be represented the string “6.4g” ?

Best regards,

The format "%6.4g" gives 4 most significant decimal digits precision.
You could try (printing format for fit parameters in the stat box): gStyle->SetFitFormat("14.7g");

In the screenshot, all values of parameters and their errors are given with 6 most significant decimal digits precision.

The “p0” is around 5e-8, and its error is around 4e-9, so it’s around 8% (i.e., just 1 order of magnitude smaller than the value itself, and you get them both with 6 digits).

You can print this value with more digits, e.g.:
printf("p0 = %24.17g +- %24.17g\n", your_fit_function->GetParameter(0), your_fit_function->GetParError(0));

Thanks a lot.
It solved my problems.

Best regards,

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