0
$\begingroup$

Pretty basic question I'm sure:

I have a 100 histograms, they are all created from randomly sampling the same data 100 times.

Now, I want to show the 'average histogram' with markers at +1 standard deviation.

I know how to compute the average - just add bin-wise and divide by the number of histograms.

But for the standard deviation: do I use all the bin-heights from all 100 histograms to calculate the standard deviation, or do I use the bin-heights from my 'average histogram' to calculate it?

thanks.

$\endgroup$
0
$\begingroup$

The (sample) standard deviation is defined as $\hat{\sigma} =\sqrt{\overline{x^2}-\overline{x}^2}$. Normally you would calculate the average and standard deviation for each bin. For each bin, $\overline{x}$ is the value in that bin in the average histogram, while $\overline{x^2}$ is the average of the squares of the values in that bin over all the histograms.

$\endgroup$
  • $\begingroup$ Please double-check your definition of $\sigma$. $\endgroup$ – cardinal Aug 20 '11 at 23:50
  • $\begingroup$ I have taken the liberty of correcting a couple of typos in this answer which might have been confusing. $\endgroup$ – cardinal Aug 22 '11 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.