title: Determine Uncertainty in Peak Value of Spectrum (Standard Error or Parameter Error)
body: <p>I want to extract the position of a peak from a spectrum (energy spectrum of scattered photons). To do so, I am using scipy.optimize.curve_fit to fit a Gaussian to the region of the spectrum that resembles the Gaussian.</p>
  
  <p>How do I find the <strong>uncertainty of the peak value</strong>? The peak value itself will be given by the result for the mean parameter from the Gaussian regression.</p>
  
  <p>There are two things that came to my mind:</p>
  
  <ul>
  <li>I get covariance values from the minimisation routine from which I get the error on the mean parameter.</li>
  <li>Also, I could think about using the sigma of the Gaussian to get to the 
  error of the mean.</li>
  </ul>
  
  <p>My thoughts on this would be, that the error on the mean parameter cannot be the wrong way to go. And I would also wager that the standard error does not really tell us the uncertainty with which we know the peak value. It tells us about the shape of the distribution but not about the uncertainty in the peak value (which, for simplicity, we believe to have a <em>true</em>, sharply defined value.)</p>
  
  <p>(This is a repost of a question I originally posted on stats.stackoverflow where I did not get any answers after 2 days.)</p>