Difference in proportions with finite population I'm looking for a suitable test for the difference in two proportions when dealing with finite populations. The standard z-test seems to only apply to infinite populations, so you lose some power.
It is of course possible to just do two confidence intervals with the finite population correction and check that they don't overlap, but this also tends to lose power compared to a direct comparison I think?
Would greatly appreciate if someone could point me in the right direction!
 A: It's quite complicated to test for two proportions in a complex survey data, that's because there is no closed formula for the standard errors of the proportion estimators. Generally, you'd need to estimate the standard errors with bootstrap, balanced replicated method or jackknife. 
I recommend Applied Survey Data Analysis. The book has a section about testing for sample means with complex t-test. Testing for proportion is a simple extension because proportion to related to mean by the sample size.
Basically, you will need:


*

*Use FPC and inverse probability of selection to estimate weights for each response

*The unbiased estimate for the proportion is given by the normal formula with your weighted responses

*The variance for your estimators require the covariance of your estimators. I took a photo for section 5.6 in the book for you:


$$
\newcommand{var}{\text{var}}
\newcommand{cov}{\text{cov}}
\var\Big( \sum_{j=1}^{J} a_j \hat\theta_j \Big) = 
\sum_{j=1}^{J} a_j^2 \var({\hat\theta_j}) + 2 \times \sum_{j=1}^{J-1}\sum_{k>j}^{J} a_j a_k \cov(\hat\theta_j, \hat\theta_k)
$$
The formula gives the general formula for linear combination of your estimators. Testing for proportion fit into the framework.
As you can see, you need the covariance for your estimators. You should use a numerical method such as bootstrap to estimate it.


*Once you have the unbiased difference and it's variance (i.e. standard error). You form your test statistic simply by dividing your difference with it's standard error. Compute p-value like how you would do for a simple random sampling survey.


The survyemean function in SAS can do everything for you.
https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_surveymeans_sect007.htm
Note that you can choose what numeric method to use.
Please take a look at the book for the theories.
