Estimating the overall proportion of people who will vote for an individual after sampling two unique groups Say you have two disjoint groups of people, $A$ and $B$, in an entire population. Out of the overall population, the proportion of people in group $A$ is $q$. We want to determine what the overall fraction, $p$, of people who will vote for an individual is. 
If we survey $N_a$ people from group $A$ and $N_b$ people from group $B$, assuming the votes for him are distributed i.i.d. Bernoulli $p_a$ and $p_b$ for each group, how would you find a $90\%$ confidence interval for $p$? 
I've seen things dealing with the difference, and just a single group, but not sure how to expand this to a more general case. Can you just do a linear combination of the two? 
Thanks!

Assuming your sampling technique is random over the whole population, you can just combine your sample results. So, if $v_a$ people from the $N_a$ would vote for the candidate, and $v_b$ people from the $N_b$ would vote for the candidate, you estimate $p$ with $$\hat p = { {v_a +v_b} \over {N_a + N_b} }  \cdot  $$ There are many techniques to find a confidence interval for $p$ from this - I assume you already know a way to do it.  
