 an event probability</p>
<p><span class="math display">\[
\mbox{Pr}[z_i = z_j \, | \, y]
=
\int_{\theta}
\frac{\sum_{k=0}^1 p(z_i=k, z_j = k, y_i, y_j \, | \, \theta)}
     {\sum_{k=0}^1 \sum_{m=0}^1 p(z_i = k, z_j = m, y_i, y_j \, | \,
       \theta)}
\
p(\theta \, | \, y)
\
\mbox{d}\theta.
\]</span></p>
<p>As with other event probabilities, this can be calculated in the
generated quantities block either by sampling <span class="math inline">\(z_i\)</span> and <span class="math inline">\(z_j\)</span> and
