The extended model is shown in Fig. ,
in which we have redefined the symbols, keeping and associated to the observed counts and then calling and those `produced' by the Poissonians. Each is then binomially distributed with parameters and . In summary, listing the `causal relations' from bottom to top, we haveBinom | (124) |
What is still missing in the model of Fig. is background. In fact, we do not only lose events because of inefficiencies, but the `experimentally defined class' can get contributions from other `physical class(es)' (in general there are several physical classes contributing as background). Figure shows the extension
of the previous model, in which each Poisson process which describes the signal has just one background Poisson process. All variables have subscripts or , depending if their are associated to signal or background (with exception of and , which are obviously the two signal rates). As before, the nodes needed to infer the efficiencies are not shown in the diagram, which is therefore missing eight `bubbles'.At this point it is clear that trying to achieve closed formulae is out of hope, and we need to use other methods to perform the integrals of interest, namely those based on Markov Chain Monte Carlo. We show here how to use a powerful package that does the work for us. But we do it only for the two cases of which we already have closed solutions in hand, that is the models of Figs. and starting from uniform priors for the `top nodes'. The program we are going to use is JAGS [36] interfaced to R via the package jrags [37].
Introducing MCMC and related algorithms goes well beyond the purpose of this paper and we recommend Ref. [38] (some examples of application, including R scripts, are also provided in Ref. [1]). Moreover, mentioning the Gibbs Sampler algorithm applied to probabilistic inference (and forecasting) it is impossible not to refer to the BUGS project [39], whose acronym stands for Bayesian inference using Gibbs Sampler, that has been a kind of revolution in Bayesian analysis, decades ago limited to simple cases because of computational problems (see also Sec. 1 of Ref.[36]). In the BUGS project web site [40] it is possible to find packages with excellent Graphical User Interface, tutorials and many examples [41].