Finally, we compare to the Bayesian model. First, the posterior plot of \(N\) for the Bayesian model with uniform \(f(p),f(q)\): This tail of this plot is similar in shape to that produced using the distribution \(f(N|A,B)\), however we do not see the same mode around 300 which was observed in the distribution.
Next, we have the case where \(f(q)\) is peaked with point mass towards 1:
The mass here is contained in a narrow range, as it is in the distribution of \(f(N|A,B)\). To better compare, we replot with restricted range of the x-axis of the \(f(N|A,B)\) plot:
peakedq1_plot_restrict()
This is quite in line with the Bayes output.
Now, the case where \(f(q)\) is peaked with point mass towards 0: Again, this plot minimics the distribution plot of \(f(N|A,B)\), with almost the entire mass above \(N=650\).
And finally, we have the middle case where \(q \sim Beta(15,15)\):
There is an interesting discrepancy here between the above plot and that of \(f(N|A,B)\), for \(q \sim Beta(15,15)\). While the mode occurs at the same place on each graph, there looks to be a (much smaller) peak in density around \(N=500\) for the Bayesian model. To better compare, we replot with restricted range of the x-axis of the \(f(N|A,B)\) plot:
middlecase_plot_restrict()
We can see this ‘blip’ is not echoed by the distribution plot, even when zoomed in.
To see if this is just a convergence issue, we run the MCMC for longer, changing engine.nScans
to 20000 as opposed to 10000. This does indeed look less ‘blippy’ (technical term):
We do observe very close correspondence between the Bayes output and the distrbution for the middle case, though a double peak appears in the above plot, which is not a feature of the distribution. We try again to run the simulation for longer (30000 scans):
Though not completely absent, this signal does decrease with increase MCMC run time.