An importance weight adjusts a sampled outcome’s contribution when the sampling procedure differs from the quantity being estimated. In importance sampling, draw x from a proposal distribution q rather than the target distribution p, then assign w(x) = p(x)/q(x). Samples relatively more likely under p than q receive more weight. section 2.7
For normalized p and q, the weighted Monte Carlo estimate of Eₚ[f(x)] is (1/N)Σᵢw(xᵢ)f(xᵢ), with xᵢ sampled from q. The ratio changes each proposal sample’s contribution to match the target integral. If p is unnormalized, the same sum estimates an unnormalized integral; a normalized expectation also requires accounting for the missing normalization constant. section 2.7
Self-avoiding random walk
A walk samples uniformly among its currently available neighboring lattice cells. Starting at 1, its weight is multiplied at each step by the number of available neighbors. Trials record that weight alongside squared distance, and the weights are used to compute a weighted mean square distance. A trial stops when no neighbor is available. section 2.4
Figure 2.16 IS components (left) and IS estimate (right)
Plots the target, proposal, and weighted integrand beside the importance-sampling estimate as sample count increases. section 2.7


