From a survey I have answers towards a yes/no question and the survey-respondents are grouped into multiple groups. I now want to know if the proportion of yes-answers for one group differs from the whole survey sample (thus including the subgroup).
I would do this by calculating the standard error. I could do it using the following formula:
$\text{SE} = \sqrt{p(1-p)/n}$
where $p$ is the overall proportion of all yes and $n$ is the total number of answers via all groups.
In the comments to this question it is stated: ". You can test the difference in means between the subset and the overall group as long as you account for the covariance between $\bar{X}_d$ and $\bar{X}$ in your standard error calculation" (with $\bar{X}_d$ being the answers for the subgroup and $\bar{X}$ being the answers for the entire sample).
My question is how to incorporate the covariance into my standard error calculation.