TITLE: Calculation of the Covariance of Gaussian Mixtures
QUESTION [21 upvotes]: I have a Gaussian mixture model, given by:
$$
X \sim \sum_{i = 1}^M \alpha_i N_p(\mu_i, C_i)
$$
such that $\sum_{i=1}^M\alpha_i =1 $.
Is there a way I can compute the overall covariance matrix if $x$? I would like to say "$X$ has a covariance matrix given by $C$".

REPLY [5 votes]: Motivated by the answer provided by Michael Hardy, a formal solution to such question might be formulated as follows:
By introducing a new hidden variable $I$ to represent the identity of the local model, the probability of the Gaussian mixtures can be decomposed as:
$$p(x|I=i)=\mathcal{N}(\mu_i,C_i)$$
$$p(I=i)=\alpha_i$$
Therefore,
$$E(x)=E[E(x|I=i)]=\sum_{i=1}^{M} \alpha_i \mu_i$$
\begin{align}
Var(x)&=E[Var(x|I=i)]+Var[E(x|I=i)] \\ &=\sum_{i=1}^{M} \alpha_i C_i + \sum_{i=1}^{M} \alpha_i (\mu_i-\bar{\mu})(\mu_i-\bar{\mu})^T
\end{align}
where $\bar{\mu}=E(x)$. Moreover, the Law of total expectation and Law of total variance have been used in above two equations.