# How to 'sum' a standard deviation?

I have a monthly average for a value and a standard deviation corresponding to that average. I am now computing the annual average as the sum of monthly averages, how can I represent the standard deviation for the summed average ?

For example considering output from a wind farm:

Month        MWh     StdDev
January      927     333
February     1234    250
March        1032    301
April        876     204
May          865     165
June         750     263
July         780     280
August       690     98
September    730     76
October      821     240
November     803     178
December     850     250


We can say that in the average year the wind farm produces 10,358 MWh, but what is the standard deviation corresponding to this figure ?

• A discussion following a now-deleted reply noted a possible ambiguity in this question: do you seek the SD of the monthly averages or do you want to recover the SD of all the original values from which those averages were constructed? That reply also correctly pointed out that if you want the latter, you will need the numbers of values involved in each one of the monthly averages. – whuber Apr 4 '12 at 17:37
• A comment to another deleted reply pointed out that it is strange to compute an average as a sum: surely you mean that you are averaging the monthly averages. But if what you want is to estimate the average of all the original data, then such a procedure is not usually a good one: a weighted average is needed. And of course it's not possible to give a good answer to your question about the "SD for the summed average" until it is clear what the "summed average" is and what it is intended to represent. Please clarify that for us. – whuber Apr 4 '12 at 21:40
• @whuber I have added an example to clarify. Mathematically I believe that the sum of averages is equal to the monthly average times 12. – klonq Apr 5 '12 at 6:37
• Yes, klonq, that is a very reasonable request. However, these replies were deleted by their owner, not by the community. To preserve their value, I have attempted here to relay (my take on) the key ideas arising in those replies and their comments. BTW, your recent edits are quite helpful: people like to see example data. – whuber Apr 5 '12 at 14:33
• Welcome to the site, @Hayden. This isn't an answer to the OP's question. Please only use the "Your Answer" field to provide answers. If you have a follow-up question, click the [ASK QUESTION] at the top & ask it there, then we can help you properly. Since you are new here, you may want to take our tour, which contains information for new users. – gung May 30 '14 at 4:07

Short answer: You average the variances; then you can take square root to get the average standard deviation.

Example

Month          MWh  StdDev  Variance
==========   =====  ======  ========
January        927    333     110889
February      1234    250      62500
March         1032    301      90601
April          876    204      41616
May            865    165      27225
June           750    263      69169
July           780    280      78400
August         690     98       9604
September      730     76       5776
October        821    240      57600
November       803    178      31684
December       850    250      62500
===========  =====  =======  =======
Total        10358            647564
÷12            863    232      53964


And then the average standard deviation is sqrt(53,964) = 232

If $X$ and $Y$ are independent random variables that are normally distributed (and therefore also jointly so), then their sum is also normally distributed

...the sum of two independent normally distributed random variables is normal, with its mean being the sum of the two means, and its variance being the sum of the two variances

And from Wolfram Alpha's Normal Sum Distribution:

Amazingly, the distribution of a sum of two normally distributed independent variates $X$ and $Y$ with means and variances $(\mu_X,\sigma_X^2)$ and $(\mu_Y,\sigma_Y^2)$, respectively is another normal distribution

$$P_{X+Y}(u) = \frac{1}{\sqrt{2\pi (\sigma_X^2 + \sigma_Y^2)}} e^{-[u-(\mu_X+\mu_Y)]^2/[2(\sigma_X^2 + \sigma_Y^2)]}$$

which has mean

$$\mu_{X+Y} = \mu_X+\mu_Y$$

and variance

$$\sigma_{X+Y}^2 = \sigma_X^2 + \sigma_Y^2$$

• sum: 10,358 MWh
• variance: 647,564
• standard deviation: 804.71 ( sqrt(647564) )

• How to 'sum' a standard deviation?
• You sum them quadratically:

s = sqrt(s1^2 + s2^2 + ... + s12^2)


Conceptually you sum the variances, then take the square root to get the standard deviation.

Because i was curious, i wanted to know the average monthly mean power, and its standard deviation. Through induction, we need 12 normal distributions which:

• sum to a mean of 10,358
• sum to a variance of 647,564

That would be 12 average monthly distributions of:

• mean of 10,358/12 = 863.16
• variance of 647,564/12 = 53,963.6
• standard deviation of sqrt(53963.6) = 232.3

We can check our monthly average distributions by adding them up 12 times, to see that they equal the yearly distribution:

• Mean: 863.16*12 = 10358 = 10,358 (correct)
• Variance: 53963.6*12 = 647564 = 647,564 (correct)

Note: i'll leave it to someone with a knowledge of the esoteric Latex math to convert my formula images, and formula code into stackexchange formatted formulas.

Edit: I moved the short, to the point, answer up top. Because i needed to do this again today, but wanted to double-check that i average the variances.

