When data are missing at random (MAR), suppose an outcome Y is observed only when R=1, where the observation probability π(X)=P(R=1∣X,Y)=P(R=1∣X)>0 depends only on fully observed covariates X. Why is the unweighted complete-case sample mean biased for E[Y], and how do you prove that the inverse-probability-weighted (IPW) estimator μ^IPW=1n∑i=1nRiYiπ(Xi) is unbiased?

Foundations, Missing data
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can prove unbiasedness of inverse-probability weighting via iterated expectation and recognise its positivity and variance caveats.

Key idea

The complete-case mean estimates E[Y∣R=1], which differs from E[Y] whenever X predicts both R and Y; weighting each observed point by 1/π(Xi) cancels the sampling probability inside E[R∣X,Y]=π(X).

Steps

  1. Show why complete-case analysis is biased: the unweighted average over observed rows converges to E[Y∣R=1]=E[RY]E[R]=E[π(X)Y]E[π(X)]. Whenever π(X) varies with X and Y correlates with X, E[π(X)Y]≠E[π(X)]E[Y], so E[Y∣R=1]≠E[Y].
  2. Prove unbiasedness of μ^IPW by linearity of expectation and the law of total expectation, conditioning first on (Xi,Yi): E[RiYiπ(Xi)]=E ⁣[E ⁣[RiYiπ(Xi)  |  Xi,Yi]]=E ⁣[Yiπ(Xi) E[Ri∣Xi,Yi]].
  3. Substitute the MAR condition E[Ri∣Xi,Yi]=P(Ri=1∣Xi,Yi)=π(Xi): E[RiYiπ(Xi)]=E ⁣[Yiπ(Xi) π(Xi)]=E[Yi]. Averaging over i=1,…,n gives E[μ^IPW]=E[Y].
  4. State the practical limitations: positivity (π(X)>0) is required — if some subgroup is never observed, IPW cannot recover it — and when π(Xi) is very small for some observed rows, 1/π(Xi) blows up the variance of μ^IPW (often motivating stabilised weights or doubly robust estimators).

Common mistakes

How long your answer should be

Half a page; 5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Foundations: A colleague standardises all features using the mean and standard deviation of the entire dataset, selects the 20 features most correlated with the label y, and then runs 5-fold cross-validation to tune and report the accuracy of a classifier. Is the resulting CV accuracy unbiased, how do you fix the pipeline, and how badly can full-dataset feature screening distort pure random noise?
Next in Foundations: Suppose the m fold errors in cross-validation each have variance σ2 and every pair has correlation ρ. Derive the variance of their average. Evaluate it for m=10 and ρ=0.1, 0.5, 0.9 with σ2=1, and explain why this is used to argue that leave-one-out has high variance?