Effective sample size of importance sampling (source code)

= Effective sample size of importance sampling
{title2=$K_{\mathrm{eff}}$}

For normalized importance weights $w_i$, the standard effective sample size is $K_{\mathrm{eff}}=1/\sum_iw_i^2$.