Expected number of positives sampling of a population (assuming exact values of $\pi_1$ and $\pi_2$)

At this point we can convolute the uncertainty on the number of positives in a sample, analyzed in Sec. [*], with the uncertain value of $p_s$ due to sampling:
$\displaystyle f(n_P\,\vert\,n_s,N,p,\pi_1,\pi_2)$ $\displaystyle =$ $\displaystyle \int_0^1
\!\!f(n_P\,\vert\,n_s,p_s,\pi_1,\pi_2)
\!\cdot\! f(p_s\,\vert\,p,n_s,N)\,$   d$\displaystyle p_s\,.$ (68)

We start, as usual, with our exact reference values of test sensitivity and specificity of 97.8% and 88.5% ( $\pi_1=0.978$ and $\pi_2=0.115$), respectively, and perform the integration by Monte Carlo.36
Figure: Probabilistic prediction of the numbers of positives in a sample of 10000 individuals taken from a population of 10000, 100000 and 1000000 individuals (in order, from top to bottom), 10% of which are infected ($p=0.1$), assuming $\pi_1=0.978$ and $\pi_2=0.115$.
\begin{figure}\begin{center}
\centering {\epsfig{file=PredictionPositive_sampli...
...h=0.70\linewidth}}\\
\mbox{}\vspace{-0.9cm}\mbox{}
\end{center}
\end{figure}
Some results are shown in Fig. [*], where, for comparison with what we have seen in the previous sections, a sample size of 10000 individuals is used, taken from a population of 10000 (top histogram), 100000 (middle) and 1000000 (bottom), and assuming $p=0.1$. $[$Note that first case corresponds exactly to the assumed value of $p_s=0.1$ shown in the top plot of Fig. [*], since, being $n_s=N$, the standard uncertainty on $p_s$ vanishes.$]$ Increasing the population size the standard deviation increases, as an effect of $\sigma(p_s)$, although this growth saturates for $N$ a bit higher than $\approx 10\times n_s$, above which the size dependent factor of Eq. ([*]) becomes negligible. In fact, the asymptotic value, given by Eq. ([*]) is in this case $\left.\sigma(p_s)\right\vert _{N\rightarrow\infty} = 0.0030$. For $N/n_s=10$ the standard uncertainty on $p_s$ becomes 0.00285, vanishing for $n_s=N$ (the value of 0.0015, half of the asymptotic one, is reached for $N=4/3\times n_s$).



Subsections