Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have basic doubt regarding summation over a product.

The starting equation is $\sum_{z}\prod_{k=1}^{K}\pi_k^{z_k}f(x|\mu_k)^{z_k}$ and it is given that $\sum_{k}{z_k}=1$

How does it become $\sum_{k=1}^{K}\pi_kf(x|\mu_k)$

share|cite|improve this question
up vote 0 down vote accepted

You are probably talking about a mixture of Gaussians. Apart from $\sum_k z_k=1$, with an additional constraint that, each $z_k \in {0,1}$ (binary), you will have your result. Note that the two constraints imply that there is only one position out of $K$ in $\boldsymbol{z}=(z_1,\ldots,z_K)$ that is 1, the rest is 0.

To be precise, $\sum_z$ is sum of all possible $\boldsymbol{z}$ (i.e., 1 at each position). There are only $K$ possible $\boldsymbol{z}$, the sum can be written as $\sum_{k=1}^K$. The product over $K$ components, $\prod_{k=1}^K$ actually has only one multiplicand because the other $K-1$ multiplicands are raised to the power of 0.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.