# How to find the covariance of a Bernoulli Mixture distribution?

I am reading the Pattern Recognition and Machine Learning book and on page 445, it states that the covariance of the Bernoulli mixture distribution is $$Cov(\mathbf{x}) = \sum^K_{k=1} \pi_k (\Sigma_k + \mathbf{\mu}_k \mathbf{\mu}^T_k) - E(\mathbf{x})E(\mathbf{x})^T$$

Can someone show me mathematically how is this derived ?

I have attached the source of the context below.

• Is it true that $P(\bf{\mu} = \bf{\mu}_k) = \pi_k$? What is $\Sigma_k$? Is it var($u_k$)? The expression for cov(x) makes perfect sense to me if it is without $\Sigma_k$. – Ye Tian Apr 12 '17 at 19:06