I have some data from a counting-based spectroscopy experiment. Each data point is an (Energy, Rate) pair.
I'd like to fit the dataset to a Gaussian curve (signal) plus a slope (background):
$$ I(E) = A e^{-\frac{1}{2}\frac{(E-E_0)^2}{\sigma^2}} + m(E-E_0) + b $$
The fit parameters are $A, E_0, m, b$. I'd like to deduce the rate and associated uncertainty of signal events.
I use Mathematica to perform the fit. I use the inverse-variance of each data point as that point's weight. I get fit parameters and associated uncertainties from the fit
$$ A = 0.58 \pm 0.05 $$ $$ E_0 = 1212.70 \pm 0.17 $$ $$ \sigma = 2.24 \pm 0.15 $$ $$ m = -0.0013 \pm 0.0007 $$ $$ b = 0.101 \pm 0.008 $$
The uncertainty in the fit parameters are the square root of the diagonal elements of covariance matrix.
Now, the area of the signal peak is $Area = A\sigma\sqrt{2\pi}$, and the rate of signal events is $R = \frac{Area}{W}$, where $W$ is the uniform energy bin width. For the data shown here ($W = 0.399$), this produces $R = 8.103 Hz$.
But what is the uncertainty of this rate? I could use simple propagation of errors and I get
$$ \Delta_R = R\sqrt{(\frac{\Delta_A}{A})^2+(\frac{\Delta_s}{s})^2} = 0.848 Hz $$
But this doesn't take into account the uncertainty in the background! How do I account for the uncertainty in the background when calculating the area of the Gaussian peak? Or do the variances of the fit parameters for the area - namely $(\Delta_A)^2$ and $(\Delta_s)^2$ - already contain contributions owing to the uncertainties in the background parameters?
Many thanks!