= Solution
There is a notation problem here. The <posterior predictive probability> $p_0$ calculated above is already a fixed number conditional on $a,b,n,T$. Literally,
$$
\boxed{\mathbb P(p_0<1/2\mid\mathcal D)=\mathbf1\!\left\{(B/(B+1))^A<1/2\right\}.}
$$
No simulation is needed for that interpretation. The known exposure $T$ is also necessary, despite its omission from this part's list of inputs.
The natural uncertain quantity is instead $q(\lambda)=\mathbb P(M=0\mid\lambda)=e^{-\lambda}$. For its <posterior probability> of being below one half, draw the rate from its <gamma distribution> <Bayesian posterior> and average an indicator. Rough <BUGS> code is
``
model {
lambda ~ dgamma(a+n, b+T)
q <- exp(-lambda)
belowHalf <- step(lambda-log(2))
}
``
The monitored average of `belowHalf` estimates \b[$\mathbb P(\lambda>\log2\mid\mathcal D)$], equivalently $1-F_{\operatorname{Gamma}(A,B)}(\log2)$. The equality boundary has zero probability. This code samples the already updated <Bayesian posterior>; adding the count <likelihood function> again would count the data twice.
Back to article page