count = 7 outline basic parameters p = 0.3000 0.0500 0.1000 simulating fails per month sampling from the prior distribution samping from the posterior using importance sampling computing weights s = 1.6911e-14 sort and display results true -- lower - expected - upper for lambda1 ans = 0.3000 0.0385 0.2680 0.4004 true -- lower - expected - upper for lambda2 ans = 0.0500 0.0434 0.1277 0.2735 true -- lower - expected - upper for alpha ans = 0.1000 0.2033 5.1884 14.1712 posterior predictive p = 0.3000 0.0500 0.1000 #failed in month I+1, #predicted, 2*SD ans = 702.0000 517.4653 43.3308 cross validation i = 3 sampling from prior (again) compute the weights for these prior samples computing weights s = 6.2274e-09 cross val values x_post_sim_cross = 0.1143 0.2591 2.5483 obs(c) - expected value 2*SD ans = 494.0000 449.5860 37.3261 i = 4 sampling from prior (again) compute the weights for these prior samples computing weights s = 2.4661e-09 cross val values x_post_sim_cross = 0.1232 0.2285 0.7527 obs(c) - expected value 2*SD ans = 562.0000 559.5893 42.5247 i = 5 sampling from prior (again) compute the weights for these prior samples computing weights s = 1.8310e-08 cross val values x_post_sim_cross = 0.2936 0.0868 0.1777 obs(c) - expected value 2*SD ans = 700.0000 664.1273 46.6821 i = 6 sampling from prior (again) compute the weights for these prior samples computing weights s = 3.3480e-12 cross val values x_post_sim_cross = 0.1149 0.2176 0.6146 obs(c) - expected value 2*SD ans = 701.0000 684.0671 48.1809 >>