# How do you estimate the error on the height/width of a Gaussian?

I'm trying to fit Gaussians to several lines in a spectrum that I have. Some of them overlap with one another, causing the fitting program that I'm using to not be able to give reasonable estimates for the errors on the measurements. For example, sometimes it will give the width of the spectral line to be 0.5 GHz but give the uncertainty at 1,000 GHz.

To fix this, I've been doing manual estimates on the ones that it can't get. I read that you can estimate the error on the peak of the Gaussian with:

Peak Error = (1/2)*(Width / Signal To Noise Ratio)

but I can't find anything for the height or width. Are there similar ways to estimate the uncertainty on these measurements?

Thank you.

• You might be interested in reading about kernel density estimation, or taking a look at this multi-peak fitting tool. Or just in general google something like "fitting overlapping gaussians".
– pela
Commented Dec 2, 2015 at 5:03
• The formula you quote is for the error on the height of a Gaussian in noise, there are similar formulae for the error on the width. You will probably find them in Radar texts where they are related to the SD for range error. But these are not really what you need, you have close lines and the errors depend on the position of the other lines as well as the signal to noise ratio. If this were my problem (and it is close to mine) and there was nothing in the literature, I would adopt a quasi Monte-Carlo method to form the estimates of positions and heights and the errors in these estimates. Commented Dec 2, 2015 at 5:41
• Of course these uncertainties are highly correlated. Handwaving formulae will not be accurate. Monte Carlo or Bayesian methods are required to simultaneously estimate uncertainties in height and width. Commented Dec 2, 2015 at 8:21

## 1 Answer

If you know the number of overlapping Gauss functions, you may write them as $\sum_{i=1}^n a_ie^{-(\frac{x-\mu_i}{\sigma_i})^2}$, then subtract your time series, with more than $3i$ items, to reduce the risk of an ill-posed problem. Then apply a root mean square (RMS) minimization / least squares method to infer the $3i$ parameters. If your FWHM, or $\sigma$ is known to be the same for all peaks, your number of parameters reduces to $2i+1$.

See also Rietveld refinement as a related approach.