# Mean of covariance matrices

I'm trying to generalise a formula that takes the mean of some variances to it work with vectors.

I'm not sure it makes sense to take the variance between a bunch of vectors, rather it is more suited to generate a covariance matrix.

So, is there a way to take the mean of a bunch of covariance matrices?

• Hi, the way the question is written sounds like you might just want to take the arithmetic mean of the matrices (see my answer). However, I have no idea whether this would produce a reasonable generalization of your formula. You might want to add more information, or perhaps post a separate question like 'How to generalise this formula to vectors/multiple dimensions/whatever'. – Juho Kokkala May 20 '14 at 11:46
• Great thanks for your answer, I will post another question. – Tim May 20 '14 at 11:51

If the original covariance matrices are of the same dimension, i.e., you have $n\times n$-matrices $\Sigma_1,\ldots,\Sigma_N$, you could just take the sample mean: $$\bar{\Sigma} = \frac{1}{N}\left(\Sigma_1 +\ldots+\Sigma_N \right),$$ which corresponds to taking elementwise means of the elements of the covariance matrices, i.e., the $i,j$th element will be $$\bar{\Sigma}_{i,j} = \frac{\Sigma_{1(i,j)}+\Sigma_{2(i,j)}+\ldots+\Sigma_{N(i,j)}}{N}.$$
Provided that the original covariance matrices are valid (positive-semidefinite), this will produce a valid covariance matrix, as positive-semidefiniteness is preserved under summing and multiplying by a positive constant ($1/N$).