# Aggregating standard deviations - I'm stuck!

#### Czar

##### New Member
Can anyone help with this stats problem?

I'm working on a problem where I'm aggregating centers of gravity and the inertia tensor for multiple elements – each element has it’s own mean and uncertainty.

What I’ve been doing is using a Monte Carlo method to generate aggregate statistics for various assembly levels and it works quite well, but is incredibly time consuming. When an element is changed, it necessitates rerunning the MonteCarlo for each assembly which includes it.

What I would like to do is implement a mathematical process which will allow me to update the current value for mean & standard deviation (SD) for that element and recalculate the aggregated values.

I’ve set up a spreadsheet to help me and what I have is the results of a MonteCarlo for an aggregated system. I then broke out several sub-components and retrieved their individual mean and SDs. So far I’ve been unsuccessful for the more complex properties. When I try to combine the SDs for the various elements, I can’t always figure out how to combine them to get something close to the total values from the MonteCarlo. Things such as the calculated total weight & SD come out easily since the total weight is just the sum of the elemental weights and the aggregate weight SD is just the RSS of the elemental SDs and my calculations using RSS SD are close enough to the aggregate SD from the MonteCarlo to call it a success. Where I hit a brick wall is trying to figure out the aggregate center of gravity SD – and I haven’t even attempted the inertia tensor yet. The equation for the aggregate CG is the (SUM of each element Weight * element CG) divided by the Total Weight. The mean is relatively easy to calculate, but for the life of me I can not get the SDs to equate. Any ideas???

#### JohnM

##### TS Contributor
The aggregate standard deviation should be the square root of the sum of all elemental variances (SD squared).

SD_a = SQRT(var_e1 + var_e2 + ..... + var_en)

#### Czar

##### New Member
Thanks for the reply! This RSS method works well for getting the aggregate SD for weight since the total weight is just the sum of the elemental weights. RSSing the standard deviations for the attributes whose nominal values are not summed to get a system level value gives a larger value for the aggregate SD than I get from the Monte Carlo by at least an order of magnitude. I could use this as a worse case boundry, but I fear it may be overly conservative. If it's mathematically possible I'd like to arrive at aggregated values for SD that are in the same ballpark as the top level Monte Carlo. For instance, currently, the difference between the Calculated aggregate and the Top-Level Monte Carlo is less than 2%.

Should I try solving this using variances rather than SDs? (I know its a matter of squares and more or less a preference issue but would it be easier to solve this thinking in variance?)