Monte Carlo estimates of $f(n_P)$ and $f(f_P)$

Analyzing the graphical model in the right hand side of Fig. [*], the steps we have to go through become self-evident:
  1. generate a value of $n_I$ according to a binomial distribution, then calculate $n_{NI}$;
  2. generate a value of $\pi_1$ and of $\pi_2$ according to Beta distributions;
  3. generate a value of $n_{P_I}$ and a value of $n_{P_{NI}}$ according to binomial distributions;
  4. sum up $n_{P_I}$ and $n_{P_{NI}}$ in order to get $n_P$.



Subsections