= bernoulli_rng(theta);
  // estimate theta_rep from new sample
  theta_rep = sum(y_sim) * 1.0 / N;
}</code></pre>
<p>Now the output is slightly more interpretable: <code>theta_cp</code> is the same as the <code>theta</code>
used to generate the values <code>y_sim[1]</code> through <code>y_sim[1]</code>.
Comparing columns <code>theta_cp</code> and <code>theta_rep</code> allows us to see how the
uncertainty in our estimate of <code>theta</code> is carried forward
into our predictions:</p>
<pre><code>theta_cp