Adding also the uncertainty about $p$

Now that we have learned the game, we can use it to include also the uncertainty concerning $p$. At a given stage of the pandemic we could have good reasons to guess a proportion of infected around 10%, as we have been done till now, with a sizable uncertainty, for example 5% (i.e. $p=0.10\pm 0.05$). We model, also in this case, $f(p)$ with a Beta distribution, getting $r=3.5$ and $s=31.5$. Equation ([*]) becomes then
$\displaystyle P($Inf$\displaystyle \,\vert\,$Pos$\displaystyle )\!$ $\displaystyle =$ $\displaystyle \int_0^1\!\!\int_0^1\!\!\int_0^1\!P($Inf$\displaystyle \,\vert\,$Pos$\displaystyle ,\pi_1,\pi_2,p)\cdot
f(\pi_1,\pi_2,p)\,$d$\displaystyle \pi_1$d$\displaystyle \pi_2$d$\displaystyle p$ (41)
       
$\displaystyle $ $\displaystyle =$ $\displaystyle \int_0^1\!\!\int_0^1\!\!\int_0^1\!P($Inf$\displaystyle \,\vert\,$Pos$\displaystyle ,\pi_1,\pi_2,p)\cdot
f(\pi_1)\cdot f(\pi_2)\cdot f(p)\,$d$\displaystyle \pi_1$d$\displaystyle \pi_2$d$\displaystyle p\,,
\ \ \ \ \ % \\
$ (42)

in which we have made explicit that the joint pdf factorizes, considering $\pi_1$, $\pi_2$ and $p$ independent.25With a minor modification to the script provided in Appendix B.126we get $P($Inf$\,\vert\,$Pos$) = 0.4626$ and $P($NoInf$\,\vert\,$Neg$) = 0.9972$, reported again with an exaggerated number of digits. We only note a small effect in $P($Inf$\,\vert\,$Pos$)$. As a further exercise, let also take into account $p=0.20\pm 0.10$, modeled by a Beta$(r\!=\!3,s\!=\!12)$. In this case the Monte Carlo integration yields $P($Inf$\,\vert\,$Pos$) = 0.641$ and $P($NoInf$\,\vert\,$Neg$) = 0.993$, to be compared with 0.682 and 0.994 of Tab. [*].27