• This all seems to assume the months are uncorrelated - have you made that assumption explicit anywhere? Also, why do we need to bring in the normal distribution? If we're only talking about variance then that seems unnecessary - for example, see my answer here – Macro Jul 25 '12 at 12:26
• @Marco Because i think better in pictures and it makes everything easier to understand. – Ian Boyd Jul 25 '12 at 19:57
• @Marco Also, i believe this question started on the (now defunct) stats.stackexchange site. A wall of formulas are less accessible than simpler, graphical, less rigorous treatments. – Ian Boyd Jul 26 '12 at 13:45
• I doubt this is correct. Imagine two data sets with each only a single measurement each. Their variance of each set is 0, but the set of both measurements has a variance greater than 0 if the data points differ. – Njol Oct 10 '16 at 15:58
• @Njol, I think that's why we assume all variables have normal distribution. And we can do it here, because we talk about phisical measurement. In your example both variables are not normally distributed. – tworec Apr 26 '17 at 12:56

This is an old question but the answer accepted is not actually correct or complete. The user wants to calculate the standard deviation over 12 month data where the mean and standard deviation is already calculated over each month. Assuming that the number of samples in each month is the same, then it is possible to calculate the sample mean and variance over the year from each month data. For simplicity assume that we have two sets of data:

$X=\{x_1,....x_N\}$

$Y=\{y_1,....,y_N\}$

with known values of sample mean and sample variance, $\mu_x$, $\mu_y$,$\sigma^2_x$,$\sigma^2_y$.

Now we want to calculate the same estimates for

$Z=\{x_1,....,x_N, y_1,...,y_N\}$.

Consider that $\mu_x$,$\sigma^2_x$ are calculated as:

$\mu_x = \frac{\sum^N_{i=1} x_i}{N}$

$\sigma^2_x = \frac{\sum^N_{i=1} x^2_i}{N}-\mu^2_x$

To estimate mean and variance over the total set we need to calculate:

$\mu_z = \frac{\sum^N_{i=1} x_i +\sum^N_{i=1} y_i }{2N}= (\mu_x+\mu_y)/2$ which is given in the accepted answer. For variance however the story is different:

$\sigma^2_z = \frac{\sum^N_{i=1} x^2_i +\sum^N_{i=1} y^2_i }{2N}-\mu^2_z$

$\sigma^2_z = \frac{1 }{2}(\frac{\sum^N_{i=1} x^2_i}{N}-\mu^2_x + \frac{\sum^N_{i=1} y^2_i}{N}-\mu^2_y )+\frac{1 }{2}(\mu^2_x+\mu^2_y) -(\frac{\mu_x+\mu_y}{2})^2$

$\sigma^2_z = \frac{1 }{2}(\sigma^2_x+\sigma^2_y )+(\frac{\mu_x-\mu_y}{2})^2$

So if you have the variance over each subset and you want the variance over the whole set then you can average the variances of each subset if they all have the same mean. Otherwise you need to add the variance of mean of each subset.

Lets say that over the first half of the year we produce exactly 1000 MWh per day and in the seconds half we produce 2000 MWh per day. Then the mean and variance of energy production in first and seconds half are 1000 and 2000 for mean and variance is 0 for both halves. Now there are two different things that we may be interested in:

1-We want to calculate the variance of energy production over the whole year: then by averaging the two variance we arrive at zero, which is not correct since the energy per day over the the whole year is not constant. In this case we need to add the variance of all the means from each subset. Mathematically in this case the random variable of interest is energy production per day. We have sample statistics over subsets and we want to calculate the sample statistics over a longer time.

2-We want to calculate the variance of energy production per year: In other words we are interested in how much energy production changes from one year to another year. In this case averaging the variance leads to the correct answer which is 0, since in each year we are producing exactly 1500 MHW on average. Mathematically in this case the random variable of interest is average of energy production per day where the averaging is done over the whole year.

I believe what you may be really interested in though is the standard error rather than the standard deviation.

The standard error of the mean (SEM) is the standard deviation of the sample-mean's estimate of a population mean, and that will give you a measure how how good your yearly MWh estimate is.

It's very easy to compute: if you used $n$ samples to obtain your monthly MWh averages and standard deviations, you would just compute the standard deviation as @IanBoyd suggested and normalize it by the total size of your sample. That is,
$$s = \frac{\sqrt{s_1^2 + s_2^2 + \ldots + s_{12}^2}}{\sqrt{12 \times n}}$$

I'd like to stress again the incorrectness in part of the accepted answer. The wording of the question lead to confusion.

The question have Average and StdDev of each month, but it's unclear what kind of subset is used. Is it the average of 1 wind turbine of the whole farm or the daily average of the whole farm? If it's the daily average for each month, you can't add up the monthly average to get the annual average because they do not have the same denominator. If it's the unit average, the question should state

We can say that in the average year each turbine in the wind farm produces 10,358 MWh,...