Interval estimation for the difference between proportions

Examples

X∼Bin(n,p1),Y∼Bin(m,p2), assume n,m≥25 to apply Central Limit Theorem

p^1=xn,p^2=ym,p^1−p^2=xn−ymE(p^1−p^2)=E(xn−ym)=np1n−mp2m=p1−p2Var(p^1−p^2)=Var(p^1)+Var(p^2)=Var(xn)+Var(ym)=np1(1−p1)n2+mp2(1−p2)m2=p1(1−p1)n+p2(1−p2)mZ=p^1−p^2−E(p^1−p^2)Va^r(p^1−p^2)=p^1−p^2−(p1−p2)p^1(1−p^1)n+p^2(1−p^2)m∼N(0,1) approxD=p1−p2,P(Dl≤D≤Du)=1−α…CI for D:(p^1−p^2−Z1−α2p^1(1−p^1)n+p^2(1−p^2)m,p^1−p^2+Z1−α2p^1(1−p^1)n+p^2(1−p^2)m)