Mixture distribution (source code)

= Mixture distribution
{title2=$P=\sum_jw_jP_j$}

A mixture distribution first chooses a component $j$ with nonnegative <mixture weights> $w_j$ summing to one, then samples from its law $P_j$. Consequently $P(A)=\sum_jw_jP_j(A)$, and any finite <moment-generating function> is the same weighted sum of the component transforms. A component may be a <Dirac measure>, so a mixture may have both discrete and continuous parts.