IANAS. How can I average two standard deviation values?
Long story short: I have sampled periods for which I have a mean and a standard deviation. Some of the periods are short, so I'd like to combine adjacent periods to improve the stats. The problem is, the means from the periods may not match up at all, while the sigmas should match very well. (These are objects that can move around, so their absolute position can change by a large amount but their distribution around a given position is fairly constant.)
My gut (and my genius [seriously] boss) both say that practically speaking I can just average the two sigmas and get a reasonable value. Actually, I'd probably want to weight it so the current sigma is favored. But just hard-coding a weighting wouldn't distinguish between these two cases:
Case 1: The current period has 3 samples and the previous one has 100
Case 2: The current period has 40 samples and the previous one has 60.
In the first case, I'd like the previous period to weigh more since the current period is useless. In the second case, I'd like the current period to weigh more since it is pretty good and much more recent.
So my next thought was to weight the individual measurements, say by using the first one once, the second one twice, the third 3 times, or whatever. (I guess the "sigma" would be calculated by using the difference from period's mean that each sample came from....) However, I'm pretty far out on a limb here, since I have no statistical training whatsoever. How can I do this simply and without causing an aneurysm in any future employees that have a math degree?
More information:
- While I do have access to the original measurement values, I'd prefer a solution that just let me use the sigma itself (possibly coupled with a count of the number of samples it is comprised of) in a simpler expression.
- I have a plan to totally revamp the sampling period problem, but that has to wait until the next version of the software. This version has to do the mean/sigma thing.
The "pooled" standard deviation is
sp = Sqrt( ( (n1-1)s12 + (n2-1)s22 ) / (n1+n2-2) )
This will weight them appropriately.
posted by Wolfdog at 7:22 AM on April 18, 2007