I'm having trouble calculating 95% confidence intervals for a change in binomial proportion. For example, in group $A$, there are $4$ successes out of $n =20$. In group $B$, there are $12$ successes out of $n =20$. I am able to calculate the CIs for the proportions separately in R using:
However, I'm interested in the change in proportion for these two groups, group $A = 0.2$ and group $B = 0.6$ with the change in proportion being $0.4$. What I'm really lost on is how to calculate the CIs for this change ($0.4$)?