I measured a binary variable from two different populations, and now I'm trying to find out whether the different populations differ with regards to this variable. I could use a Chi-Square test, but that would necessitate that both populations have the same length. Is there an appropriate test for these circumstances? Thank you.
Chi Square doesn't require equal size groups. In R you can use either prop.test() or chisq.test().
I do this often with A/B direct mail tests with unequal size groups. For example, 100K donors are split 90% and 10%: the 90% are sent an email appeal, and 10% are sent nothing. The binary outcome is whether they donated to the appeal.
The nice thing about prop.test vs chisq.test is that prop.test will both calculate the p-value of the hypothesis that the groups are equal and calculate the confidence interval for the difference
This page gives an example of prop.test() with two groups: http://cran.r-project.org/doc/contrib/Lemon-kickstart/kr_prop.html
sexsmoke<-matrix(c(70,120,65,140),ncol=2,byrow=T) rownames(sexsmoke)<-c("male","female") colnames(sexsmoke)<-c("smoke","nosmoke") prop.test(sexsmoke)