For an unnormalized target density, self-normalized importance sampling uses weights wi=f(Yi)/h(Yi) and estimates expectations by ∑iwig(Yi)/∑iwi. Resampling a point Yi with probability proportional to wi produces the associated weighted empirical distribution.