7
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Are you sure the Chi² requires the same size ? (I do not clearly remember the Chi²). But anyway, you can use Fisher's exact test. $\endgroup$ Mar 26, 2012 at 18:49
  • $\begingroup$ If you have a decent sample size you can use the normal approximation to the binomial: en.wikipedia.org/wiki/… and use a $z$-test $\endgroup$
    – Macro
    Apr 5, 2012 at 13:47

4 Answers 4

8
$\begingroup$

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)
$\endgroup$
1
$\begingroup$

You can do a two sample t-test, perhaps after transforming the proportions using e.g. the arcsine transformation.

$\endgroup$
1
  • 2
    $\begingroup$ ... "perhaps after transforming" because the $\arcsin$ transformation is a variance stabilizing transform enhancing precision, as the variance depends on the only parameter of the Bernoulli distribution. $\endgroup$ May 23, 2015 at 10:41
0
$\begingroup$

You can actually use logistic regression / glm with the outcome as dependent variable and group belonging as explanatory factor variable.

$\endgroup$
-1
$\begingroup$

Weighting by sample size is built into how the expected vaues are computed. The only thing to worry about are the rules about how small an expected value can be.

$\endgroup$
2
  • 1
    $\begingroup$ Welcome to the site,@JamalMunshi. This is a little more of a comment than an answer, would you mind expanding it a bit? $\endgroup$ Nov 14, 2014 at 9:34
  • $\begingroup$ maybe i did not understand the question very well as i am unsure what is meant by the length of a population. $\endgroup$ Nov 14, 2014 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.