[Physics] How to calculate the uncertainty of a fit function?

nuclear-physicsstatistics

I'm doing research on nuclear physics. What I will be asking is actually some general question.

Suppose that I have a set of data with 8 points x={x0,x2…,x7} (in my example, x-axis is transverse momentum), y={y0,…,y7}, and statistical error bars ey={ey0,…ey7}. Using any software that is based on least $\chi^2$ method (for example, CERN ROOT) and is fed with some fit function $f(x;\vec{p})$ (here, let's assume we have 4 parameters), we would get the precise value of p={p0,p1,p2,p3} and their uncertainties err_p={errp0,errp1,errp2,errp3}.

Now here's the question, how can I draw a band that specifies the statistical uncertainties of this fit function, as illustrated by the red band? Please also give the underlying reason briefly, or maybe some paper that documented this problem well.

  • enter image description here

Best Answer

There exists a norm, which describes exactly how one does this in industry. This norm ist called "ISO / IEC 98-3; Uncertainty of measurement — Part 3: Guide to the expression of uncertainty in measurement". Though I didn't have the time to read the norm, yet, I was told that it is done as follows:

If you have the 95% confidence intervals of each of the four fit-parameters, you can use the following steps:

  1. Assume a distribution for each fit-parameter. For example, if the 95% confidence interval of the first fit-parameter if $[10, 80]$ you can assume a normal distribution. Thus the mean value of the first fit-parameter would be $\mu_1=(80-10)/2 = 45$ and its standard deviation is equal to $\sigma_1=(80-10)/4 = 22.5$ -- the later is valid, because the 95% confidence interval covers approx. the values from $-2\sigma$ to $+2\sigma$. Thus for the first fit-parameter you draw a random number from $N(\mu_1, \sigma_1^2)$.
  2. Proceed like this for each of the four fit-parameters.
  3. If you have a set of four random numbers (one for each fit-parameter) you use your fit function to calculate the value using these four randomly generated parameters.
  4. Repeat step 1 to 3 many times. Thus you obtain many "randomly generated data-points".
  5. Finally calculate the 95% confidence interval of your randomly generated data-points and draw them onto the graph.
Related Question