Dear all,

I have a problem that has been driving me nuts. I have searched everywhere
but could not find a comprehensive answer. I only get (sometimes
contradictory) bits of information.

I have a series of measurements with associated standard deviations, e.g:

means +/- sd
10 +/- 0.2
13 +/- 0.4
09 +/- 0.3

The number of observations used to estimate any of these means was the same.
Let's say that each one resulted from 10 measurements.

Also, I have another vector of weights. So, the first value should weight
0.2, the second 0.1 and the third 0.7. The sum of weights is 1.

weights
0.2
0.1
0.7

The weighted mean is easy:

(10*0.2) + (13*0.1) + (9*0.7) = 9.6

Now, for the weighted addition of SDs, I have no idea how to do it.

I've found functions such as wtd.var() from the package Hmisc for
calculating variances from values with different weights, but it does not
sum variances, it just calculates the overall variance of a set of
measurements with different weights.

 I also found combinevar() from the package fishmethods that can be used to
add variances, but this one does not allow to associate a weight to those
variances.

So, I do not know how to do both things at the same time.

Any idea? Any package? Or any suggestion so I can make my own function?

Thank you very much

Fernando Lima

	[[alternative HTML version deleted]]

