# Standard Deviation of a mean whose variables have their own uncertainty

So let's say I have some collection of variables $x_i$ each with their own uncertainty $\sigma_i$. (I'm trying to generalize this but if it helps, the $x_i$ themselves are a mean of other variables and $\sigma_i$ are the standard deviations of those means.)

Now I want to take the mean of these $x_i$ and compute the standard deviation on this mean. But I don't know how I should go about including the existing uncertainty in this calculation. My instinct says to just compute the propagated uncertainty of the mean and the standard deviation of the mean separately and then add those in quadrature, but I'm not sure if that's right.

So you want the standard deviation of $\frac{1}{n}\sum_i x_i ?$
I'll presume you intend that the $x_i$ are independent (though it's still doable if they aren't). One can show that for independent (or more generally uncorrelated) $x_i$ that $\operatorname{Var}(\sum_i x_i) = \sum_i \operatorname{Var}(x_i).$ So you have $$\operatorname{Var}\left(\frac{1}{n}\sum_i x_i\right) = \frac{1}{n^2} \operatorname{Var}\left(\sum_i x_i\right) = \frac{1}{n^2}\sum_i\sigma^2_i$$
• The problem with this is that if all $\sigma_i=0$ then the standard deviation is $0$ and thus doesn't incorporate the spread of the $x_i$. – A-P Oct 6 '17 at 18:04
• @A-P I thought $\sigma_i$ was the spread of the $x_i.$ In fact you say exactly that these are the standard deviations of the $x_i$ and that they are the uncertainties in the $x_i.$ Please clarify. – spaceisdarkgreen Oct 6 '17 at 20:34
• @A-P you might want to write down an explicit model of what's going on. Random variables already have uncertainty, so what is this "existing uncertainty." Do you mean that each $x_i$ is a measurement of the same (random) quantity where each measurement has an independent error. So $x_i = x+ \epsilon_i$ where $x$ and the $\epsilon_i$ are independent random variables and the means of the epsilon are zero and the standard deviations are $\sigma_i$? – spaceisdarkgreen Oct 6 '17 at 21:05
• Hopefully this clarifies it, (i'm splitting this up into multiple comments because I exceeded the character limit) I am starting with a collection of $\{y_{i,j}\}_{i\in[1,N],j\in[1,M]}$ Each $x_i=\frac{1}{M}\sum_{j=1}^M y_{i,j}$ (i.e. the mean of the $y$'s). And each $\sigma_i=\sqrt{\frac{1}{M}\sum_{j=1}^M (y_{i,j}-x_i)^2}$. (i.e. the standard deviation on the mean) – A-P Oct 7 '17 at 3:27
• So now I want to find the mean of all $x_i$ with $\bar{x}=\frac{1}{N}\sum_{i=1}^N x_i$. Finally I want to compute the standard deviation, call it $\sigma'$, on this mean. But as far as I know there seem to be two ways of doing this. I could say $\sigma'=\sqrt{\frac{1}{N}\sum_{i=1}^N (x_i-\bar{x})^2}$. This would give the standard deviation of the spread, ignoring the uncertainties associated with $x_i$. Alternatively I could do what you suggested above which is just the result of propogating uncertainties through the function "mean." – A-P Oct 7 '17 at 3:27