         + normal_lpdf(y[n] | mu[1], sigma[1]),
                        log_half
            + normal_lpdf(y[n] | mu[2], sigma[2]));</code></pre>
<p>then the <span class="math inline">\(\log 0.5\)</span> term isn’t contributing to the proportional
density, and the above can be replaced with the more efficient version</p>
<pre><code>for (n in 1:N)
  target += log_sum_exp(normal_lpdf(y[n] | mu[1], sigma[1]),
                        normal_lpdf(y[n] | mu[2], sigma[2]));</code></pre>
<p>The same result holds 