1
$\begingroup$

I am fitting physics data with a gaussian function. The gaussian function has a mean(where it sits along the nsigma axis), width, and amplitude, along with corresponding errors for these parameters.

Then I do an integral of this fit function from certain sigma ranges to find the efficiency of certain cut ranges. I want to calculate the numerical error on this integral.

After searching on google, most of the results are the gaussian error function or gaussian integral. So I am really struggling with this.

$\endgroup$
4
  • 1
    $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$ Commented May 16 at 18:58
  • $\begingroup$ Your question isn't entirely clear; but are you basically looking to calculate the quantity $$ Q(n_1, n_2) = \int_{n_1 \sigma}^{n_2 \sigma} A e^{-(x-\mu)^2/2\sigma^2}$$ along with its uncertainty, given "known" uncertainties in $A$, $\mu$, and $\sigma$? $\endgroup$ Commented May 16 at 19:18
  • 1
    $\begingroup$ Notes for later: $$ Q = \int_{n_1 \sigma}^{n_2 \sigma} A e^{-(x-\mu)^2/\sigma^2} = \frac{A\sigma\sqrt{\pi}}{2} \left[ \mathrm{erf} \left(\frac{\mu}{\sigma} - n_1\right) - \mathrm{erf} \left(\frac{\mu}{\sigma} - n_2\right)\right] $$ $$ \frac{\partial Q}{\partial A} = \frac{Q}{A} $$ $$ \frac{\partial Q}{\partial \mu} = A \left( e^{-(n_1 -\mu / \sigma)^2} - e^{-(n_2 -\mu / \sigma)^2} \right) $$ $$ \frac{\partial Q}{\partial \sigma} = - \frac{A \mu}{\sigma} \left( e^{-(n_1 -\mu / \sigma)^2} - e^{-(n_2 -\mu / \sigma)^2} \right) + \frac{Q}{\sigma} $$ $\endgroup$ Commented May 16 at 20:19
  • $\begingroup$ This is exactly what I was looking for! Thank you. $\endgroup$ Commented May 20 at 19:27

1 Answer 1

0
$\begingroup$

This may not be exactly what you are looking for (which I'm guessing is an analytical formula that you plug your parameter uncertainties into to get the uncertainty of the integral), but this should do just fine. Just remember the cardinal rule, which is to report how you calculated the uncertainty so others may judge for themselves.

You have three parameters, each with an upper range and a lower range (i.e. mean $\pm$ uncertainty). That gives 8 combinations of values. Perform your integral for each combination. The overall uncertainty can then be taken as the range from the highest value to the lowest value of the eight integrals.

This is independent of the functional form (Gaussian), but analysis of the function may allow you to rule out certain combinations if the integral is computationally expensive.

$\endgroup$
4
  • $\begingroup$ Thank you! This is actually a separate thing in my field called systematics. I will do this in addition for sure, but I do need some sort of numeric/statistical error as well unfortunately. $\endgroup$ Commented May 16 at 20:47
  • $\begingroup$ @Suze one thing that may have been lost in my answer is that this is a numerical calculation of uncertainty. Moreover, it doesn't rely on linearization of the formulas, as implied by one of the above comments (i.e. assumption that the individual errors are small and uncorrelated). $\endgroup$ Commented May 19 at 18:27
  • $\begingroup$ If the fitting uncertainty is all statistical (that is, it's not a systematic uncertainty, called "Type B" by metrologists) then the best thing would be to repeat the entire experiment/analysis many times and perform a statistical analysis on the many-times-extracted data value. $\endgroup$ Commented May 19 at 18:30
  • $\begingroup$ But if your data is not particularly noisy, then Type B systematic uncertainty may in fact be your dominating contribution, and you'll need to consider it if an accurate uncertainty analysis is important to you. For this, you use your experimental intuition to think of all the potential ways your data could be wrong (e.g. calibration accuracies of instruments, alignment errors, environmental factors, etc.), quantify the errors introduced by all those, and then sum them in quadrature with your statistical uncertainty. $\endgroup$ Commented May 19 at 18:34

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.