ine">\(z_n \in 1:K\)</span> is often of interest as <span class="math inline">\(p(z_n = k \mid y, \mu, \sigma)\)</span> is the
posterior probability that that observation <span class="math inline">\(y_n\)</span> was generated by
mixture component <span class="math inline">\(k\)</span>. The posterior can be computed via Bayes’s rule,
<span class="math display">\[
\begin{array}{rcl}
\mbox{Pr}(z_n = k \mid y_n, \mu, \sigma, \lambda)
&amp; \propto &amp;
p(y_n \mid z_n = k, \mu, \sigma) p(z_n = k \mid \lambda)