Inferring $p$ from the observed number of positives in the sample

Let us finally move to the probabilistic inference of the proportion of infected individuals, $p$, based on the number of positives $n_P$ in a sample of size $n_s$ and given our best knowledge of the performance of the test, all summarized in the graphical model of Fig. [*],
Figure: Graphical model of Fig. [*], re-drawn in order to emphasize its inferential use and including the commands to build up the JAGS model. `$f_0(p)$', left open in this diagram, stands for the prior distribution of $p$.
\begin{figure}\begin{center}
\epsfig{file=sampling_binom_inf_unc-pi_code.eps,cl...
...th=0.85\linewidth}
\\ \mbox{} \vspace{-0.9cm} \mbox{}
\end{center}
\end{figure}
which differs from that of Fig. [*] only for the symbol `$\surd$ ' moved from node $p$ (now `unobserved') to node $n_P$ (now `observed'). The diagram contains also the probabilistic and deterministic relations among the nodes, written directly using the JAGS language.45

Subsections