> d <- rpois(30,2.8) > do.it(d,100) The data points: 5 4 3 3 3 2 2 1 1 1 8 3 2 3 0 4 1 3 3 4 3 4 1 5 1 4 2 5 4 2 Number of points: 30 Sum of points: 87 Mean of points: 2.9 Probability of a zero using mean for lambda: 0.05502322 Normalizing constant for posterior: 0.4661999 Posterior mean for lambda: 2.729338 Predictive probability of a zero: 0.06649854 > do.it(d,1000) The data points: 5 4 3 3 3 2 2 1 1 1 8 3 2 3 0 4 1 3 3 4 3 4 1 5 1 4 2 5 4 2 Number of points: 30 Sum of points: 87 Mean of points: 2.9 Probability of a zero using mean for lambda: 0.05502322 Normalizing constant for posterior: 0.4661645 Posterior mean for lambda: 2.729393 Predictive probability of a zero: 0.06649603 > d <- rpois(30,1.3) > do.it(d,100) The data points: 1 2 0 0 1 1 3 2 0 1 2 2 3 1 0 4 3 3 1 2 2 0 0 4 1 0 1 1 1 1 Number of points: 30 Sum of points: 43 Mean of points: 1.433333 Probability of a zero using mean for lambda: 0.2385126 Normalizing constant for posterior: 0.5489648 Posterior mean for lambda: 1.466667 Predictive probability of a zero: 0.2362766