average and standard deviation of multiple numbers with average and standard deviation

265 Views Asked by At

This is probably a really simple question, but how would you calculate the average (and standard deviation) of multiple numbers given the mean and standard deviation? For example, let's say I have [.57 +/- 0.05, .48 +/- 0.03]. Do I just average the mean values to get the mean and then also average the standard deviation to get the standard deviation? So, I would get: .525 +/- 0.04?

1

There are 1 best solutions below

0
On BEST ANSWER

In your question, you've reported two confidence intervals. I assume each interval was generated using a central limit argument (see this example). Assuming you know the confidence level (e.g., 95%), it's straightforward to transform from the confidence interval back to a mean and standard deviation pair. As such, my answer below is in terms of mean and standard deviation, not confidence intervals.


Let $F$ be a distribution. Suppose you sample this distribution $N$ times to obtain IID $X_{1},\ldots,X_{N}\sim F$. You use the sample mean $$ \hat{\mu}_{X}\equiv\frac{X_{1}+\cdots+X_{N}}{N} $$ as an estimate of mean and the sample variance $$ \hat{\sigma}_{X}^{2}\equiv\frac{X_{1}^{2}+\cdots+X_{N}^{2}}{N}-\hat{\mu}_{X}^{2} $$ as an estimate for the variance.

Next, you sample the distribution another $M$ (independent) times to obtain IID $Y_{1},\ldots,Y_{M}\sim F$. You can, as above, define $\hat{\mu}_{Y}$ and $\hat{\sigma}_{Y}^{2}$ as the sample mean and variance obtained from this new set of samples. You are interested in combining these estimates.

Let $\hat{\mu}$ and $\hat{\sigma}^{2}$ be the sample mean and variance of the all the samples you've seen thus far. Then, $$ \hat{\mu} =\frac{X_{1}+\cdots+X_{N}+Y_{1}+\cdots+Y_{M}}{N+M} =\frac{N\hat{\mu}_{X}+M\hat{\mu}_{Y}}{N+M} $$ and $$ \hat{\sigma}^{2} =\frac{X_{1}^{2}+\cdots+X_{N}^{2}+Y_{1}^{2}+\cdots+Y_{N}^{2}}{N}-\hat{\mu}^{2} =\frac{N\hat{\sigma}_{X}^{2}+M\hat{\sigma}_{Y}^{2}}{N+M}. \tag{1} $$

The above formulas simplify when $N=M$: $$ \hat{\mu}=\frac{\hat{\mu}_{X}+\hat{\mu}_{Y}}{2}\text{ and }\hat{\sigma}^{2}=\frac{\hat{\sigma}_{X}^{2}+\hat{\sigma}_{Y}^{2}}{2}. $$ The first coincides with your intuition to "average the mean values". The second, however, requires that you average the variances, which is not the same thing as averaging the standard deviations.


What if we had done our standard deviation estimation using Bessel's correction? Denote by

$$ \overline{\sigma}^2 = \frac{N+M}{N+M-1} \hat{\sigma}^2 $$

Bessel's correction and define $\overline{\sigma}_X^2$ and $\overline{\sigma}_Y^2$ similarly. Plugging (1) into the above and simplifying,

$$ \overline{\sigma}^2 = \frac{\left(N-1\right)\overline{\sigma}_X^2 + \left(M-1\right)\overline{\sigma}_Y^2}{N+M-1}. $$

Note this formula's resemblance to (1).