= Responsibility curve for a two-Gaussian mixture
{title2=$r_2(x)=\frac{2e^{4x}}{1+2e^{4x}}$}
For fixed <statistical parameters> $\theta$ and $f(x)>0$, <Bayes' theorem> gives the <mixture responsibility>
$$
r_j(x;\theta)=\mathbb P_\theta(Z=j\mid X=x)=\frac{\pi_jf_j(x)}{f(x)}=\mathbb E_\theta[I_j\mid X=x].
$$
It is the <conditional expectation> of the <mixture allocation indicator>. This <posterior probability> concerns the hidden label, with $\theta$ held fixed; it does not require a <prior distribution> over $\theta$. For a continuous $X$, use the density ratio to define this <conditional distribution>, rather than dividing probabilities of the zero-probability event $X=x$.<Stan User's Guide by Stan Development Team/Finite Mixtures>[Finite Mixtures, section Recovering posterior mixture proportions: Bayes formula for label probabilities conditional on the observation, component parameters, and mixing weights]{ref}
For the <Two-Gaussian mixture example>, the component density ratio is $\phi(x-2)/\phi(x+2)=e^{4x}$, so the <posterior probability> ratio and the <mixture responsibilities> are
$$
\frac{r_2(x)}{r_1(x)}=2e^{4x},\qquad r_2(x)=\frac{2e^{4x}}{1+2e^{4x}},\qquad r_1(x)=\frac{1}{1+2e^{4x}}.
$$
At $x=0$ the two unweighted component densities are equal, so the <mixture responsibilities> equal the <mixture weights>: $r_1(0)=1/3$, $r_2(0)=2/3$. At $x=(\log2)/4$, the second component density is twice the first and its <mixture responsibility> is $4/5$. Equal <mixture responsibilities> instead occur at $x_*=-(\log2)/4\approx-0.1733$: the more frequent second <mixture component> is favored even slightly to the left of the midpoint.
\Image[/two-gaussian-mixture-posterior-responsibilities.png]
{title=Posterior responsibilities change with x while the stipulated mixture weights stay fixed}
{description=Original analytic responsibilities for the same two-Gaussian mixture, with prior label probabilities shown as dotted horizontal lines. Both responsibilities remain strictly between zero and one at every finite x; the vertical marker denotes equal posterior probabilities, not disjoint component supports.}
The <mixture weights> describe membership before learning $x$; <mixture responsibilities> describe membership after learning $x$. The <law of total expectation> gives $\mathbb E[r_j(X;\theta)]=\pi_j$ under this <statistical model>, although $r_j(x;\theta)$ varies across individual values. In fitting by the <expectation-maximization algorithm>, evaluate <mixture responsibilities> at the current <statistical parameters> and recompute them after an update.
Back to article page