parameters {
  real y;
}
model {
  target += log_sum_exp(log(0.3) + normal_lpdf(y | -1, 2),
                        log(0.7) + normal_lpdf(y | 3, 1));
}</code></pre>
<p>The log probability term is derived by taking</p>
<p><span class="math display">\[
\log p(y | \lambda,\mu,\sigma)  = \log\!\left( 0.3 * \mathsf{normal}(y|-1,2) \, + \,
  0.7 *
  \mathsf{normal}(y|3,1) \, \right)
\\
 = \log(
                 \exp(\log(0.3 * \mathsf{normal}(y|-1,2))) 
                 + \exp(\log(0.7 * \mathsf{normal}(y|3,1)))