Inverse Probability Weighting and Importance Sampling

Published:

Inverse Probability Weighting (IPW) 是因果推断里解决 randomness is violated 问题的 reweighting 方法;Importance Sampling (IS) 是统计计算里的 reweighting 方法。Philip 老师在课堂上说二者是同一个方法在不同的领域命名;我想在这里记录一下我的理解。

Importance Sampling (IS)

In Monte Carlo simulation, we want to estimate \(\mathbb{E}[\xi]\) based on realizations of another random variable \(\zeta\). Since \(\mathbb{E}[\xi]=\mathbb{E}[\zeta f_\xi(\zeta)/f_\zeta(\zeta)],\) then \(\frac{1}{n}\sum_i\frac{\zeta_i} {f_\zeta(\zeta_i)/f_\xi(\zeta_i)}\) is a reasonable estimator of \(\mathbb{E}[\xi]\).

Inverse Probability Weighting (IPW)

In causal inference we want to estimate \(ATE=\mathbb{E}[Y_i(1)]-\mathbb{E}[Y_i(0)]\) based on observables \(D_iY_i(1), (1-D_i)Y_i(0),X_i\). For simplicity, we will only discuss the estimation of \(\mathbb{E}[Y_i(1)]\) next.

Because of conditional unconfoundedness, \(\mathbb{E}[DY(1)|X]=\mathbb{E}[D|X]\mathbb{E}[Y(1)|X].\) Thus \(\mathbb{E}[Y(1)]=\mathbb{E}_X\mathbb{E}[Y(1)|X]=\mathbb{E}_X\left[\frac{\mathbb{E}[DY(1)|X]}{\mathbb{E}[D|X]}\right]=\mathbb{E}\left[\frac{DY(1)}{\mathbb{E}[D|X]}\right].\) Hence we can construct a reasonable estimator for \(\mathbb{E}[Y_i(1)]\), \(\sum_{i}\frac{D_iY_i(1)}{e(X_i)},\) which is a reweighting of observables \(D_iY_i(1)\).

Relation

Now we try to apply IS to ATE problem. We regard \(\xi\) as \(Y(1)\) and \(\zeta\) as \(DY(1)\). Next step is to find the desity ratio of \(Y(1)\) and \(DY(1)\). However, it is not obvious. Wheras notice the density ratio of \(\mathbb{E}[Y(1)|X]\) and \(\mathbb{E}[DY(1)|X]\) is \(\mathbb{E}[D|X]\). Thus we can apply IS to it, obtaining \(\mathbb{E}[\mathbb{E}[Y(1)|X]]=\mathbb{E}\left[\frac{\mathbb{E}[DY(1)|X]}{\mathbb{E}[D|X]}\right]=\mathbb{E}\left[\frac{DY(1)}{\mathbb{E}[D|X]}\right].\)

Conclusion

The relation of the two methods is that they both reweight samples to compute the expectation of another random variable. However, because of different settings (which quantities are available), the reweighting methods are different and no one is more general than another.