Weighted Prior as an application of IS in BP simulation
In this section, we show how IS plays a role in BP simulation. As Bayes rule, posterior distribution is proportional to the likelihood of observed data and prior distribution of parameter (Supplementary Formula-3). It emphasizes that likelihood can play the role of importance function for priors or for a prior. Using this approach, the expectation of a posterior distribution function can be calculated. In addition, to paint a clearer picture of the posterior density and its properties- such as percentiles-it suffices to generate weighted samples from the prior.
This follows a straightforward algorithm: 1) Generate a random sample from a prior distribution. 2) Consider the values of the likelihood of the data in this generated sample as the weight and continue this process, 3) Normalize the weights. Consequently, each point has its own probability of occurrence by the likelihood of data. This naïve sampling method which we referred to as Weighted Prior (WP) is equivalent to IS. As such IS method provides an alternative way to exact simulation from posterior (Supplementary Formula-4). It is worth mentioning that, bias estimated through this approach is of an order of\(\frac{\mathbf{1}}{\mathbf{n}}\) so in large samples it provides unbiased estimates. It should be considered that, the contribution of generated samples to the estimation of the final posterior depends on how much it is supported by data. This means that, prior distributions should not be that much far off from the likelihood if so, most generated points receive very small importance weights. We depicted a case when this method fails (Figure 2).