Latent Variables and Density e.g. in Gaussian Mixture Model

104 Views Asked by At

Suppose we have a gaussian mixture $$ p(x) = \sum_k \pi_k \mathcal{N}(x; \mu_k, \Sigma_k) $$ and we want to do inference on it. A common way is to introduce a categorical latent variable $z$ with $p(z_k =1) = \pi_k$. Then one writes $$ p(x|z) = \prod_{k=1}^K \mathcal{N}(x; \mu_k, \Sigma_k)^{z_k}$$ and $$ p(x,z) = p(x|z)p(z). $$

I don't quite understand this last part. As I understand it $p(x)$ and $p(x|z)$ are probability densities (with respect to the lebesgue measure). But $p(z)$ is a probability measure, which doesn't even allow a lebesgue density. So how is the product between them to be understood?

1

There are 1 best solutions below

8
On

Your specification of the conditional distribution $p(x|z)$ is slightly incorrect. It should read:

$$ p(x|z) = \prod_{k=1}^K \mathcal{N}(x; \mu_k, \Sigma_k)^{I(z = k)}$$

so then you can see that,

$$ p(x) = \sum_k p(x,z) = \sum_k p(x|z)p(z) = \sum_k P(Z=k) \prod_{k'} \mathcal{N}(x; \mu_{k'}, \Sigma_{k'})^{I(z = k)} = \sum_k \pi_k \mathcal{N}(x; \mu_k, \Sigma_k).$$