# Combining variances

I have a set of N bodies. The size of each body is being measured $m_i$ times ($m_i>1$ and different for each body). I would like to describe the resulting measurement. Particularly I'm interested in average body size and in the variance.

The average body size is simple. First calculate the mean sizes for each body and then calculate the mean of means.

The variance is more tricky. There are two variances: the variance of measurement and the variance of sizes. In order to have an idea on the confidence we have in any single measurement, we need to account for both the sources. Can anyone help me with this part?

Thank you

• The size of the i-th body is measured mi times, so that the index i identifies which body it is
• The set of N bodies supposed to be a random sample from a population whose mean and variance I want to estimate
-
Did you mean the size of the $i$th body is measured $m_i$ times, so that the index $i$ identifies which body it is? – Michael Hardy Jul 18 '10 at 23:30
.....oh: You said "different for each body", so I suppose that must by what you meant. – Michael Hardy Jul 18 '10 at 23:30
OK, another clarification: Is this set of $N$ bodies supposed to be a random sample from a population whose mean and variance you want to estimate, or is it the whole population? – Michael Hardy Jul 18 '10 at 23:34
please commit to the statistical analysis question and answer site area51.stackexchange.com/proposals/33/statistical-analysis (mathoverflow is supposed to be for research level questions). – robin girard Jul 19 '10 at 6:20
Michael Hardy, thank you for clarifying questions. I've added my answers – Jonathan Jul 19 '10 at 6:37

(Basic, not research level — tag all such "basic" please):
see Variance: "the variance of the total group is equal to the mean of the variances of the subgroups, plus the variance of the means of the subgroups" — for equal subgroup sizes.
You could cook up the corresponding formula for different subgroup sizes, but why not just take the variance of all m1 + m2 + ... measurements pooled together ? See also the little example in SO how-do-i-measure-variability.

-

This looks like a "random effects model", also called a "variance components model". There's a Wikipedia article that leaves much of the math unexplained:

http://en.wikipedia.org/wiki/Random_effects_model

(Maybe those mathematical explanations are not what you're looking for. Or maybe they are.....)

-

Michael's right that this could be modeled by a random effects model. Actuaries use the terms process risk and parameter risk to describe the variance of the bodies and measurements, respectively.

So assume that body size X is distributed with mean M and variance σ2. This models the process risk of all body sizes. But now assume that M is itself a random variable with mean μ and variance τ2, which models the parameter risk of the measurements. Then the total mean is just μ, but the total variance is τ2 + σ2.

Using conditional probability:

E(X) = E(E(X|M)) = E(M) = μ

var X = E(var(X|M)) + var(E(X|M)) = E(τ2) + var M = τ2 + σ2

In other words, the total empirical variance will be the variance of all your sample means, PLUS the mean of all the sample variances for each body.

-